mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 20:17:13 +02:00
LibWeb: Switch to using AK::is and AK::downcast
This commit is contained in:
Notes:
sideshowbarker
2024-07-19 04:36:12 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/71556e39a46
@@ -51,10 +51,8 @@ private:
|
||||
RefPtr<Frame> m_hosted_frame;
|
||||
};
|
||||
|
||||
template<>
|
||||
inline bool is<HTMLIFrameElement>(const Node& node)
|
||||
{
|
||||
return is<Element>(node) && to<Element>(node).local_name() == HTML::TagNames::iframe;
|
||||
}
|
||||
|
||||
}
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTMLIFrameElement)
|
||||
static bool is_type(const Web::Node& node) { return node.is_html_element() && downcast<Web::HTMLElement>(node).local_name() == Web::HTML::TagNames::iframe; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
||||
Reference in New Issue
Block a user