summaryrefslogtreecommitdiff
path: root/Libraries/LibWeb/HTML/HTMLBodyElement.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-07-26 17:16:18 +0200
committerAndreas Kling <kling@serenityos.org>2020-07-26 17:51:00 +0200
commit71556e39a461e045015fa28a984c1649c9d15b83 (patch)
tree26669f0d6ab67b859680930df2ccca9875fe9f69 /Libraries/LibWeb/HTML/HTMLBodyElement.h
parentfe6474e69273a033a22f7961228b75a9eb967ab7 (diff)
downloadserenity-71556e39a461e045015fa28a984c1649c9d15b83.zip
LibWeb: Switch to using AK::is and AK::downcast
Diffstat (limited to 'Libraries/LibWeb/HTML/HTMLBodyElement.h')
-rw-r--r--Libraries/LibWeb/HTML/HTMLBodyElement.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/Libraries/LibWeb/HTML/HTMLBodyElement.h b/Libraries/LibWeb/HTML/HTMLBodyElement.h
index 4c872cefda..66b3fe2133 100644
--- a/Libraries/LibWeb/HTML/HTMLBodyElement.h
+++ b/Libraries/LibWeb/HTML/HTMLBodyElement.h
@@ -42,10 +42,8 @@ private:
RefPtr<ImageStyleValue> m_background_style_value;
};
-template<>
-inline bool is<HTMLBodyElement>(const Node& node)
-{
- return is<Element>(node) && to<Element>(node).local_name() == HTML::TagNames::body;
}
-}
+AK_BEGIN_TYPE_TRAITS(Web::HTMLBodyElement)
+static bool is_type(const Web::Node& node) { return node.is_element() && downcast<Web::Element>(node).local_name() == Web::HTML::TagNames::body; }
+AK_END_TYPE_TRAITS()