mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 03:09:08 +00:00
LibWeb: Start work towards modern CSS "display" values
Until now, we've internally thought of the CSS "display" property as a single-value property. In practice, "display" is a much more complex property that comes in a number of configurations. The most interesting one is the two-part format that describes the outside and inside behavior of a box. Switching our own internal representation towards this model will allow for much cleaner abstractions around layout and the various formatting contexts. Note that we don't *parse* two-part "display" yet, this is only about changing the internal representation of the property. Spec: https://drafts.csswg.org/css-display
This commit is contained in:
@@ -22,7 +22,7 @@ HTMLBRElement::~HTMLBRElement()
|
||||
RefPtr<Layout::Node> HTMLBRElement::create_layout_node()
|
||||
{
|
||||
auto style = document().style_computer().compute_style(*this);
|
||||
if (style->display() == CSS::Display::None)
|
||||
if (style->display().is_none())
|
||||
return nullptr;
|
||||
return adopt_ref(*new Layout::BreakNode(document(), *this, move(style)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user