mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 01:41:59 -05:00
LibWeb: Add support for SVG display attribute
(cherry picked from commit 97d5cf4eefaf3ef7dd68f68701435c05da1cffb1)
This commit is contained in:
parent
3f1147bb7e
commit
f86e2d61af
3 changed files with 12 additions and 0 deletions
4
Tests/LibWeb/Ref/reference/svg-display-attr.html
Normal file
4
Tests/LibWeb/Ref/reference/svg-display-attr.html
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
<svg width="120" viewBox="0 0 100 100">
|
||||||
|
<circle cx="25" cy="25" fill="blue" r="25" />
|
||||||
|
<g><circle cx="75" cy="25" fill="red" r="25" /></g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 150 B |
7
Tests/LibWeb/Ref/svg-display-attr.html
Normal file
7
Tests/LibWeb/Ref/svg-display-attr.html
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
<link rel="match" href="reference/svg-display-attr.html" />
|
||||||
|
<svg width="120" viewBox="0 0 100 100">
|
||||||
|
<circle cx="25" cy="25" fill="blue" r="25" />
|
||||||
|
<g><circle cx="75" cy="25" fill="red" r="25" /></g>
|
||||||
|
<circle cx="75" cy="25" fill="blue" r="25" display="none" />
|
||||||
|
<g display="none"><circle cx="75" cy="75" fill="red" r="25" /></g>
|
||||||
|
</svg>
|
|
@ -163,6 +163,7 @@ void SVGGraphicsElement::apply_presentational_hints(CSS::StyleProperties& style)
|
||||||
NamedPropertyID(CSS::PropertyID::MaskType),
|
NamedPropertyID(CSS::PropertyID::MaskType),
|
||||||
NamedPropertyID(CSS::PropertyID::ClipPath),
|
NamedPropertyID(CSS::PropertyID::ClipPath),
|
||||||
NamedPropertyID(CSS::PropertyID::ClipRule),
|
NamedPropertyID(CSS::PropertyID::ClipRule),
|
||||||
|
NamedPropertyID(CSS::PropertyID::Display),
|
||||||
};
|
};
|
||||||
|
|
||||||
CSS::Parser::ParsingContext parsing_context { document(), CSS::Parser::ParsingContext::Mode::SVGPresentationAttribute };
|
CSS::Parser::ParsingContext parsing_context { document(), CSS::Parser::ParsingContext::Mode::SVGPresentationAttribute };
|
||||||
|
|
Loading…
Reference in a new issue