diff options
author | Andreas Kling <kling@serenityos.org> | 2021-10-06 17:57:44 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-10-06 19:12:52 +0200 |
commit | 85a07721471a79c4a19c3bd86f75bda8370ed075 (patch) | |
tree | f88822fed5a14807f3fcf3d057fa25cd81670f9e /Userland/Libraries/LibWeb/HTML/HTMLCanvasElement.cpp | |
parent | 1552873275bbadaa8e99c7d9023d734ece67feb9 (diff) | |
download | serenity-85a07721471a79c4a19c3bd86f75bda8370ed075.zip |
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
Diffstat (limited to 'Userland/Libraries/LibWeb/HTML/HTMLCanvasElement.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/HTML/HTMLCanvasElement.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/HTMLCanvasElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLCanvasElement.cpp index 0b70f6983b..f3773c315b 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLCanvasElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLCanvasElement.cpp @@ -40,7 +40,7 @@ unsigned HTMLCanvasElement::height() const RefPtr<Layout::Node> HTMLCanvasElement::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::CanvasBox(document(), *this, move(style))); } |