mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 11:48:32 +00:00
LibWeb: Compute element style in Layout::TreeBuilder
Instead of making each Layout::Node compute style for itself, we now compute it in TreeBuilder before even calling create_layout_node(). For non-element DOM nodes, we create the style and layout tree node in TreeBuilder. This allows us to move create_layout_node() from DOM::Node to DOM::Element.
This commit is contained in:
@@ -26,7 +26,7 @@ public:
|
||||
String type() const { return attribute(HTML::AttributeNames::type); }
|
||||
|
||||
private:
|
||||
virtual RefPtr<Layout::Node> create_layout_node() override;
|
||||
virtual RefPtr<Layout::Node> create_layout_node(NonnullRefPtr<CSS::StyleProperties>) override;
|
||||
|
||||
ImageLoader m_image_loader;
|
||||
bool m_should_show_fallback_content { false };
|
||||
|
||||
Reference in New Issue
Block a user