mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-19 15:32:31 +00:00
LibWeb: Don't drop entire layout tree for SVG element transform changes
A partial update is enough here and avoids a lot of work. Dramatically reduces time spent on relayouts on https://duolingo.com/
This commit is contained in:
parent
dc56435ecd
commit
305a5ad30b
Notes:
github-actions[bot]
2025-03-25 07:32:56 +00:00
Author: https://github.com/awesomekling
Commit: 305a5ad30b
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4079
Reviewed-by: https://github.com/gmta ✅
2 changed files with 1 additions and 3 deletions
|
@ -45,8 +45,7 @@ void SVGGraphicsElement::attribute_changed(FlyString const& name, Optional<Strin
|
|||
auto transform_list = AttributeParser::parse_transform(value.value_or(String {}));
|
||||
if (transform_list.has_value())
|
||||
m_transform = transform_from_transform_list(*transform_list);
|
||||
// FIXME: This should only invalidate the contents of the SVG.
|
||||
document().invalidate_layout_tree(DOM::InvalidateLayoutTreeReason::SVGGraphicsElementTransformAttributeChange);
|
||||
set_needs_layout_tree_update(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue