mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:17:35 +00:00
AK+LibGUI+LibWeb: Remove AK::TypeTraits in favor of RTTI-based helpers
Now that we have RTTI in userspace, we can do away with all this manual hackery and use dynamic_cast. We keep the is<T> and downcast<T> helpers since they still provide good readability improvements. Note that unlike dynamic_cast<T>, downcast<T> does not fail in a recoverable way, but will assert if the object being casted is not a T.
This commit is contained in:
parent
7c3b6b10e4
commit
865f524d5b
116 changed files with 5 additions and 494 deletions
|
@ -44,7 +44,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLAnchorElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_element() && downcast<Web::DOM::Element>(node).local_name() == Web::HTML::TagNames::a; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -39,7 +39,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLAreaElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::area; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -39,7 +39,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLAudioElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::audio; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -41,7 +41,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLBRElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_element() && downcast<Web::DOM::Element>(node).local_name() == Web::HTML::TagNames::br; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -39,7 +39,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLBaseElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::base; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -43,7 +43,3 @@ private:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLBlinkElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_element() && downcast<Web::DOM::Element>(node).local_name() == Web::HTML::TagNames::blink; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -45,7 +45,3 @@ private:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLBodyElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_element() && downcast<Web::DOM::Element>(node).local_name() == Web::HTML::TagNames::body; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -39,7 +39,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLButtonElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::button; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -56,7 +56,3 @@ private:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLCanvasElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_element() && downcast<Web::DOM::Element>(node).local_name() == Web::HTML::TagNames::canvas; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -39,7 +39,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLDListElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::dl; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -39,7 +39,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLDataElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::data; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -39,7 +39,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLDataListElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::datalist; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -39,7 +39,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLDetailsElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::details; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -39,7 +39,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLDialogElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::dialog; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -40,7 +40,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLDirectoryElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::dir; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -39,7 +39,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLDivElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::div; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -60,7 +60,3 @@ private:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element(); }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -39,7 +39,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLEmbedElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::embed; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -45,7 +45,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLFieldSetElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::fieldset; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -41,7 +41,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLFontElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_element() && downcast<Web::DOM::Element>(node).local_name() == Web::HTML::TagNames::font; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -51,7 +51,3 @@ private:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLFormElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::form; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -40,7 +40,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLFrameElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::frame; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -40,7 +40,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLFrameSetElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::frameset; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -39,7 +39,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLHRElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::hr; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -39,7 +39,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLHeadElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_element() && downcast<Web::DOM::Element>(node).local_name() == Web::HTML::TagNames::head; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -39,7 +39,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLHeadingElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name().is_one_of(Web::HTML::TagNames::h1, Web::HTML::TagNames::h2, Web::HTML::TagNames::h3, Web::HTML::TagNames::h4, Web::HTML::TagNames::h5, Web::HTML::TagNames::h6); }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -39,7 +39,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLHtmlElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::html; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -58,7 +58,3 @@ private:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLIFrameElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::iframe; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -59,7 +59,3 @@ private:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLImageElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_element() && downcast<Web::DOM::Element>(node).local_name() == Web::HTML::TagNames::img; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -55,7 +55,3 @@ private:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLInputElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::input; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -39,7 +39,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLLIElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::li; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -39,7 +39,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLLabelElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::label; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -39,7 +39,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLLegendElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::legend; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -67,7 +67,3 @@ private:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLLinkElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::link; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -39,7 +39,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLMapElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::map; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -40,7 +40,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLMarqueeElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::marquee; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -39,7 +39,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLMediaElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name().is_one_of(Web::HTML::TagNames::audio, Web::HTML::TagNames::video); }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -39,7 +39,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLMenuElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::menu; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -39,7 +39,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLMetaElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::meta; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -39,7 +39,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLMeterElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::meter; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -39,7 +39,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLModElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name().is_one_of(Web::HTML::TagNames::ins, Web::HTML::TagNames::del); }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -39,7 +39,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLOListElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::ol; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -53,7 +53,3 @@ private:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLObjectElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_element() && downcast<Web::DOM::Element>(node).local_name() == Web::HTML::TagNames::object; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -39,7 +39,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLOptGroupElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::optgroup; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -39,7 +39,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLOptionElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::option; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -45,7 +45,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLOutputElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::output; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -39,7 +39,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLParagraphElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::p; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -39,7 +39,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLParamElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::param; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -39,7 +39,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLPictureElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::picture; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -39,7 +39,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLPreElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name().is_one_of(Web::HTML::TagNames::pre, Web::HTML::TagNames::listing, Web::HTML::TagNames::xmp); }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -39,7 +39,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLProgressElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::progress; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -39,7 +39,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLQuoteElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name().is_one_of(Web::HTML::TagNames::blockquote, Web::HTML::TagNames::q); }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -68,7 +68,3 @@ private:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLScriptElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::script; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -39,7 +39,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLSelectElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::select; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -39,7 +39,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLSlotElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::slot; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -39,7 +39,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLSourceElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::source; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -39,7 +39,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLSpanElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::span; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -45,7 +45,3 @@ private:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLStyleElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::style; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -39,7 +39,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLTableCaptionElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::caption; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -42,7 +42,3 @@ private:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLTableCellElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name().is_one_of(Web::HTML::TagNames::td, Web::HTML::TagNames::th); }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -39,7 +39,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLTableColElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name().is_one_of(Web::HTML::TagNames::colgroup, Web::HTML::TagNames::col); }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -42,7 +42,3 @@ private:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLTableElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::table; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -39,7 +39,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLTableRowElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::tr; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -39,7 +39,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLTableSectionElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name().is_one_of(Web::HTML::TagNames::tbody, Web::HTML::TagNames::thead, Web::HTML::TagNames::tfoot); }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -48,7 +48,3 @@ private:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLTemplateElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::template_; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -45,7 +45,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLTextAreaElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::textarea; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -39,7 +39,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLTimeElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::time; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -42,7 +42,3 @@ private:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLTitleElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::title; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -39,7 +39,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLTrackElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::track; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -39,7 +39,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLUListElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::ul; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -42,7 +42,3 @@ private:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLUnknownElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_unknown_html_element(); }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -39,7 +39,3 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLVideoElement)
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::video; }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue