mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 03:55:24 +00:00
LibWeb: Turn floated display:inline elements into block-level elements
This commit is contained in:
parent
7527b9ee72
commit
5975a425bd
Notes:
sideshowbarker
2024-07-19 05:02:14 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/5975a425bd2
1 changed files with 6 additions and 1 deletions
|
@ -121,8 +121,13 @@ RefPtr<LayoutNode> Element::create_layout_node(const StyleProperties* parent_sty
|
|||
|
||||
if (display == CSS::Display::Block)
|
||||
return adopt(*new LayoutBlock(document(), this, move(style)));
|
||||
if (display == CSS::Display::Inline)
|
||||
|
||||
if (display == CSS::Display::Inline) {
|
||||
if (style->float_().value_or(CSS::Float::None) != CSS::Float::None)
|
||||
return adopt(*new LayoutBlock(document(), this, move(style)));
|
||||
return adopt(*new LayoutInline(document(), *this, move(style)));
|
||||
}
|
||||
|
||||
if (display == CSS::Display::ListItem)
|
||||
return adopt(*new LayoutListItem(document(), *this, move(style)));
|
||||
if (display == CSS::Display::Table)
|
||||
|
|
Loading…
Add table
Reference in a new issue