mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 22:48:11 +00:00
LibWeb: Make sure replaced elements never create a BFC
This commit is contained in:
parent
829ba4afb9
commit
5ff1fc4347
1 changed files with 4 additions and 0 deletions
|
@ -33,6 +33,10 @@ FormattingContext::~FormattingContext() = default;
|
|||
// https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Block_formatting_context
|
||||
bool FormattingContext::creates_block_formatting_context(Box const& box)
|
||||
{
|
||||
// NOTE: Replaced elements never create a BFC.
|
||||
if (box.is_replaced_box())
|
||||
return false;
|
||||
|
||||
// NOTE: This function uses MDN as a reference, not because it's authoritative,
|
||||
// but because they've gathered all the conditions in one convenient location.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue