mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:17:45 +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
|
@ -39,11 +39,11 @@
|
|||
#include <LibWeb/DOM/EventListener.h>
|
||||
#include <LibWeb/DOM/Node.h>
|
||||
#include <LibWeb/HTML/HTMLAnchorElement.h>
|
||||
#include <LibWeb/Layout/LayoutBlock.h>
|
||||
#include <LibWeb/Layout/LayoutDocument.h>
|
||||
#include <LibWeb/Layout/LayoutInline.h>
|
||||
#include <LibWeb/Layout/LayoutNode.h>
|
||||
#include <LibWeb/Layout/LayoutText.h>
|
||||
#include <LibWeb/Layout/BlockBox.h>
|
||||
#include <LibWeb/Layout/InitialContainingBlockBox.h>
|
||||
#include <LibWeb/Layout/InlineNode.h>
|
||||
#include <LibWeb/Layout/Node.h>
|
||||
#include <LibWeb/Layout/TextNode.h>
|
||||
|
||||
//#define EVENT_DEBUG
|
||||
|
||||
|
@ -105,7 +105,7 @@ void Node::set_text_content(const String& content)
|
|||
document().invalidate_layout();
|
||||
}
|
||||
|
||||
RefPtr<LayoutNode> Node::create_layout_node(const CSS::StyleProperties*)
|
||||
RefPtr<Layout::Node> Node::create_layout_node(const CSS::StyleProperties*)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -230,7 +230,7 @@ void Node::removed_last_ref()
|
|||
delete this;
|
||||
}
|
||||
|
||||
void Node::set_layout_node(Badge<LayoutNode>, LayoutNode* layout_node) const
|
||||
void Node::set_layout_node(Badge<Layout::Node>, Layout::Node* layout_node) const
|
||||
{
|
||||
if (layout_node)
|
||||
m_layout_node = layout_node->make_weak_ptr();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue