mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:27:43 +00:00
AK: Rename downcast<T> => verify_cast<T>
This makes it much clearer what this cast actually does: it will VERIFY that the thing we're casting is a T (using is<T>()).
This commit is contained in:
parent
6215a9c2cb
commit
ee3a73ddbb
61 changed files with 262 additions and 262 deletions
|
@ -18,11 +18,11 @@ void Event::append_to_path(EventTarget& invocation_target, RefPtr<EventTarget> s
|
|||
bool root_of_closed_tree = false;
|
||||
|
||||
if (is<Node>(invocation_target)) {
|
||||
auto& invocation_target_node = downcast<Node>(invocation_target);
|
||||
auto& invocation_target_node = verify_cast<Node>(invocation_target);
|
||||
if (is<ShadowRoot>(invocation_target_node.root()))
|
||||
invocation_target_in_shadow_tree = true;
|
||||
if (is<ShadowRoot>(invocation_target_node)) {
|
||||
auto& invocation_target_shadow_root = downcast<ShadowRoot>(invocation_target_node);
|
||||
auto& invocation_target_shadow_root = verify_cast<ShadowRoot>(invocation_target_node);
|
||||
root_of_closed_tree = invocation_target_shadow_root.closed();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue