From 305a5ad30b77531a516d139162e6b5964a6ed55a Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 24 Mar 2025 23:05:02 +0000 Subject: [PATCH] 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/ --- Libraries/LibWeb/DOM/Document.h | 1 - Libraries/LibWeb/SVG/SVGGraphicsElement.cpp | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Libraries/LibWeb/DOM/Document.h b/Libraries/LibWeb/DOM/Document.h index dbce147a627..209ca0a43bd 100644 --- a/Libraries/LibWeb/DOM/Document.h +++ b/Libraries/LibWeb/DOM/Document.h @@ -55,7 +55,6 @@ enum class QuirksMode { X(DocumentRequestAnElementToBeRemovedFromTheTopLayer) \ X(HTMLInputElementSrcAttributeChange) \ X(HTMLObjectElement) \ - X(SVGGraphicsElementTransformAttributeChange) \ X(ShadowRootSetInnerHTML) enum class InvalidateLayoutTreeReason { diff --git a/Libraries/LibWeb/SVG/SVGGraphicsElement.cpp b/Libraries/LibWeb/SVG/SVGGraphicsElement.cpp index a0135980514..47ed951d047 100644 --- a/Libraries/LibWeb/SVG/SVGGraphicsElement.cpp +++ b/Libraries/LibWeb/SVG/SVGGraphicsElement.cpp @@ -45,8 +45,7 @@ void SVGGraphicsElement::attribute_changed(FlyString const& name, Optional