mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 12:45:07 +00:00
LibHTML: LayoutText should inherit from LayoutNode directly
There's no need for LayoutText to inherit from LayoutInline. I had the wrong idea here: I was thinking that everything that can be laid out inline should inherit from LayoutInline, but that's clearly not sufficient for something like LayoutReplaced which can be laid out in either way.
This commit is contained in:
parent
2a266db05b
commit
1b7aa00768
2 changed files with 4 additions and 3 deletions
|
@ -8,8 +8,9 @@
|
|||
#include <ctype.h>
|
||||
|
||||
LayoutText::LayoutText(const Text& text)
|
||||
: LayoutInline(text, {})
|
||||
: LayoutNode(&text, {})
|
||||
{
|
||||
set_inline(true);
|
||||
}
|
||||
|
||||
LayoutText::~LayoutText()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue