mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:17:35 +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
|
@ -31,13 +31,13 @@
|
|||
#include <LibGfx/Rect.h>
|
||||
#include <LibWeb/Forward.h>
|
||||
|
||||
namespace Web {
|
||||
namespace Web::Layout {
|
||||
|
||||
class LineBoxFragment : public Weakable<LineBoxFragment> {
|
||||
friend class LineBox;
|
||||
|
||||
public:
|
||||
LineBoxFragment(const LayoutNode& layout_node, int start, int length, const Gfx::FloatPoint& offset, const Gfx::FloatSize& size)
|
||||
LineBoxFragment(const Node& layout_node, int start, int length, const Gfx::FloatPoint& offset, const Gfx::FloatSize& size)
|
||||
: m_layout_node(layout_node)
|
||||
, m_start(start)
|
||||
, m_length(length)
|
||||
|
@ -46,7 +46,7 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
const LayoutNode& layout_node() const { return m_layout_node; }
|
||||
const Node& layout_node() const { return m_layout_node; }
|
||||
int start() const { return m_start; }
|
||||
int length() const { return m_length; }
|
||||
const Gfx::FloatRect absolute_rect() const;
|
||||
|
@ -72,7 +72,7 @@ public:
|
|||
Gfx::FloatRect selection_rect(const Gfx::Font&) const;
|
||||
|
||||
private:
|
||||
const LayoutNode& m_layout_node;
|
||||
const Node& m_layout_node;
|
||||
int m_start { 0 };
|
||||
int m_length { 0 };
|
||||
Gfx::FloatPoint m_offset;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue