mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-05 23:35:33 +00:00
LibWeb: Make DOM::Node::create_layout_node() not need parent's style
The StyleResolver can find the specified CSS values for the parent element via the DOM. Forcing everyone to locate specified values for their parent was completely unnecessary.
This commit is contained in:
@@ -61,12 +61,12 @@ void HTMLObjectElement::parse_attribute(const FlyString& name, const String& val
|
||||
m_image_loader.load(document().complete_url(value));
|
||||
}
|
||||
|
||||
RefPtr<Layout::Node> HTMLObjectElement::create_layout_node(const CSS::StyleProperties* parent_style)
|
||||
RefPtr<Layout::Node> HTMLObjectElement::create_layout_node()
|
||||
{
|
||||
if (m_should_show_fallback_content)
|
||||
return HTMLElement::create_layout_node(parent_style);
|
||||
return HTMLElement::create_layout_node();
|
||||
|
||||
auto style = document().style_resolver().resolve_style(*this, parent_style);
|
||||
auto style = document().style_resolver().resolve_style(*this);
|
||||
if (style->display() == CSS::Display::None)
|
||||
return nullptr;
|
||||
if (m_image_loader.has_image())
|
||||
|
||||
Reference in New Issue
Block a user