1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 05:57:45 +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

@ -17,24 +17,6 @@ PaintContext::PaintContext(Gfx::Painter& painter, Palette const& palette, double
{
}
SVGContext& PaintContext::svg_context()
{
// FIXME: This is a total hack to avoid crashing on content that has SVG elements embedded directly in HTML without an <svg> element.
if (!m_svg_context.has_value())
m_svg_context = SVGContext { {} };
return m_svg_context.value();
}
void PaintContext::set_svg_context(SVGContext context)
{
m_svg_context = move(context);
}
void PaintContext::clear_svg_context()
{
m_svg_context.clear();
}
CSSPixelRect PaintContext::css_viewport_rect() const
{
return {