1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 09:57:35 +00:00

LibWeb: Remove SVGContext

The SVGContext is a leftover from when SVG properties were more ad-hoc.
All properties are now (for better or worse) treated as CSS properties
(or handled elsewhere). This makes the SVGContext's fill/stroke
inheritance handling unnecessary.
This commit is contained in:
MacDue 2023-07-01 21:24:04 +01:00 committed by Jelle Raaijmakers
parent 23a7ccf607
commit 7d26383426
11 changed files with 18 additions and 150 deletions

View file

@ -20,22 +20,6 @@ Layout::SVGBox const& SVGPaintable::layout_box() const
return static_cast<Layout::SVGBox const&>(layout_node());
}
void SVGPaintable::before_children_paint(PaintContext& context, PaintPhase phase) const
{
PaintableBox::before_children_paint(context, phase);
if (phase != PaintPhase::Foreground)
return;
context.svg_context().save();
}
void SVGPaintable::after_children_paint(PaintContext& context, PaintPhase phase) const
{
PaintableBox::after_children_paint(context, phase);
if (phase != PaintPhase::Foreground)
return;
context.svg_context().restore();
}
CSSPixelRect SVGPaintable::compute_absolute_rect() const
{
if (auto* svg_svg_box = layout_box().first_ancestor_of_type<Layout::SVGSVGBox>()) {