mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-05 23:59:53 +00:00
LibWeb: Add fast_is<T> helpers for Navigable & TraversableNavigable
This commit is contained in:
parent
425101d98e
commit
9dda0fa662
3 changed files with 9 additions and 6 deletions
|
@ -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()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue