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

This commit is contained in:
Andreas Kling 2025-04-18 10:25:56 +02:00
commit 9dda0fa662
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()) {