mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:07:35 +00:00
LibWeb: Split SVGTextContentElement into spec defined subclasses
As part of this move properties/methods to the correct subclass (position related properties go under SVGTextPositioningElement). SVG text element hierarchy: SVGTextContentElement ^- SVGTextPositioningElement ^- SVGTextElement ^- SVGTSpanElement ^- SVGTextPathElement (TODO) ^- SVGTRefElement (TODO)
This commit is contained in:
parent
77e6dbab33
commit
0e12503586
14 changed files with 195 additions and 45 deletions
|
@ -17,26 +17,14 @@ class SVGTextContentElement : public SVGGraphicsElement {
|
|||
WEB_PLATFORM_OBJECT(SVGTextContentElement, SVGGraphicsElement);
|
||||
|
||||
public:
|
||||
virtual JS::GCPtr<Layout::Node> create_layout_node(NonnullRefPtr<CSS::StyleProperties>) override;
|
||||
|
||||
virtual void attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) override;
|
||||
|
||||
WebIDL::ExceptionOr<int> get_number_of_chars() const;
|
||||
|
||||
Gfx::FloatPoint get_offset() const;
|
||||
|
||||
Optional<TextAnchor> text_anchor() const;
|
||||
|
||||
protected:
|
||||
SVGTextContentElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
||||
virtual JS::ThrowCompletionOr<void> initialize(JS::Realm&) override;
|
||||
|
||||
private:
|
||||
float m_x { 0 };
|
||||
float m_y { 0 };
|
||||
float m_dx { 0 };
|
||||
float m_dy { 0 };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue