mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-12 20:42:21 +00:00
LibWeb: Replace some unnecessary ShadowRoot verify_cast with static_cast
These two occurrences of verify_cast happened right after a check on the type of converted reference, making the verify_cast redundant.
This commit is contained in:
parent
5e5cdb2d28
commit
0758bc457e
Notes:
sideshowbarker
2024-07-17 06:54:15 +09:00
Author: https://github.com/Baitinq
Commit: 0758bc457e
Pull-request: https://github.com/SerenityOS/serenity/pull/15947
Reviewed-by: https://github.com/linusg
1 changed files with 2 additions and 2 deletions
|
@ -291,7 +291,7 @@ Node& Node::shadow_including_root()
|
|||
// if the object’s root is a shadow root; otherwise its root.
|
||||
auto& node_root = root();
|
||||
if (is<ShadowRoot>(node_root))
|
||||
return verify_cast<ShadowRoot>(node_root).host()->shadow_including_root();
|
||||
return static_cast<ShadowRoot&>(node_root).host()->shadow_including_root();
|
||||
return node_root;
|
||||
}
|
||||
|
||||
|
@ -868,7 +868,7 @@ void Node::inserted()
|
|||
ParentNode* Node::parent_or_shadow_host()
|
||||
{
|
||||
if (is<ShadowRoot>(*this))
|
||||
return verify_cast<ShadowRoot>(*this).host();
|
||||
return static_cast<ShadowRoot&>(*this).host();
|
||||
return verify_cast<ParentNode>(parent());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue