
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().
18 lines
431 B
C++
18 lines
431 B
C++
#pragma once
|
|
|
|
#include <LibHTML/Layout/LayoutNode.h>
|
|
|
|
class LayoutBlock;
|
|
|
|
class LayoutInline : public LayoutNode {
|
|
public:
|
|
LayoutInline(const Node&, RefPtr<StyleProperties>);
|
|
virtual ~LayoutInline() override;
|
|
|
|
virtual const char* class_name() const override { return "LayoutInline"; }
|
|
virtual bool is_inline() const override { return true; }
|
|
|
|
virtual void split_into_lines(LayoutBlock& container);
|
|
|
|
private:
|
|
};
|