mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 20:45:14 +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
50225474d4
commit
4ad20ec85b
2 changed files with 1 additions and 3 deletions
|
@ -55,7 +55,6 @@ enum class QuirksMode {
|
|||
X(DocumentRequestAnElementToBeRemovedFromTheTopLayer) \
|
||||
X(HTMLInputElementSrcAttributeChange) \
|
||||
X(HTMLObjectElement) \
|
||||
X(SVGGraphicsElementTransformAttributeChange) \
|
||||
X(ShadowRootSetInnerHTML)
|
||||
|
||||
enum class InvalidateLayoutTreeReason {
|
||||
|
|
|
@ -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
Reference in a new issue