mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +00:00
LibWeb: Don't careleslly insert inline-level boxes into inline-blocks
Just because an inline-block is inline doesn't mean it's ready to accept random inline children. If it's a block, we may need to create an anonymous wrapper first. Fixes #4604.
This commit is contained in:
parent
d991658794
commit
22325dd63e
Notes:
sideshowbarker
2024-07-19 00:06:55 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/22325dd63ed
1 changed files with 1 additions and 1 deletions
|
@ -54,7 +54,7 @@ static NonnullRefPtr<CSS::StyleProperties> style_for_anonymous_block(Node& paren
|
|||
|
||||
static Layout::Node& insertion_parent_for_inline_node(Layout::Node& layout_parent, Layout::Node& layout_node)
|
||||
{
|
||||
if (layout_parent.is_inline())
|
||||
if (layout_parent.is_inline() && !layout_parent.is_inline_block())
|
||||
return layout_parent;
|
||||
|
||||
if (!layout_parent.has_children() || layout_parent.children_are_inline())
|
||||
|
|
Loading…
Add table
Reference in a new issue