mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +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
Notes:
sideshowbarker
2024-07-19 11:48:31 +09:00
Author: https://github.com/awesomekling
Commit: f150134de9
8 changed files with 36 additions and 27 deletions
|
@ -125,3 +125,8 @@ URL Document::complete_url(const String& string) const
|
|||
url.set_path(fspath.string());
|
||||
return url;
|
||||
}
|
||||
|
||||
RefPtr<LayoutNode> Document::create_layout_node(const StyleResolver&, const StyleProperties*) const
|
||||
{
|
||||
return adopt(*new LayoutDocument(*this, StyleProperties::create()));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue