mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
LibWeb: Add Base::apply_presentational_hints call to <symbol> element
This commit is contained in:
parent
d296992fb3
commit
f6c3ec3742
Notes:
sideshowbarker
2024-07-17 02:22:23 +09:00
Author: https://github.com/0GreenClover0 Commit: https://github.com/SerenityOS/serenity/commit/f6c3ec3742 Pull-request: https://github.com/SerenityOS/serenity/pull/20671
4 changed files with 14 additions and 1 deletions
|
@ -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"
|
||||
}
|
||||
|
|
5
Tests/LibWeb/Ref/svg-symbol-ref.html
Normal file
5
Tests/LibWeb/Ref/svg-symbol-ref.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
<svg><symbol fill="green" id="dot" width="500" height="500" viewBox="0 0 2 10">
|
||||
<circle cx="1" cy="1" r="1"/>
|
||||
<circle fill="blue" cx="1.5" cy="1" r="1"/>
|
||||
</symbol>
|
||||
<use href="#dot"/>
|
After Width: | Height: | Size: 183 B |
5
Tests/LibWeb/Ref/svg-symbol.html
Normal file
5
Tests/LibWeb/Ref/svg-symbol.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
<svg><symbol id="dot" width="500" height="500" viewBox="0 0 2 10">
|
||||
<circle fill="green" cx="1" cy="1" r="1"/>
|
||||
<circle fill="blue" cx="1.5" cy="1" r="1"/>
|
||||
</symbol>
|
||||
<use href="#dot"/>
|
After Width: | Height: | Size: 183 B |
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue