diff options
author | Andreas Kling <kling@serenityos.org> | 2020-07-26 17:16:18 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-07-26 17:51:00 +0200 |
commit | 71556e39a461e045015fa28a984c1649c9d15b83 (patch) | |
tree | 26669f0d6ab67b859680930df2ccca9875fe9f69 /Libraries/LibWeb/HTML/HTMLBodyElement.h | |
parent | fe6474e69273a033a22f7961228b75a9eb967ab7 (diff) | |
download | serenity-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.h | 8 |
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() |