summaryrefslogtreecommitdiff
path: root/Libraries/LibWeb/HTML/HTMLHeadElement.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/HTMLHeadElement.h
parentfe6474e69273a033a22f7961228b75a9eb967ab7 (diff)
downloadserenity-71556e39a461e045015fa28a984c1649c9d15b83.zip
LibWeb: Switch to using AK::is and AK::downcast
Diffstat (limited to 'Libraries/LibWeb/HTML/HTMLHeadElement.h')
-rw-r--r--Libraries/LibWeb/HTML/HTMLHeadElement.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/Libraries/LibWeb/HTML/HTMLHeadElement.h b/Libraries/LibWeb/HTML/HTMLHeadElement.h
index 9498749c32..050d4db344 100644
--- a/Libraries/LibWeb/HTML/HTMLHeadElement.h
+++ b/Libraries/LibWeb/HTML/HTMLHeadElement.h
@@ -36,10 +36,8 @@ public:
virtual ~HTMLHeadElement() override;
};
-template<>
-inline bool is<HTMLHeadElement>(const Node& node)
-{
- return is<Element>(node) && to<Element>(node).local_name().equals_ignoring_case("head");
}
-}
+AK_BEGIN_TYPE_TRAITS(Web::HTMLHeadElement)
+static bool is_type(const Web::Node& node) { return node.is_element() && downcast<Web::Element>(node).local_name() == Web::HTML::TagNames::head; }
+AK_END_TYPE_TRAITS()