mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 18:10:56 +09: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:
parent
3451673ac8
commit
7e1bf4d300
Notes:
sideshowbarker
2024-07-17 19:45:34 +09:00
Author: https://github.com/awesomekling
Commit: 7e1bf4d300
31 changed files with 48 additions and 91 deletions
|
@ -34,7 +34,7 @@ public:
|
|||
String to_data_url(const String& type, Optional<double> quality) const;
|
||||
|
||||
private:
|
||||
virtual RefPtr<Layout::Node> create_layout_node() override;
|
||||
virtual RefPtr<Layout::Node> create_layout_node(NonnullRefPtr<CSS::StyleProperties>) override;
|
||||
|
||||
RefPtr<Gfx::Bitmap> m_bitmap;
|
||||
RefPtr<CanvasRenderingContext2D> m_context;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue