From 0d402a074b9312c3b9bada17187670b163d262da Mon Sep 17 00:00:00 2001 From: Matrix89 Date: Sun, 5 Jan 2020 17:09:12 +0100 Subject: [PATCH] LibHTML: Make the Element::computed_style() return NonnullRefPtr Because Element::computed_style() can never retrun null we can return NonnullRefPtr instead of RefPtr. --- Libraries/LibHTML/DOM/Element.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/LibHTML/DOM/Element.cpp b/Libraries/LibHTML/DOM/Element.cpp index 013e0f5699..c0e769efe1 100644 --- a/Libraries/LibHTML/DOM/Element.cpp +++ b/Libraries/LibHTML/DOM/Element.cpp @@ -163,7 +163,7 @@ void Element::recompute_style() } } -RefPtr Element::computed_style() +NonnullRefPtr Element::computed_style() { auto properties = m_resolved_style->clone(); if (layout_node() && layout_node()->has_style()) {