ladybird/Libraries/LibHTML/Layout/LayoutInline.h
Andreas Kling 749e3f0f30 LibHTML: Add LayoutNodeWithStyle class, make LayoutText style-less
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*.
2019-10-07 10:56:44 +02:00

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:
};