mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:48:14 +00:00
LibWeb: Switch to using AK::is and AK::downcast
This commit is contained in:
parent
fe6474e692
commit
71556e39a4
73 changed files with 249 additions and 433 deletions
|
@ -63,15 +63,13 @@ protected:
|
|||
|
||||
}
|
||||
|
||||
namespace Web {
|
||||
|
||||
template<>
|
||||
inline bool is<SVG::SVGGraphicsElement>(const Node& node)
|
||||
AK_BEGIN_TYPE_TRAITS(Web::SVG::SVGGraphicsElement)
|
||||
static bool is_type(const Web::Node& node)
|
||||
{
|
||||
if (!is<Element>(node))
|
||||
if (!is<Web::Element>(node))
|
||||
return false;
|
||||
|
||||
auto tag_name = to<Element>(node).tag_name();
|
||||
auto tag_name = downcast<Web::Element>(node).tag_name();
|
||||
|
||||
#define __ENUMERATE_SVG_TAG(name) \
|
||||
if (tag_name == #name) \
|
||||
|
@ -81,5 +79,4 @@ inline bool is<SVG::SVGGraphicsElement>(const Node& node)
|
|||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue