mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-04-24 05:24:10 +00:00
LibHTML: Add Document::get_element_by_id() and get_elements_by_name()
These will be useful for implementing various things. They don't do any caching at the moment, but that might become valuable in the future. To facilitate this change, I also made it possible to abort a tree walk with for_each_in_subtree() by returning IterationDecision::Break from the callback.
This commit is contained in:
@@ -77,6 +77,7 @@ void Node::invalidate_style()
|
||||
for_each_in_subtree([&](auto& node) {
|
||||
if (is<Element>(node))
|
||||
node.set_needs_style_update(true);
|
||||
return IterationDecision::Continue;
|
||||
});
|
||||
document().schedule_style_update();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user