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

LibHTML: Make Node::create_layout_node() virtual

Instead of branching on the Node type, let subclasses decide how their
layout nodes get constructed.

This will allow elements to create custom layout nodes if they want.
This commit is contained in:
Andreas Kling 2019-10-05 22:27:52 +02:00
parent 09dccb3224
commit f150134de9
8 changed files with 36 additions and 27 deletions

View file

@ -15,5 +15,7 @@ public:
virtual String text_content() const override { return m_data; }
private:
virtual RefPtr<LayoutNode> create_layout_node(const StyleResolver&, const StyleProperties* parent_properties) const override;
String m_data;
};