
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*.
15 lines
329 B
C++
15 lines
329 B
C++
#pragma once
|
|
|
|
#include <LibHTML/Layout/LayoutNode.h>
|
|
|
|
class LayoutBlock;
|
|
|
|
class LayoutInline : public LayoutNodeWithStyle {
|
|
public:
|
|
LayoutInline(const Element&, NonnullRefPtr<StyleProperties>);
|
|
virtual ~LayoutInline() override;
|
|
|
|
virtual const char* class_name() const override { return "LayoutInline"; }
|
|
|
|
private:
|
|
};
|