diff options
author | Andreas Kling <kling@serenityos.org> | 2022-04-10 19:05:12 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-04-10 21:35:55 +0200 |
commit | e81594d9a1528c57d5c94b475e11efe26a324766 (patch) | |
tree | 7c6f70dcfc6bde1e46dc00bd1c9a345931a799b5 /Userland/Libraries/LibWeb/Bindings | |
parent | c6e79124c7f479da5bb2b97cc59868763d013d51 (diff) | |
download | serenity-e81594d9a1528c57d5c94b475e11efe26a324766.zip |
LibWeb: Sketch out a very basic SVG <clipPath> element
This element doesn't actually support anything at the moment, but it
still massively speeds up painting performance on Wikipedia! :^)
How? Because we no longer paint SVG <path> elements found inside
<clipPath> elements. SVGClipPathElement::create_layout_node() returns
nullptr which stops the layout tree builder from recursing further into
the subtree, and so the <path> element never gets a layout or paint box.
Mousing over Wikipedia now barely break 50% CPU usage on my machine :^)
Diffstat (limited to 'Userland/Libraries/LibWeb/Bindings')
-rw-r--r-- | Userland/Libraries/LibWeb/Bindings/WindowObjectHelper.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/Bindings/WindowObjectHelper.h b/Userland/Libraries/LibWeb/Bindings/WindowObjectHelper.h index 917c188366..242e9dbf21 100644 --- a/Userland/Libraries/LibWeb/Bindings/WindowObjectHelper.h +++ b/Userland/Libraries/LibWeb/Bindings/WindowObjectHelper.h @@ -267,6 +267,8 @@ #include <LibWeb/Bindings/ResizeObserverPrototype.h> #include <LibWeb/Bindings/SVGCircleElementConstructor.h> #include <LibWeb/Bindings/SVGCircleElementPrototype.h> +#include <LibWeb/Bindings/SVGClipPathElementConstructor.h> +#include <LibWeb/Bindings/SVGClipPathElementPrototype.h> #include <LibWeb/Bindings/SVGElementConstructor.h> #include <LibWeb/Bindings/SVGElementPrototype.h> #include <LibWeb/Bindings/SVGEllipseElementConstructor.h> @@ -484,6 +486,7 @@ ADD_WINDOW_OBJECT_INTERFACE(SubtleCrypto) \ ADD_WINDOW_OBJECT_INTERFACE(SVGElement) \ ADD_WINDOW_OBJECT_INTERFACE(SVGCircleElement) \ + ADD_WINDOW_OBJECT_INTERFACE(SVGClipPathElement) \ ADD_WINDOW_OBJECT_INTERFACE(SVGEllipseElement) \ ADD_WINDOW_OBJECT_INTERFACE(SVGGeometryElement) \ ADD_WINDOW_OBJECT_INTERFACE(SVGGraphicsElement) \ |