mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 15:27:42 +00:00
LibWeb: Blockify children of parents with display:grid or display:flex
This commit is contained in:
parent
20caea2f86
commit
c9ab9e2c64
1 changed files with 7 additions and 2 deletions
|
@ -923,7 +923,7 @@ enum class BoxTypeTransformation {
|
||||||
Inlinify,
|
Inlinify,
|
||||||
};
|
};
|
||||||
|
|
||||||
static BoxTypeTransformation required_box_type_transformation(StyleProperties const& style, DOM::Element const&, Optional<CSS::Selector::PseudoElement> const&)
|
static BoxTypeTransformation required_box_type_transformation(StyleProperties const& style, DOM::Element const& element, Optional<CSS::Selector::PseudoElement> const&)
|
||||||
{
|
{
|
||||||
auto display = style.display();
|
auto display = style.display();
|
||||||
|
|
||||||
|
@ -933,7 +933,12 @@ static BoxTypeTransformation required_box_type_transformation(StyleProperties co
|
||||||
|
|
||||||
// FIXME: Containment in a ruby container inlinifies the box’s display type, as described in [CSS-RUBY-1].
|
// FIXME: Containment in a ruby container inlinifies the box’s display type, as described in [CSS-RUBY-1].
|
||||||
|
|
||||||
// FIXME: A parent with a grid or flex display value blockifies the box’s display type. [CSS-GRID-1] [CSS-FLEXBOX-1]
|
// A parent with a grid or flex display value blockifies the box’s display type. [CSS-GRID-1] [CSS-FLEXBOX-1]
|
||||||
|
if (element.parent() && element.parent()->layout_node()) {
|
||||||
|
auto const& parent_display = element.parent()->layout_node()->computed_values().display();
|
||||||
|
if (parent_display.is_grid_inside() || parent_display.is_flex_inside())
|
||||||
|
return BoxTypeTransformation::Blockify;
|
||||||
|
}
|
||||||
|
|
||||||
return BoxTypeTransformation::None;
|
return BoxTypeTransformation::None;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue