From f6c3ec374232f2dfd4e2132d339069b7d95afdb7 Mon Sep 17 00:00:00 2001 From: 0GreenClover0 Date: Sun, 20 Aug 2023 00:17:42 +0200 Subject: [PATCH] LibWeb: Add Base::apply_presentational_hints call to element --- Tests/LibWeb/Ref/manifest.json | 3 ++- Tests/LibWeb/Ref/svg-symbol-ref.html | 5 +++++ Tests/LibWeb/Ref/svg-symbol.html | 5 +++++ Userland/Libraries/LibWeb/SVG/SVGSymbolElement.cpp | 2 ++ 4 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 Tests/LibWeb/Ref/svg-symbol-ref.html create mode 100644 Tests/LibWeb/Ref/svg-symbol.html diff --git a/Tests/LibWeb/Ref/manifest.json b/Tests/LibWeb/Ref/manifest.json index e2f8137584e..3552f75ed3c 100644 --- a/Tests/LibWeb/Ref/manifest.json +++ b/Tests/LibWeb/Ref/manifest.json @@ -4,5 +4,6 @@ "opacity-stacking.html": "opacity-stacking-ref.html", "css-gradient-currentcolor.html": "css-gradient-currentcolor-ref.html", "css-lang-selector.html": "css-lang-selector-ref.html", - "css-gradients.html": "css-gradients-ref.html" + "css-gradients.html": "css-gradients-ref.html", + "svg-symbol.html": "svg-symbol-ref.html" } diff --git a/Tests/LibWeb/Ref/svg-symbol-ref.html b/Tests/LibWeb/Ref/svg-symbol-ref.html new file mode 100644 index 00000000000..c89ff115495 --- /dev/null +++ b/Tests/LibWeb/Ref/svg-symbol-ref.html @@ -0,0 +1,5 @@ + + + + + diff --git a/Tests/LibWeb/Ref/svg-symbol.html b/Tests/LibWeb/Ref/svg-symbol.html new file mode 100644 index 00000000000..40f82c5de41 --- /dev/null +++ b/Tests/LibWeb/Ref/svg-symbol.html @@ -0,0 +1,5 @@ + + + + + diff --git a/Userland/Libraries/LibWeb/SVG/SVGSymbolElement.cpp b/Userland/Libraries/LibWeb/SVG/SVGSymbolElement.cpp index e98bd5d31d1..5f327568e8c 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGSymbolElement.cpp +++ b/Userland/Libraries/LibWeb/SVG/SVGSymbolElement.cpp @@ -31,6 +31,8 @@ void SVGSymbolElement::initialize(JS::Realm& realm) // https://svgwg.org/svg2-draft/struct.html#SymbolNotes void SVGSymbolElement::apply_presentational_hints(CSS::StyleProperties& style) const { + Base::apply_presentational_hints(style); + // The user agent style sheet sets the overflow property for ‘symbol’ elements to hidden. auto hidden = CSS::IdentifierStyleValue::create(CSS::ValueID::Hidden); style.set_property(CSS::PropertyID::Overflow, CSS::OverflowStyleValue::create(hidden, hidden));