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
commit b9afea40e6
Notes: sideshowbarker 2024-07-19 01:59:31 +09:00
16 changed files with 55 additions and 126 deletions

View file

@ -19,15 +19,13 @@ 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;
private:
SVGPolygonElement(DOM::Document&, DOM::QualifiedName);
virtual void initialize(JS::Realm&) override;
Optional<Gfx::Path> m_path;
Vector<Gfx::FloatPoint> m_points;
};