mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-12 19:19:30 +00:00
LibWeb: Support percentage values in SVG text positioning element
This commit is contained in:
parent
4795b9206c
commit
356bddbdbb
Notes:
github-actions[bot]
2024-07-21 17:57:31 +00:00
Author: https://github.com/EdwinHoksberg
Commit: 356bddbdbb
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/752
5 changed files with 69 additions and 12 deletions
|
@ -18,7 +18,7 @@ class SVGTextPositioningElement : public SVGTextContentElement {
|
|||
public:
|
||||
virtual void attribute_changed(FlyString const& name, Optional<String> const& old_value, Optional<String> const& value) override;
|
||||
|
||||
Gfx::FloatPoint get_offset() const;
|
||||
Gfx::FloatPoint get_offset(CSSPixelSize const& viewport_size) const;
|
||||
|
||||
JS::NonnullGCPtr<SVGAnimatedLength> x() const;
|
||||
JS::NonnullGCPtr<SVGAnimatedLength> y() const;
|
||||
|
@ -31,10 +31,10 @@ protected:
|
|||
virtual void initialize(JS::Realm&) override;
|
||||
|
||||
private:
|
||||
float m_x { 0 };
|
||||
float m_y { 0 };
|
||||
float m_dx { 0 };
|
||||
float m_dy { 0 };
|
||||
Optional<NumberPercentage> m_x;
|
||||
Optional<NumberPercentage> m_y;
|
||||
Optional<NumberPercentage> m_dx;
|
||||
Optional<NumberPercentage> m_dy;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue