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

LibWeb: Parse and apply fill-opacity attribute to SVG paths

This is needed to fix the rendering of the Street View directional
controls (which have paths with various levels of opacity set by
this attribute).
This commit is contained in:
MacDue 2023-04-10 12:25:00 +01:00 committed by Andreas Kling
parent 62f087bd56
commit 6482c306f1
2 changed files with 16 additions and 1 deletions

View file

@ -20,7 +20,10 @@ class SVGGraphicsElement : public SVGElement {
public:
virtual void apply_presentational_hints(CSS::StyleProperties&) const override;
virtual void parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) override;
Optional<Gfx::Color> fill_color() const;
Gfx::Painter::WindingRule fill_rule() const;
Optional<Gfx::Color> stroke_color() const;
Optional<float> stroke_width() const;
@ -28,6 +31,8 @@ protected:
SVGGraphicsElement(DOM::Document&, DOM::QualifiedName);
virtual JS::ThrowCompletionOr<void> initialize(JS::Realm&) override;
Optional<float> m_fill_opacity = {};
};
}