mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:57:44 +00:00
LibWeb: Rename LayoutNode classes and move them into Layout namespace
Bring the names of various boxes closer to spec language. This should hopefully make things easier to understand and hack on. :^) Some notable changes: - LayoutNode -> Layout::Node - LayoutBox -> Layout::Box - LayoutBlock -> Layout::BlockBox - LayoutReplaced -> Layout::ReplacedBox - LayoutDocument -> Layout::InitialContainingBlockBox - LayoutText -> Layout::TextNode - LayoutInline -> Layout::InlineNode Note that this is not strictly a "box tree" as we also hang inline/text nodes in the same tree, and they don't generate boxes. (Instead, they contribute line box fragments to their containing block!)
This commit is contained in:
parent
f358f2255f
commit
5aeab9878e
114 changed files with 863 additions and 880 deletions
|
@ -27,26 +27,24 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/Vector.h>
|
||||
#include <LibWeb/Layout/LayoutNode.h>
|
||||
#include <LibWeb/Layout/Node.h>
|
||||
|
||||
namespace Web {
|
||||
|
||||
class LayoutBox;
|
||||
namespace Web::Layout {
|
||||
|
||||
class StackingContext {
|
||||
public:
|
||||
StackingContext(LayoutBox&, StackingContext* parent);
|
||||
StackingContext(Box&, StackingContext* parent);
|
||||
|
||||
StackingContext* parent() { return m_parent; }
|
||||
const StackingContext* parent() const { return m_parent; }
|
||||
|
||||
void paint(PaintContext&, LayoutNode::PaintPhase);
|
||||
void paint(PaintContext&, Layout::Node::PaintPhase);
|
||||
HitTestResult hit_test(const Gfx::IntPoint&, HitTestType) const;
|
||||
|
||||
void dump(int indent = 0) const;
|
||||
|
||||
private:
|
||||
LayoutBox& m_box;
|
||||
Box& m_box;
|
||||
StackingContext* const m_parent { nullptr };
|
||||
Vector<StackingContext*> m_children;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue