mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 22:38:51 +00:00
LibWeb: Add CSS::Display enum and StyleProperties::display()
The display property is not interesting after we've built the layout tree, so we don't have to move it into LayoutStyle.
This commit is contained in:
parent
5d86305a72
commit
bc178ee743
Notes:
sideshowbarker
2024-07-19 05:24:28 +09:00
Author: https://github.com/awesomekling
Commit: bc178ee743
8 changed files with 55 additions and 23 deletions
|
@ -71,8 +71,7 @@ void HTMLImageElement::parse_attribute(const FlyString& name, const String& valu
|
|||
RefPtr<LayoutNode> HTMLImageElement::create_layout_node(const StyleProperties* parent_style) const
|
||||
{
|
||||
auto style = document().style_resolver().resolve_style(*this, parent_style);
|
||||
auto display = style->string_or_fallback(CSS::PropertyID::Display, "inline");
|
||||
if (display == "none")
|
||||
if (style->display() == CSS::Display::None)
|
||||
return nullptr;
|
||||
return adopt(*new LayoutImage(*this, move(style), m_image_loader));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue