
Since LayoutText always inherits style, it shouldn't store any style of its own. This patch adds a LayoutNodeWithStyle class to sit between LayoutNode and everyone who wants to inherit from LayoutNode except LayoutText :^) Since LayoutText can never have children, we also know that the parent of any LayoutNode is always going to be a LayoutNodeWithStyle. So this patch makes LayoutNode::parent() return LayoutNodeWithStyle*.
13 lines
314 B
C++
13 lines
314 B
C++
#include <LibHTML/DOM/Element.h>
|
|
#include <LibHTML/Layout/LayoutBlock.h>
|
|
#include <LibHTML/Layout/LayoutInline.h>
|
|
|
|
LayoutInline::LayoutInline(const Element& element, NonnullRefPtr<StyleProperties> style)
|
|
: LayoutNodeWithStyle(&element, move(style))
|
|
{
|
|
set_inline(true);
|
|
}
|
|
|
|
LayoutInline::~LayoutInline()
|
|
{
|
|
}
|