mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-03 17:58:49 +00:00
LibHTML: Hard-code LayoutTable to never have inline children
This is a total hack to get around the auto-detection mechanism for whether a block has inline or block children. We'll say that tables never have inline children for now, and then anything that actually turns out to be an inline child will just be ignored by layout.
This commit is contained in:
parent
b4c2621ed7
commit
6c22b46b37
Notes:
sideshowbarker
2024-07-19 11:39:26 +09:00
Author: https://github.com/awesomekling
Commit: 6c22b46b37
1 changed files with 5 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
#include <LibHTML/DOM/Document.h>
|
||||
#include <LibHTML/DOM/ParentNode.h>
|
||||
#include <LibHTML/Layout/LayoutNode.h>
|
||||
#include <LibHTML/Layout/LayoutTable.h>
|
||||
#include <LibHTML/Layout/LayoutText.h>
|
||||
#include <LibHTML/Layout/LayoutTreeBuilder.h>
|
||||
|
||||
|
@ -45,6 +46,10 @@ static RefPtr<LayoutNode> create_layout_tree(Node& node, const StyleProperties*
|
|||
if (have_inline_children && !have_block_children)
|
||||
layout_node->set_children_are_inline(true);
|
||||
|
||||
// FIXME: This is really hackish. Some layout nodes don't care about inline children.
|
||||
if (is<LayoutTable>(layout_node))
|
||||
layout_node->set_children_are_inline(false);
|
||||
|
||||
return layout_node;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue