LibWeb: Add fast_is<T> helpers for Navigable & TraversableNavigable

This commit is contained in:
Andreas Kling 2025-04-18 10:25:56 +02:00 committed by Andreas Kling
commit 0e490e3352
Notes: github-actions[bot] 2025-04-18 12:47:37 +00:00
3 changed files with 9 additions and 6 deletions

View file

@ -99,11 +99,6 @@ Vector<GC::Root<Navigable>> Navigable::child_navigables() const
return results;
}
bool Navigable::is_traversable() const
{
return is<TraversableNavigable>(*this);
}
bool Navigable::is_ancestor_of(GC::Ref<Navigable> other) const
{
for (auto ancestor = other->parent(); ancestor; ancestor = ancestor->parent()) {