mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:07:35 +00:00
LibWeb: Consider transform property while finding containing block
This commit is contained in:
parent
6092d81e4d
commit
8eeedce805
1 changed files with 12 additions and 1 deletions
|
@ -59,7 +59,18 @@ bool Node::is_out_of_flow(FormattingContext const& formatting_context) const
|
|||
|
||||
bool Node::can_contain_boxes_with_position_absolute() const
|
||||
{
|
||||
return computed_values().position() != CSS::Position::Static || is<InitialContainingBlock>(*this);
|
||||
if (computed_values().position() != CSS::Position::Static)
|
||||
return true;
|
||||
|
||||
if (is<InitialContainingBlock>(*this))
|
||||
return true;
|
||||
|
||||
// https://w3c.github.io/csswg-drafts/css-transforms-1/#propdef-transform
|
||||
// Any computed value other than none for the transform affects containing block and stacking context
|
||||
if (!computed_values().transformations().is_empty())
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static Box const* nearest_ancestor_capable_of_forming_a_containing_block(Node const& node)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue