From f1a0e8b8e633a46980f42aa5cf9acdd42b62d7e7 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 1 Jul 2019 07:27:17 +0200 Subject: [PATCH] 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. --- LibHTML/Frame.cpp | 3 +++ 1 file changed, 3 insertions(+) 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 #include #include +#include #include #include @@ -59,6 +60,8 @@ void Frame::layout() auto styled_root = generate_style_tree(); auto create_layout_node = [](const StyledNode& styled_node) -> RefPtr { + if (styled_node.node() && styled_node.node()->is_document()) + return adopt(*new LayoutDocument(static_cast(*styled_node.node()))); switch (styled_node.display()) { case Display::None: return nullptr;