mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:37:35 +00:00
LibWeb: Create a new BFC when the overflow is neither visible nor clip
From MDN, a block overflow context should be created for "Block elements where overflow has a value other than visible and clip."
This commit is contained in:
parent
e0f0aa7ce0
commit
44602ae141
1 changed files with 8 additions and 1 deletions
|
@ -60,6 +60,14 @@ bool FormattingContext::creates_block_formatting_context(const Box& box)
|
|||
if (is<TableCellBox>(box))
|
||||
return true;
|
||||
|
||||
CSS::Overflow overflow_x = box.computed_values().overflow_x();
|
||||
if ((overflow_x != CSS::Overflow::Visible) && (overflow_x != CSS::Overflow::Clip))
|
||||
return true;
|
||||
|
||||
CSS::Overflow overflow_y = box.computed_values().overflow_y();
|
||||
if ((overflow_y != CSS::Overflow::Visible) && (overflow_y != CSS::Overflow::Clip))
|
||||
return true;
|
||||
|
||||
// FIXME: inline-flex as well
|
||||
if (box.parent() && box.parent()->computed_values().display() == CSS::Display::Flex) {
|
||||
// FIXME: Flex items (direct children of the element with display: flex or inline-flex) if they are neither flex nor grid nor table containers themselves.
|
||||
|
@ -69,7 +77,6 @@ bool FormattingContext::creates_block_formatting_context(const Box& box)
|
|||
|
||||
// FIXME: table-caption
|
||||
// FIXME: anonymous table cells
|
||||
// FIXME: Block elements where overflow has a value other than visible and clip.
|
||||
// FIXME: display: flow-root
|
||||
// FIXME: Elements with contain: layout, content, or paint.
|
||||
// FIXME: grid
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue