1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 01:58:12 +00:00

LibWeb: Update SVG get_path() API to take a viewport size

This will allow resolving paths that use sizes that are relative to the
viewport. This necessarily removes the on element caching, which has
been redundant for a while as computed paths are stored on the
paintable.
This commit is contained in:
MacDue 2024-03-03 20:15:06 +00:00 committed by Andreas Kling
parent 1fbf1073ab
commit b9afea40e6
16 changed files with 55 additions and 126 deletions

View file

@ -20,7 +20,7 @@ public:
virtual void attribute_changed(FlyString const& name, Optional<String> const& value) override;
virtual Gfx::Path& get_path() override;
virtual Gfx::Path get_path(CSSPixelSize viewport_size) override;
JS::NonnullGCPtr<SVGAnimatedLength> x() const;
JS::NonnullGCPtr<SVGAnimatedLength> y() const;
@ -36,8 +36,6 @@ private:
Gfx::FloatSize calculate_used_corner_radius_values() const;
Optional<Gfx::Path> m_path;
Optional<float> m_x;
Optional<float> m_y;
Optional<float> m_width;