mirror of
https://github.com/RGBCube/serenity
synced 2025-05-29 07:05:06 +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:
parent
09dccb3224
commit
f150134de9
8 changed files with 36 additions and 27 deletions
|
@ -10,3 +10,8 @@ Text::Text(Document& document, const String& data)
|
|||
Text::~Text()
|
||||
{
|
||||
}
|
||||
|
||||
RefPtr<LayoutNode> Text::create_layout_node(const StyleResolver&, const StyleProperties*) const
|
||||
{
|
||||
return adopt(*new LayoutText(*this));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue