diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-07-01 07:27:17 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-07-01 07:27:17 +0200 |
commit | f1a0e8b8e633a46980f42aa5cf9acdd42b62d7e7 (patch) | |
tree | bdb14d62157e422a8b70e88f74a0f91c995ec7bb /LibHTML/Frame.cpp | |
parent | 0bfa8640216bff29f24f47f1c218c9adae651b5d (diff) | |
download | serenity-f1a0e8b8e633a46980f42aa5cf9acdd42b62d7e7.zip |
LibHTML: The document node should have a LayoutDocument representative.
This will be a special LayoutBlock that provides the ICB dimensions based
on the containing frame.
Diffstat (limited to 'LibHTML/Frame.cpp')
-rw-r--r-- | LibHTML/Frame.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/LibHTML/Frame.cpp b/LibHTML/Frame.cpp index 147216e4f0..0c060574ed 100644 --- a/LibHTML/Frame.cpp +++ b/LibHTML/Frame.cpp @@ -5,6 +5,7 @@ #include <LibHTML/Dump.h> #include <LibHTML/Frame.h> #include <LibHTML/Layout/LayoutBlock.h> +#include <LibHTML/Layout/LayoutDocument.h> #include <LibHTML/Layout/LayoutInline.h> #include <stdio.h> @@ -59,6 +60,8 @@ void Frame::layout() auto styled_root = generate_style_tree(); auto create_layout_node = [](const StyledNode& styled_node) -> RefPtr<LayoutNode> { + if (styled_node.node() && styled_node.node()->is_document()) + return adopt(*new LayoutDocument(static_cast<const Document&>(*styled_node.node()))); switch (styled_node.display()) { case Display::None: return nullptr; |