mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
LibWeb: Only apply style for continuation nodes once
This fixes the very, _very_ slow loading of https://yzy-sply.com. The `apply_style()` method also calls into this method recursively, so we just need to call it once instead of once per node in the continuation chain.
This commit is contained in:
parent
cd4aca57c4
commit
d94906fa1a
Notes:
github-actions[bot]
2025-02-05 13:35:17 +00:00
Author: https://github.com/gmta
Commit: d94906fa1a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3460
2 changed files with 26 additions and 4 deletions
|
@ -1316,10 +1316,11 @@ CSS::UserSelect Node::user_select_used_value() const
|
|||
|
||||
void NodeWithStyleAndBoxModelMetrics::propagate_style_along_continuation(CSS::ComputedProperties const& computed_style) const
|
||||
{
|
||||
for (auto continuation = continuation_of_node(); continuation; continuation = continuation->continuation_of_node()) {
|
||||
if (!continuation->is_anonymous())
|
||||
continuation->apply_style(computed_style);
|
||||
}
|
||||
auto continuation = continuation_of_node();
|
||||
while (continuation && continuation->is_anonymous())
|
||||
continuation = continuation->continuation_of_node();
|
||||
if (continuation)
|
||||
continuation->apply_style(computed_style);
|
||||
}
|
||||
|
||||
void NodeWithStyleAndBoxModelMetrics::visit_edges(Cell::Visitor& visitor)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue