mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-24 02:09:28 +00:00
LibWeb: Switch to using AK::is and AK::downcast
This commit is contained in:
@@ -42,10 +42,8 @@ public:
|
||||
String name() const { return attribute(HTML::AttributeNames::name); }
|
||||
};
|
||||
|
||||
template<>
|
||||
inline bool is<HTMLInputElement>(const Node& node)
|
||||
{
|
||||
return is<Element>(node) && to<Element>(node).local_name() == HTML::TagNames::input;
|
||||
}
|
||||
|
||||
}
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTMLInputElement)
|
||||
static bool is_type(const Web::Node& node) { return node.is_html_element() && downcast<Web::HTMLElement>(node).local_name() == Web::HTML::TagNames::input; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
||||
Reference in New Issue
Block a user