mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-06 08:10:02 +00:00
LibHTML: LayoutText should always use parent's style properties
This patch makes StyleProperties heap-allocated and ref-counted so that a LayoutNode can be without one. The ref-counting also allows anonymous blocks to share style with their parent block. LayoutText never needs a StyleProperties, since text always inherits style from its parent element. This is handled by style_properties().
This commit is contained in:
parent
79d8b9ae75
commit
4e35bbffdd
Notes:
sideshowbarker
2024-07-19 11:49:31 +09:00
Author: https://github.com/awesomekling
Commit: 4e35bbffdd
14 changed files with 45 additions and 39 deletions
|
@ -1,7 +1,7 @@
|
|||
#include <LibHTML/Layout/LayoutBlock.h>
|
||||
#include <LibHTML/Layout/LayoutInline.h>
|
||||
|
||||
LayoutInline::LayoutInline(const Node& node, StyleProperties&& style_properties)
|
||||
LayoutInline::LayoutInline(const Node& node, RefPtr<StyleProperties> style_properties)
|
||||
: LayoutNode(&node, move(style_properties))
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue