LibWeb: Consider transform property while finding containing block
This commit is contained in:
parent
6092d81e4d
commit
8eeedce805
Notes:
sideshowbarker
2024-07-18 00:54:03 +09:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/SerenityOS/serenity/commit/8eeedce805 Pull-request: https://github.com/SerenityOS/serenity/pull/17591 Reviewed-by: https://github.com/linusg
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
Reference in a new issue