mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 18:10:56 +09:00
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.
This commit is contained in:
parent
0bfa864021
commit
f1a0e8b8e6
Notes:
sideshowbarker
2024-07-19 13:25:37 +09:00
Author: https://github.com/awesomekling
Commit: f1a0e8b8e6
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue