1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:17:44 +00:00

LibWeb: Honor fill, stroke and stroke-width attribute on SVGSVGElement

These are presentational hints and are handled by SVGGraphicsElement (a
superclass of SVGSVGElement) so we just need to call up to it. :^)
This commit is contained in:
Andreas Kling 2023-05-04 13:50:21 +02:00
parent 2abe62adfa
commit 4ad12f3cb2

View file

@ -37,6 +37,8 @@ JS::GCPtr<Layout::Node> SVGSVGElement::create_layout_node(NonnullRefPtr<CSS::Sty
void SVGSVGElement::apply_presentational_hints(CSS::StyleProperties& style) const
{
Base::apply_presentational_hints(style);
// NOTE: Hack to ensure SVG unitless widths/heights are parsed even with <!DOCTYPE html>
auto previous_quirks_mode = document().mode();
const_cast<DOM::Document&>(document()).set_quirks_mode(DOM::QuirksMode::Yes);