AK+Everywhere: Rename verify_cast to as

Follow-up to fc20e61e72.
This commit is contained in:
Timothy Flynn 2025-01-21 09:12:05 -05:00 committed by Tim Flynn
commit 85b424464a
Notes: github-actions[bot] 2025-01-21 16:49:39 +00:00
191 changed files with 574 additions and 574 deletions

View file

@ -23,17 +23,17 @@ EventTarget* retarget(EventTarget* a, EventTarget* b)
return a;
// - As root is not a shadow root
auto* a_node = verify_cast<Node>(a);
auto* a_node = as<Node>(a);
auto& a_root = a_node->root();
if (!is<ShadowRoot>(a_root))
return a;
// - B is a node and As root is a shadow-including inclusive ancestor of B
if (is<Node>(b) && a_root.is_shadow_including_inclusive_ancestor_of(verify_cast<Node>(*b)))
if (is<Node>(b) && a_root.is_shadow_including_inclusive_ancestor_of(as<Node>(*b)))
return a;
// 2. Set A to As roots host.
auto& a_shadow_root = verify_cast<ShadowRoot>(a_root);
auto& a_shadow_root = as<ShadowRoot>(a_root);
a = a_shadow_root.host();
}
}