diff --git a/Libraries/LibHTML/DOM/Element.cpp b/Libraries/LibHTML/DOM/Element.cpp index c0e769efe1..ab0b531b0f 100644 --- a/Libraries/LibHTML/DOM/Element.cpp +++ b/Libraries/LibHTML/DOM/Element.cpp @@ -187,5 +187,5 @@ NonnullRefPtr Element::computed_style() properties->set_property(id, prop.value()); } } - return properties.ptr(); + return properties; } diff --git a/Libraries/LibHTML/DOM/Element.h b/Libraries/LibHTML/DOM/Element.h index e163aa26bc..346f0a3f06 100644 --- a/Libraries/LibHTML/DOM/Element.h +++ b/Libraries/LibHTML/DOM/Element.h @@ -57,7 +57,7 @@ public: String name() const { return attribute("name"); } const StyleProperties* resolved_style() const { return m_resolved_style.ptr(); } - RefPtr computed_style(); + NonnullRefPtr computed_style(); private: RefPtr create_layout_node(const StyleProperties* parent_style) const override;