From 865f524d5b1257ec77b2d17b93ec777799b4c4ab Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 1 Jan 2021 15:33:30 +0100 Subject: [PATCH] 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 and downcast helpers since they still provide good readability improvements. Note that unlike dynamic_cast, downcast does not fail in a recoverable way, but will assert if the object being casted is not a T. --- AK/TypeCasts.h | 39 +++---------------- Applications/Spreadsheet/SpreadsheetView.h | 4 -- DevTools/HackStudio/EditorWrapper.h | 4 -- Libraries/LibGUI/AbstractButton.h | 4 -- Libraries/LibGUI/Action.h | 4 -- Libraries/LibGUI/RadioButton.h | 4 -- Libraries/LibGUI/Widget.h | 4 -- Libraries/LibGUI/Window.h | 4 -- Libraries/LibWeb/Bindings/WindowObject.h | 4 -- Libraries/LibWeb/DOM/CharacterData.h | 4 -- Libraries/LibWeb/DOM/Comment.h | 4 -- Libraries/LibWeb/DOM/Document.h | 4 -- Libraries/LibWeb/DOM/DocumentFragment.h | 4 -- Libraries/LibWeb/DOM/DocumentType.h | 4 -- Libraries/LibWeb/DOM/Element.h | 4 -- Libraries/LibWeb/DOM/Node.h | 4 -- Libraries/LibWeb/DOM/ParentNode.h | 4 -- Libraries/LibWeb/DOM/ShadowRoot.h | 4 -- Libraries/LibWeb/DOM/Text.h | 4 -- Libraries/LibWeb/DOM/Window.h | 4 -- Libraries/LibWeb/HTML/HTMLAnchorElement.h | 4 -- Libraries/LibWeb/HTML/HTMLAreaElement.h | 4 -- Libraries/LibWeb/HTML/HTMLAudioElement.h | 4 -- Libraries/LibWeb/HTML/HTMLBRElement.h | 4 -- Libraries/LibWeb/HTML/HTMLBaseElement.h | 4 -- Libraries/LibWeb/HTML/HTMLBlinkElement.h | 4 -- Libraries/LibWeb/HTML/HTMLBodyElement.h | 4 -- Libraries/LibWeb/HTML/HTMLButtonElement.h | 4 -- Libraries/LibWeb/HTML/HTMLCanvasElement.h | 4 -- Libraries/LibWeb/HTML/HTMLDListElement.h | 4 -- Libraries/LibWeb/HTML/HTMLDataElement.h | 4 -- Libraries/LibWeb/HTML/HTMLDataListElement.h | 4 -- Libraries/LibWeb/HTML/HTMLDetailsElement.h | 4 -- Libraries/LibWeb/HTML/HTMLDialogElement.h | 4 -- Libraries/LibWeb/HTML/HTMLDirectoryElement.h | 4 -- Libraries/LibWeb/HTML/HTMLDivElement.h | 4 -- Libraries/LibWeb/HTML/HTMLElement.h | 4 -- Libraries/LibWeb/HTML/HTMLEmbedElement.h | 4 -- Libraries/LibWeb/HTML/HTMLFieldSetElement.h | 4 -- Libraries/LibWeb/HTML/HTMLFontElement.h | 4 -- Libraries/LibWeb/HTML/HTMLFormElement.h | 4 -- Libraries/LibWeb/HTML/HTMLFrameElement.h | 4 -- Libraries/LibWeb/HTML/HTMLFrameSetElement.h | 4 -- Libraries/LibWeb/HTML/HTMLHRElement.h | 4 -- Libraries/LibWeb/HTML/HTMLHeadElement.h | 4 -- Libraries/LibWeb/HTML/HTMLHeadingElement.h | 4 -- Libraries/LibWeb/HTML/HTMLHtmlElement.h | 4 -- Libraries/LibWeb/HTML/HTMLIFrameElement.h | 4 -- Libraries/LibWeb/HTML/HTMLImageElement.h | 4 -- Libraries/LibWeb/HTML/HTMLInputElement.h | 4 -- Libraries/LibWeb/HTML/HTMLLIElement.h | 4 -- Libraries/LibWeb/HTML/HTMLLabelElement.h | 4 -- Libraries/LibWeb/HTML/HTMLLegendElement.h | 4 -- Libraries/LibWeb/HTML/HTMLLinkElement.h | 4 -- Libraries/LibWeb/HTML/HTMLMapElement.h | 4 -- Libraries/LibWeb/HTML/HTMLMarqueeElement.h | 4 -- Libraries/LibWeb/HTML/HTMLMediaElement.h | 4 -- Libraries/LibWeb/HTML/HTMLMenuElement.h | 4 -- Libraries/LibWeb/HTML/HTMLMetaElement.h | 4 -- Libraries/LibWeb/HTML/HTMLMeterElement.h | 4 -- Libraries/LibWeb/HTML/HTMLModElement.h | 4 -- Libraries/LibWeb/HTML/HTMLOListElement.h | 4 -- Libraries/LibWeb/HTML/HTMLObjectElement.h | 4 -- Libraries/LibWeb/HTML/HTMLOptGroupElement.h | 4 -- Libraries/LibWeb/HTML/HTMLOptionElement.h | 4 -- Libraries/LibWeb/HTML/HTMLOutputElement.h | 4 -- Libraries/LibWeb/HTML/HTMLParagraphElement.h | 4 -- Libraries/LibWeb/HTML/HTMLParamElement.h | 4 -- Libraries/LibWeb/HTML/HTMLPictureElement.h | 4 -- Libraries/LibWeb/HTML/HTMLPreElement.h | 4 -- Libraries/LibWeb/HTML/HTMLProgressElement.h | 4 -- Libraries/LibWeb/HTML/HTMLQuoteElement.h | 4 -- Libraries/LibWeb/HTML/HTMLScriptElement.h | 4 -- Libraries/LibWeb/HTML/HTMLSelectElement.h | 4 -- Libraries/LibWeb/HTML/HTMLSlotElement.h | 4 -- Libraries/LibWeb/HTML/HTMLSourceElement.h | 4 -- Libraries/LibWeb/HTML/HTMLSpanElement.h | 4 -- Libraries/LibWeb/HTML/HTMLStyleElement.h | 4 -- .../LibWeb/HTML/HTMLTableCaptionElement.h | 4 -- Libraries/LibWeb/HTML/HTMLTableCellElement.h | 4 -- Libraries/LibWeb/HTML/HTMLTableColElement.h | 4 -- Libraries/LibWeb/HTML/HTMLTableElement.h | 4 -- Libraries/LibWeb/HTML/HTMLTableRowElement.h | 4 -- .../LibWeb/HTML/HTMLTableSectionElement.h | 4 -- Libraries/LibWeb/HTML/HTMLTemplateElement.h | 4 -- Libraries/LibWeb/HTML/HTMLTextAreaElement.h | 4 -- Libraries/LibWeb/HTML/HTMLTimeElement.h | 4 -- Libraries/LibWeb/HTML/HTMLTitleElement.h | 4 -- Libraries/LibWeb/HTML/HTMLTrackElement.h | 4 -- Libraries/LibWeb/HTML/HTMLUListElement.h | 4 -- Libraries/LibWeb/HTML/HTMLUnknownElement.h | 4 -- Libraries/LibWeb/HTML/HTMLVideoElement.h | 4 -- Libraries/LibWeb/Layout/BlockBox.h | 4 -- Libraries/LibWeb/Layout/Box.h | 4 -- Libraries/LibWeb/Layout/BreakNode.h | 4 -- Libraries/LibWeb/Layout/ButtonBox.h | 4 -- Libraries/LibWeb/Layout/CanvasBox.h | 4 -- Libraries/LibWeb/Layout/CheckBox.h | 4 -- Libraries/LibWeb/Layout/FrameBox.h | 4 -- Libraries/LibWeb/Layout/ImageBox.h | 4 -- .../LibWeb/Layout/InitialContainingBlockBox.h | 4 -- Libraries/LibWeb/Layout/InlineNode.h | 4 -- Libraries/LibWeb/Layout/ListItemBox.h | 4 -- Libraries/LibWeb/Layout/Node.h | 4 -- Libraries/LibWeb/Layout/ReplacedBox.h | 4 -- Libraries/LibWeb/Layout/TableBox.h | 4 -- Libraries/LibWeb/Layout/TableCellBox.h | 4 -- Libraries/LibWeb/Layout/TableRowBox.h | 4 -- Libraries/LibWeb/Layout/TableRowGroupBox.h | 4 -- Libraries/LibWeb/Layout/TextNode.h | 4 -- Libraries/LibWeb/Layout/WidgetBox.h | 4 -- Libraries/LibWeb/SVG/SVGElement.h | 4 -- Libraries/LibWeb/SVG/SVGGraphicsElement.h | 4 -- Libraries/LibWeb/SVG/SVGPathElement.h | 4 -- Libraries/LibWeb/SVG/SVGSVGElement.h | 4 -- Libraries/LibWeb/UIEvents/MouseEvent.h | 4 -- 116 files changed, 5 insertions(+), 494 deletions(-) diff --git a/AK/TypeCasts.h b/AK/TypeCasts.h index 434da021e6f..c218ba85686 100644 --- a/AK/TypeCasts.h +++ b/AK/TypeCasts.h @@ -30,30 +30,16 @@ namespace AK { -template::value> -struct TypeTraits { - static bool has_type(InputType&) - { - static_assert(IsVoid::value, "No TypeTraits for this type"); - return false; - } -}; - template -struct TypeTraits { - static bool has_type(InputType&) { return true; } -}; +inline bool is(InputType& input) +{ + return dynamic_cast*>(&input); +} template inline bool is(InputType* input) { - return input && TypeTraits::has_type(*input); -} - -template -inline bool is(InputType& input) -{ - return TypeTraits::has_type(input); + return input && is(*input); } template @@ -72,22 +58,7 @@ inline CopyConst& downcast(InputType& input) return static_cast&>(input); } -#define AK_BEGIN_TYPE_TRAITS(ClassName) \ - namespace AK { \ - template \ - class TypeTraits { \ - public: \ - static bool has_type(InputType& input) { return is_type(input); } \ - \ - private: - -#define AK_END_TYPE_TRAITS() \ - } \ - ; \ - } - } using AK::downcast; using AK::is; -using AK::TypeTraits; diff --git a/Applications/Spreadsheet/SpreadsheetView.h b/Applications/Spreadsheet/SpreadsheetView.h index ae1fe2e26ca..bc07d31bc34 100644 --- a/Applications/Spreadsheet/SpreadsheetView.h +++ b/Applications/Spreadsheet/SpreadsheetView.h @@ -166,7 +166,3 @@ private: }; } - -AK_BEGIN_TYPE_TRAITS(Spreadsheet::SpreadsheetView) -static bool is_type(const Core::Object& object) { return !strcmp(object.class_name(), "SpreadsheetView"); } -AK_END_TYPE_TRAITS() diff --git a/DevTools/HackStudio/EditorWrapper.h b/DevTools/HackStudio/EditorWrapper.h index 38f24c0984d..0cf67032a23 100644 --- a/DevTools/HackStudio/EditorWrapper.h +++ b/DevTools/HackStudio/EditorWrapper.h @@ -58,7 +58,3 @@ private: }; } - -AK_BEGIN_TYPE_TRAITS(HackStudio::EditorWrapper) -static bool is_type(const Core::Object& object) { return !strcmp(object.class_name(), "EditorWrapper"); } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibGUI/AbstractButton.h b/Libraries/LibGUI/AbstractButton.h index 5ed4ec24c56..d84ddd4128d 100644 --- a/Libraries/LibGUI/AbstractButton.h +++ b/Libraries/LibGUI/AbstractButton.h @@ -87,7 +87,3 @@ private: }; } - -AK_BEGIN_TYPE_TRAITS(GUI::AbstractButton) -static bool is_type(const Core::Object& object) { return is(object) && downcast(object).is_abstract_button(); } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibGUI/Action.h b/Libraries/LibGUI/Action.h index 8b1f9f4d1db..e0ab724b79f 100644 --- a/Libraries/LibGUI/Action.h +++ b/Libraries/LibGUI/Action.h @@ -172,7 +172,3 @@ private: }; } - -AK_BEGIN_TYPE_TRAITS(GUI::Action) -static bool is_type(const Core::Object& object) { return object.is_action(); } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibGUI/RadioButton.h b/Libraries/LibGUI/RadioButton.h index aaaedd91854..0105953eb21 100644 --- a/Libraries/LibGUI/RadioButton.h +++ b/Libraries/LibGUI/RadioButton.h @@ -53,7 +53,3 @@ private: }; } - -AK_BEGIN_TYPE_TRAITS(GUI::RadioButton) -static bool is_type(const Core::Object& object) { return is(object) && downcast(object).is_radio_button(); } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibGUI/Widget.h b/Libraries/LibGUI/Widget.h index d02ece1a0bf..b54654f72db 100644 --- a/Libraries/LibGUI/Widget.h +++ b/Libraries/LibGUI/Widget.h @@ -399,7 +399,3 @@ inline const Widget* Widget::parent_widget() const return nullptr; } } - -AK_BEGIN_TYPE_TRAITS(GUI::Widget) -static bool is_type(const Core::Object& object) { return object.is_widget(); } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibGUI/Window.h b/Libraries/LibGUI/Window.h index b13933c268b..ac9665b859d 100644 --- a/Libraries/LibGUI/Window.h +++ b/Libraries/LibGUI/Window.h @@ -267,7 +267,3 @@ private: }; } - -AK_BEGIN_TYPE_TRAITS(GUI::Window) -static bool is_type(const Core::Object& object) { return object.is_window(); } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/Bindings/WindowObject.h b/Libraries/LibWeb/Bindings/WindowObject.h index 729363d3b13..d68a3364c97 100644 --- a/Libraries/LibWeb/Bindings/WindowObject.h +++ b/Libraries/LibWeb/Bindings/WindowObject.h @@ -86,7 +86,3 @@ private: } } - -AK_BEGIN_TYPE_TRAITS(Web::Bindings::WindowObject) -static bool is_type(const JS::GlobalObject& global) { return String(global.class_name()) == "WindowObject"; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/DOM/CharacterData.h b/Libraries/LibWeb/DOM/CharacterData.h index 9204487e27a..de09340e413 100644 --- a/Libraries/LibWeb/DOM/CharacterData.h +++ b/Libraries/LibWeb/DOM/CharacterData.h @@ -55,7 +55,3 @@ private: }; } - -AK_BEGIN_TYPE_TRAITS(Web::DOM::CharacterData) -static bool is_type(const Web::DOM::Node& node) { return node.is_character_data(); } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/DOM/Comment.h b/Libraries/LibWeb/DOM/Comment.h index 855c710ded9..4ab3bfbedbd 100644 --- a/Libraries/LibWeb/DOM/Comment.h +++ b/Libraries/LibWeb/DOM/Comment.h @@ -42,7 +42,3 @@ public: }; } - -AK_BEGIN_TYPE_TRAITS(Web::DOM::Comment) -static bool is_type(const Web::DOM::Node& node) { return node.is_comment(); } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/DOM/Document.h b/Libraries/LibWeb/DOM/Document.h index 8434beeb8ef..23615d55a52 100644 --- a/Libraries/LibWeb/DOM/Document.h +++ b/Libraries/LibWeb/DOM/Document.h @@ -291,7 +291,3 @@ private: }; } - -AK_BEGIN_TYPE_TRAITS(Web::DOM::Document) -static bool is_type(const Web::DOM::Node& node) { return node.is_document(); } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/DOM/DocumentFragment.h b/Libraries/LibWeb/DOM/DocumentFragment.h index fa5982a1345..b5dbc816997 100644 --- a/Libraries/LibWeb/DOM/DocumentFragment.h +++ b/Libraries/LibWeb/DOM/DocumentFragment.h @@ -54,7 +54,3 @@ private: }; } - -AK_BEGIN_TYPE_TRAITS(Web::DOM::DocumentFragment) -static bool is_type(const Web::DOM::Node& node) { return node.is_document_fragment(); } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/DOM/DocumentType.h b/Libraries/LibWeb/DOM/DocumentType.h index 930cd8229aa..ffc4d821504 100644 --- a/Libraries/LibWeb/DOM/DocumentType.h +++ b/Libraries/LibWeb/DOM/DocumentType.h @@ -56,7 +56,3 @@ private: }; } - -AK_BEGIN_TYPE_TRAITS(Web::DOM::DocumentType) -static bool is_type(const Web::DOM::Node& node) { return node.type() == Web::DOM::NodeType::DOCUMENT_TYPE_NODE; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/DOM/Element.h b/Libraries/LibWeb/DOM/Element.h index 45b18ef0e2c..4f93ce615b7 100644 --- a/Libraries/LibWeb/DOM/Element.h +++ b/Libraries/LibWeb/DOM/Element.h @@ -116,7 +116,3 @@ private: }; } - -AK_BEGIN_TYPE_TRAITS(Web::DOM::Element) -static bool is_type(const Web::DOM::Node& node) { return node.is_element(); } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/DOM/Node.h b/Libraries/LibWeb/DOM/Node.h index 7fc2b9bbaaf..2b0d36382b1 100644 --- a/Libraries/LibWeb/DOM/Node.h +++ b/Libraries/LibWeb/DOM/Node.h @@ -162,7 +162,3 @@ protected: }; } - -AK_BEGIN_TYPE_TRAITS(Web::DOM::Node) -static bool is_type(const Web::DOM::EventTarget& event_target) { return event_target.is_node(); } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/DOM/ParentNode.h b/Libraries/LibWeb/DOM/ParentNode.h index cf8aa6ec865..0fa6e8f1fe4 100644 --- a/Libraries/LibWeb/DOM/ParentNode.h +++ b/Libraries/LibWeb/DOM/ParentNode.h @@ -66,7 +66,3 @@ inline void ParentNode::for_each_child(Callback callback) } } - -AK_BEGIN_TYPE_TRAITS(Web::DOM::ParentNode) -static bool is_type(const Web::DOM::Node& node) { return node.is_parent_node(); } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/DOM/ShadowRoot.h b/Libraries/LibWeb/DOM/ShadowRoot.h index 878a2ab477a..455b47723d9 100644 --- a/Libraries/LibWeb/DOM/ShadowRoot.h +++ b/Libraries/LibWeb/DOM/ShadowRoot.h @@ -59,7 +59,3 @@ private: }; } - -AK_BEGIN_TYPE_TRAITS(Web::DOM::ShadowRoot) -static bool is_type(const Web::DOM::Node& node) { return node.is_shadow_root(); } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/DOM/Text.h b/Libraries/LibWeb/DOM/Text.h index 1b73543974d..5ee7595561b 100644 --- a/Libraries/LibWeb/DOM/Text.h +++ b/Libraries/LibWeb/DOM/Text.h @@ -46,7 +46,3 @@ private: }; } - -AK_BEGIN_TYPE_TRAITS(Web::DOM::Text) -static bool is_type(const Web::DOM::Node& node) { return node.is_text(); } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/DOM/Window.h b/Libraries/LibWeb/DOM/Window.h index 4339a1dfda4..862c2a97208 100644 --- a/Libraries/LibWeb/DOM/Window.h +++ b/Libraries/LibWeb/DOM/Window.h @@ -98,7 +98,3 @@ private: }; } - -AK_BEGIN_TYPE_TRAITS(Web::DOM::Window) -static bool is_type(const Web::DOM::EventTarget& event_target) { return event_target.is_window(); } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLAnchorElement.h b/Libraries/LibWeb/HTML/HTMLAnchorElement.h index 810f0be493f..02d73491169 100644 --- a/Libraries/LibWeb/HTML/HTMLAnchorElement.h +++ b/Libraries/LibWeb/HTML/HTMLAnchorElement.h @@ -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(node).local_name() == Web::HTML::TagNames::a; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLAreaElement.h b/Libraries/LibWeb/HTML/HTMLAreaElement.h index 005885ceac8..29fa82ffa09 100644 --- a/Libraries/LibWeb/HTML/HTMLAreaElement.h +++ b/Libraries/LibWeb/HTML/HTMLAreaElement.h @@ -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(node).local_name() == Web::HTML::TagNames::area; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLAudioElement.h b/Libraries/LibWeb/HTML/HTMLAudioElement.h index 87fed688895..ce6a43b0211 100644 --- a/Libraries/LibWeb/HTML/HTMLAudioElement.h +++ b/Libraries/LibWeb/HTML/HTMLAudioElement.h @@ -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(node).local_name() == Web::HTML::TagNames::audio; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLBRElement.h b/Libraries/LibWeb/HTML/HTMLBRElement.h index 8a6cd816414..086900e79f7 100644 --- a/Libraries/LibWeb/HTML/HTMLBRElement.h +++ b/Libraries/LibWeb/HTML/HTMLBRElement.h @@ -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(node).local_name() == Web::HTML::TagNames::br; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLBaseElement.h b/Libraries/LibWeb/HTML/HTMLBaseElement.h index c1918513037..ce2be21e0dc 100644 --- a/Libraries/LibWeb/HTML/HTMLBaseElement.h +++ b/Libraries/LibWeb/HTML/HTMLBaseElement.h @@ -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(node).local_name() == Web::HTML::TagNames::base; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLBlinkElement.h b/Libraries/LibWeb/HTML/HTMLBlinkElement.h index 8178b0a568c..e4c4c3421fd 100644 --- a/Libraries/LibWeb/HTML/HTMLBlinkElement.h +++ b/Libraries/LibWeb/HTML/HTMLBlinkElement.h @@ -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(node).local_name() == Web::HTML::TagNames::blink; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLBodyElement.h b/Libraries/LibWeb/HTML/HTMLBodyElement.h index 7b06d5de457..d8d41cbb7b9 100644 --- a/Libraries/LibWeb/HTML/HTMLBodyElement.h +++ b/Libraries/LibWeb/HTML/HTMLBodyElement.h @@ -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(node).local_name() == Web::HTML::TagNames::body; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLButtonElement.h b/Libraries/LibWeb/HTML/HTMLButtonElement.h index 0b54bd6c8f8..234656a97d1 100644 --- a/Libraries/LibWeb/HTML/HTMLButtonElement.h +++ b/Libraries/LibWeb/HTML/HTMLButtonElement.h @@ -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(node).local_name() == Web::HTML::TagNames::button; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLCanvasElement.h b/Libraries/LibWeb/HTML/HTMLCanvasElement.h index 4bcb8b09140..7e114761e05 100644 --- a/Libraries/LibWeb/HTML/HTMLCanvasElement.h +++ b/Libraries/LibWeb/HTML/HTMLCanvasElement.h @@ -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(node).local_name() == Web::HTML::TagNames::canvas; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLDListElement.h b/Libraries/LibWeb/HTML/HTMLDListElement.h index 5e86254ce6e..cf0fe2a9c2b 100644 --- a/Libraries/LibWeb/HTML/HTMLDListElement.h +++ b/Libraries/LibWeb/HTML/HTMLDListElement.h @@ -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(node).local_name() == Web::HTML::TagNames::dl; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLDataElement.h b/Libraries/LibWeb/HTML/HTMLDataElement.h index 5aa2143789a..21918958cd0 100644 --- a/Libraries/LibWeb/HTML/HTMLDataElement.h +++ b/Libraries/LibWeb/HTML/HTMLDataElement.h @@ -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(node).local_name() == Web::HTML::TagNames::data; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLDataListElement.h b/Libraries/LibWeb/HTML/HTMLDataListElement.h index 72c5b2e423c..85bc7ccf7d2 100644 --- a/Libraries/LibWeb/HTML/HTMLDataListElement.h +++ b/Libraries/LibWeb/HTML/HTMLDataListElement.h @@ -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(node).local_name() == Web::HTML::TagNames::datalist; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLDetailsElement.h b/Libraries/LibWeb/HTML/HTMLDetailsElement.h index 81a0fc31425..2bdbf673f80 100644 --- a/Libraries/LibWeb/HTML/HTMLDetailsElement.h +++ b/Libraries/LibWeb/HTML/HTMLDetailsElement.h @@ -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(node).local_name() == Web::HTML::TagNames::details; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLDialogElement.h b/Libraries/LibWeb/HTML/HTMLDialogElement.h index 3c8f6371287..133f65ddbd5 100644 --- a/Libraries/LibWeb/HTML/HTMLDialogElement.h +++ b/Libraries/LibWeb/HTML/HTMLDialogElement.h @@ -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(node).local_name() == Web::HTML::TagNames::dialog; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLDirectoryElement.h b/Libraries/LibWeb/HTML/HTMLDirectoryElement.h index f7335e80935..39a9f5ae94d 100644 --- a/Libraries/LibWeb/HTML/HTMLDirectoryElement.h +++ b/Libraries/LibWeb/HTML/HTMLDirectoryElement.h @@ -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(node).local_name() == Web::HTML::TagNames::dir; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLDivElement.h b/Libraries/LibWeb/HTML/HTMLDivElement.h index 9b5f12c8518..eade002544c 100644 --- a/Libraries/LibWeb/HTML/HTMLDivElement.h +++ b/Libraries/LibWeb/HTML/HTMLDivElement.h @@ -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(node).local_name() == Web::HTML::TagNames::div; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLElement.h b/Libraries/LibWeb/HTML/HTMLElement.h index 7d1dd4fd102..aa041cdc453 100644 --- a/Libraries/LibWeb/HTML/HTMLElement.h +++ b/Libraries/LibWeb/HTML/HTMLElement.h @@ -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() diff --git a/Libraries/LibWeb/HTML/HTMLEmbedElement.h b/Libraries/LibWeb/HTML/HTMLEmbedElement.h index 6d3a37f17cf..1ceaaae6347 100644 --- a/Libraries/LibWeb/HTML/HTMLEmbedElement.h +++ b/Libraries/LibWeb/HTML/HTMLEmbedElement.h @@ -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(node).local_name() == Web::HTML::TagNames::embed; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLFieldSetElement.h b/Libraries/LibWeb/HTML/HTMLFieldSetElement.h index edb5f7f1f4b..b9ffcf43be0 100644 --- a/Libraries/LibWeb/HTML/HTMLFieldSetElement.h +++ b/Libraries/LibWeb/HTML/HTMLFieldSetElement.h @@ -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(node).local_name() == Web::HTML::TagNames::fieldset; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLFontElement.h b/Libraries/LibWeb/HTML/HTMLFontElement.h index 2051cef7c80..d414abc5a85 100644 --- a/Libraries/LibWeb/HTML/HTMLFontElement.h +++ b/Libraries/LibWeb/HTML/HTMLFontElement.h @@ -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(node).local_name() == Web::HTML::TagNames::font; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLFormElement.h b/Libraries/LibWeb/HTML/HTMLFormElement.h index cc0a275998c..8f90e8f3f79 100644 --- a/Libraries/LibWeb/HTML/HTMLFormElement.h +++ b/Libraries/LibWeb/HTML/HTMLFormElement.h @@ -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(node).local_name() == Web::HTML::TagNames::form; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLFrameElement.h b/Libraries/LibWeb/HTML/HTMLFrameElement.h index 2e75cd527df..7541bc80b5c 100644 --- a/Libraries/LibWeb/HTML/HTMLFrameElement.h +++ b/Libraries/LibWeb/HTML/HTMLFrameElement.h @@ -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(node).local_name() == Web::HTML::TagNames::frame; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLFrameSetElement.h b/Libraries/LibWeb/HTML/HTMLFrameSetElement.h index 3bcd8aece9c..0c2af016787 100644 --- a/Libraries/LibWeb/HTML/HTMLFrameSetElement.h +++ b/Libraries/LibWeb/HTML/HTMLFrameSetElement.h @@ -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(node).local_name() == Web::HTML::TagNames::frameset; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLHRElement.h b/Libraries/LibWeb/HTML/HTMLHRElement.h index 219ba8bde3a..e8a23c1a193 100644 --- a/Libraries/LibWeb/HTML/HTMLHRElement.h +++ b/Libraries/LibWeb/HTML/HTMLHRElement.h @@ -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(node).local_name() == Web::HTML::TagNames::hr; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLHeadElement.h b/Libraries/LibWeb/HTML/HTMLHeadElement.h index c2762c87f89..d378e1af773 100644 --- a/Libraries/LibWeb/HTML/HTMLHeadElement.h +++ b/Libraries/LibWeb/HTML/HTMLHeadElement.h @@ -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(node).local_name() == Web::HTML::TagNames::head; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLHeadingElement.h b/Libraries/LibWeb/HTML/HTMLHeadingElement.h index b0a0357671c..654b75baf9b 100644 --- a/Libraries/LibWeb/HTML/HTMLHeadingElement.h +++ b/Libraries/LibWeb/HTML/HTMLHeadingElement.h @@ -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(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() diff --git a/Libraries/LibWeb/HTML/HTMLHtmlElement.h b/Libraries/LibWeb/HTML/HTMLHtmlElement.h index c47e2964cab..3e34c52f6ce 100644 --- a/Libraries/LibWeb/HTML/HTMLHtmlElement.h +++ b/Libraries/LibWeb/HTML/HTMLHtmlElement.h @@ -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(node).local_name() == Web::HTML::TagNames::html; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLIFrameElement.h b/Libraries/LibWeb/HTML/HTMLIFrameElement.h index 6688cb0a6c4..99f8781bfa4 100644 --- a/Libraries/LibWeb/HTML/HTMLIFrameElement.h +++ b/Libraries/LibWeb/HTML/HTMLIFrameElement.h @@ -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(node).local_name() == Web::HTML::TagNames::iframe; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLImageElement.h b/Libraries/LibWeb/HTML/HTMLImageElement.h index a07762bd631..5e5971dbb11 100644 --- a/Libraries/LibWeb/HTML/HTMLImageElement.h +++ b/Libraries/LibWeb/HTML/HTMLImageElement.h @@ -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(node).local_name() == Web::HTML::TagNames::img; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLInputElement.h b/Libraries/LibWeb/HTML/HTMLInputElement.h index 84e0ecf1c1c..c3676d1dbe3 100644 --- a/Libraries/LibWeb/HTML/HTMLInputElement.h +++ b/Libraries/LibWeb/HTML/HTMLInputElement.h @@ -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(node).local_name() == Web::HTML::TagNames::input; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLLIElement.h b/Libraries/LibWeb/HTML/HTMLLIElement.h index 05ab2c9fd69..b0113aef9c2 100644 --- a/Libraries/LibWeb/HTML/HTMLLIElement.h +++ b/Libraries/LibWeb/HTML/HTMLLIElement.h @@ -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(node).local_name() == Web::HTML::TagNames::li; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLLabelElement.h b/Libraries/LibWeb/HTML/HTMLLabelElement.h index c4c73ae4a7d..210e366ee01 100644 --- a/Libraries/LibWeb/HTML/HTMLLabelElement.h +++ b/Libraries/LibWeb/HTML/HTMLLabelElement.h @@ -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(node).local_name() == Web::HTML::TagNames::label; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLLegendElement.h b/Libraries/LibWeb/HTML/HTMLLegendElement.h index 8cb0ccacf9e..02a8b245851 100644 --- a/Libraries/LibWeb/HTML/HTMLLegendElement.h +++ b/Libraries/LibWeb/HTML/HTMLLegendElement.h @@ -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(node).local_name() == Web::HTML::TagNames::legend; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLLinkElement.h b/Libraries/LibWeb/HTML/HTMLLinkElement.h index 3aa6825b9ac..ac91ecbe214 100644 --- a/Libraries/LibWeb/HTML/HTMLLinkElement.h +++ b/Libraries/LibWeb/HTML/HTMLLinkElement.h @@ -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(node).local_name() == Web::HTML::TagNames::link; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLMapElement.h b/Libraries/LibWeb/HTML/HTMLMapElement.h index 20327cec2d5..23b59ce6fcb 100644 --- a/Libraries/LibWeb/HTML/HTMLMapElement.h +++ b/Libraries/LibWeb/HTML/HTMLMapElement.h @@ -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(node).local_name() == Web::HTML::TagNames::map; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLMarqueeElement.h b/Libraries/LibWeb/HTML/HTMLMarqueeElement.h index ec163c6c0e2..0a2e5f5e32e 100644 --- a/Libraries/LibWeb/HTML/HTMLMarqueeElement.h +++ b/Libraries/LibWeb/HTML/HTMLMarqueeElement.h @@ -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(node).local_name() == Web::HTML::TagNames::marquee; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLMediaElement.h b/Libraries/LibWeb/HTML/HTMLMediaElement.h index 6c67a833651..53adde12e36 100644 --- a/Libraries/LibWeb/HTML/HTMLMediaElement.h +++ b/Libraries/LibWeb/HTML/HTMLMediaElement.h @@ -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(node).local_name().is_one_of(Web::HTML::TagNames::audio, Web::HTML::TagNames::video); } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLMenuElement.h b/Libraries/LibWeb/HTML/HTMLMenuElement.h index 16fc19217b5..8fe2acca90b 100644 --- a/Libraries/LibWeb/HTML/HTMLMenuElement.h +++ b/Libraries/LibWeb/HTML/HTMLMenuElement.h @@ -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(node).local_name() == Web::HTML::TagNames::menu; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLMetaElement.h b/Libraries/LibWeb/HTML/HTMLMetaElement.h index e0b5716e543..e48271c826f 100644 --- a/Libraries/LibWeb/HTML/HTMLMetaElement.h +++ b/Libraries/LibWeb/HTML/HTMLMetaElement.h @@ -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(node).local_name() == Web::HTML::TagNames::meta; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLMeterElement.h b/Libraries/LibWeb/HTML/HTMLMeterElement.h index 66abc5fb923..f6d983a6b01 100644 --- a/Libraries/LibWeb/HTML/HTMLMeterElement.h +++ b/Libraries/LibWeb/HTML/HTMLMeterElement.h @@ -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(node).local_name() == Web::HTML::TagNames::meter; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLModElement.h b/Libraries/LibWeb/HTML/HTMLModElement.h index f4b4747aba2..f75c8bef9e6 100644 --- a/Libraries/LibWeb/HTML/HTMLModElement.h +++ b/Libraries/LibWeb/HTML/HTMLModElement.h @@ -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(node).local_name().is_one_of(Web::HTML::TagNames::ins, Web::HTML::TagNames::del); } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLOListElement.h b/Libraries/LibWeb/HTML/HTMLOListElement.h index 6193902ce23..8f5a849c754 100644 --- a/Libraries/LibWeb/HTML/HTMLOListElement.h +++ b/Libraries/LibWeb/HTML/HTMLOListElement.h @@ -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(node).local_name() == Web::HTML::TagNames::ol; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLObjectElement.h b/Libraries/LibWeb/HTML/HTMLObjectElement.h index 74976046237..f49e8b22c87 100644 --- a/Libraries/LibWeb/HTML/HTMLObjectElement.h +++ b/Libraries/LibWeb/HTML/HTMLObjectElement.h @@ -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(node).local_name() == Web::HTML::TagNames::object; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLOptGroupElement.h b/Libraries/LibWeb/HTML/HTMLOptGroupElement.h index ea65d119267..77a90aebcb6 100644 --- a/Libraries/LibWeb/HTML/HTMLOptGroupElement.h +++ b/Libraries/LibWeb/HTML/HTMLOptGroupElement.h @@ -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(node).local_name() == Web::HTML::TagNames::optgroup; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLOptionElement.h b/Libraries/LibWeb/HTML/HTMLOptionElement.h index bed1c7bede9..e2bead49f66 100644 --- a/Libraries/LibWeb/HTML/HTMLOptionElement.h +++ b/Libraries/LibWeb/HTML/HTMLOptionElement.h @@ -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(node).local_name() == Web::HTML::TagNames::option; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLOutputElement.h b/Libraries/LibWeb/HTML/HTMLOutputElement.h index bf892feb621..110225535f5 100644 --- a/Libraries/LibWeb/HTML/HTMLOutputElement.h +++ b/Libraries/LibWeb/HTML/HTMLOutputElement.h @@ -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(node).local_name() == Web::HTML::TagNames::output; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLParagraphElement.h b/Libraries/LibWeb/HTML/HTMLParagraphElement.h index 542cea6a1a9..660855edb9a 100644 --- a/Libraries/LibWeb/HTML/HTMLParagraphElement.h +++ b/Libraries/LibWeb/HTML/HTMLParagraphElement.h @@ -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(node).local_name() == Web::HTML::TagNames::p; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLParamElement.h b/Libraries/LibWeb/HTML/HTMLParamElement.h index 2a8ce92f0a7..642551cdd0d 100644 --- a/Libraries/LibWeb/HTML/HTMLParamElement.h +++ b/Libraries/LibWeb/HTML/HTMLParamElement.h @@ -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(node).local_name() == Web::HTML::TagNames::param; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLPictureElement.h b/Libraries/LibWeb/HTML/HTMLPictureElement.h index c1e0b929417..8d12df2b166 100644 --- a/Libraries/LibWeb/HTML/HTMLPictureElement.h +++ b/Libraries/LibWeb/HTML/HTMLPictureElement.h @@ -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(node).local_name() == Web::HTML::TagNames::picture; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLPreElement.h b/Libraries/LibWeb/HTML/HTMLPreElement.h index d65d3fe5801..b87197f600f 100644 --- a/Libraries/LibWeb/HTML/HTMLPreElement.h +++ b/Libraries/LibWeb/HTML/HTMLPreElement.h @@ -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(node).local_name().is_one_of(Web::HTML::TagNames::pre, Web::HTML::TagNames::listing, Web::HTML::TagNames::xmp); } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLProgressElement.h b/Libraries/LibWeb/HTML/HTMLProgressElement.h index 7987685763a..cb18e317f25 100644 --- a/Libraries/LibWeb/HTML/HTMLProgressElement.h +++ b/Libraries/LibWeb/HTML/HTMLProgressElement.h @@ -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(node).local_name() == Web::HTML::TagNames::progress; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLQuoteElement.h b/Libraries/LibWeb/HTML/HTMLQuoteElement.h index e55dab3133e..98e254f213d 100644 --- a/Libraries/LibWeb/HTML/HTMLQuoteElement.h +++ b/Libraries/LibWeb/HTML/HTMLQuoteElement.h @@ -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(node).local_name().is_one_of(Web::HTML::TagNames::blockquote, Web::HTML::TagNames::q); } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLScriptElement.h b/Libraries/LibWeb/HTML/HTMLScriptElement.h index baf6937fd15..b15afcdd7a8 100644 --- a/Libraries/LibWeb/HTML/HTMLScriptElement.h +++ b/Libraries/LibWeb/HTML/HTMLScriptElement.h @@ -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(node).local_name() == Web::HTML::TagNames::script; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLSelectElement.h b/Libraries/LibWeb/HTML/HTMLSelectElement.h index f02fba4436c..49d66970b98 100644 --- a/Libraries/LibWeb/HTML/HTMLSelectElement.h +++ b/Libraries/LibWeb/HTML/HTMLSelectElement.h @@ -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(node).local_name() == Web::HTML::TagNames::select; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLSlotElement.h b/Libraries/LibWeb/HTML/HTMLSlotElement.h index 550912ad1ba..96c42ff6f25 100644 --- a/Libraries/LibWeb/HTML/HTMLSlotElement.h +++ b/Libraries/LibWeb/HTML/HTMLSlotElement.h @@ -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(node).local_name() == Web::HTML::TagNames::slot; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLSourceElement.h b/Libraries/LibWeb/HTML/HTMLSourceElement.h index 36e20a8268d..f126968ddd8 100644 --- a/Libraries/LibWeb/HTML/HTMLSourceElement.h +++ b/Libraries/LibWeb/HTML/HTMLSourceElement.h @@ -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(node).local_name() == Web::HTML::TagNames::source; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLSpanElement.h b/Libraries/LibWeb/HTML/HTMLSpanElement.h index 59a42497710..1906eb2a569 100644 --- a/Libraries/LibWeb/HTML/HTMLSpanElement.h +++ b/Libraries/LibWeb/HTML/HTMLSpanElement.h @@ -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(node).local_name() == Web::HTML::TagNames::span; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLStyleElement.h b/Libraries/LibWeb/HTML/HTMLStyleElement.h index 29c05545b9c..9e3b615c0c9 100644 --- a/Libraries/LibWeb/HTML/HTMLStyleElement.h +++ b/Libraries/LibWeb/HTML/HTMLStyleElement.h @@ -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(node).local_name() == Web::HTML::TagNames::style; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLTableCaptionElement.h b/Libraries/LibWeb/HTML/HTMLTableCaptionElement.h index 8f134e31536..691b49ab3cc 100644 --- a/Libraries/LibWeb/HTML/HTMLTableCaptionElement.h +++ b/Libraries/LibWeb/HTML/HTMLTableCaptionElement.h @@ -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(node).local_name() == Web::HTML::TagNames::caption; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLTableCellElement.h b/Libraries/LibWeb/HTML/HTMLTableCellElement.h index 28fba124880..7a2b9e4f095 100644 --- a/Libraries/LibWeb/HTML/HTMLTableCellElement.h +++ b/Libraries/LibWeb/HTML/HTMLTableCellElement.h @@ -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(node).local_name().is_one_of(Web::HTML::TagNames::td, Web::HTML::TagNames::th); } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLTableColElement.h b/Libraries/LibWeb/HTML/HTMLTableColElement.h index 922943e56c2..c6b8e706ffd 100644 --- a/Libraries/LibWeb/HTML/HTMLTableColElement.h +++ b/Libraries/LibWeb/HTML/HTMLTableColElement.h @@ -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(node).local_name().is_one_of(Web::HTML::TagNames::colgroup, Web::HTML::TagNames::col); } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLTableElement.h b/Libraries/LibWeb/HTML/HTMLTableElement.h index 8d4498f6c3e..39d65833c65 100644 --- a/Libraries/LibWeb/HTML/HTMLTableElement.h +++ b/Libraries/LibWeb/HTML/HTMLTableElement.h @@ -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(node).local_name() == Web::HTML::TagNames::table; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLTableRowElement.h b/Libraries/LibWeb/HTML/HTMLTableRowElement.h index 41218e712aa..dc64d13322c 100644 --- a/Libraries/LibWeb/HTML/HTMLTableRowElement.h +++ b/Libraries/LibWeb/HTML/HTMLTableRowElement.h @@ -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(node).local_name() == Web::HTML::TagNames::tr; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLTableSectionElement.h b/Libraries/LibWeb/HTML/HTMLTableSectionElement.h index 64a87054e3b..dc58ea8a1b4 100644 --- a/Libraries/LibWeb/HTML/HTMLTableSectionElement.h +++ b/Libraries/LibWeb/HTML/HTMLTableSectionElement.h @@ -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(node).local_name().is_one_of(Web::HTML::TagNames::tbody, Web::HTML::TagNames::thead, Web::HTML::TagNames::tfoot); } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLTemplateElement.h b/Libraries/LibWeb/HTML/HTMLTemplateElement.h index 09f32bf9958..8e263206848 100644 --- a/Libraries/LibWeb/HTML/HTMLTemplateElement.h +++ b/Libraries/LibWeb/HTML/HTMLTemplateElement.h @@ -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(node).local_name() == Web::HTML::TagNames::template_; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLTextAreaElement.h b/Libraries/LibWeb/HTML/HTMLTextAreaElement.h index d444f3ccfcc..e09b95541ae 100644 --- a/Libraries/LibWeb/HTML/HTMLTextAreaElement.h +++ b/Libraries/LibWeb/HTML/HTMLTextAreaElement.h @@ -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(node).local_name() == Web::HTML::TagNames::textarea; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLTimeElement.h b/Libraries/LibWeb/HTML/HTMLTimeElement.h index 675b79b710f..aacef209a99 100644 --- a/Libraries/LibWeb/HTML/HTMLTimeElement.h +++ b/Libraries/LibWeb/HTML/HTMLTimeElement.h @@ -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(node).local_name() == Web::HTML::TagNames::time; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLTitleElement.h b/Libraries/LibWeb/HTML/HTMLTitleElement.h index a619a1fe453..42c28f467fc 100644 --- a/Libraries/LibWeb/HTML/HTMLTitleElement.h +++ b/Libraries/LibWeb/HTML/HTMLTitleElement.h @@ -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(node).local_name() == Web::HTML::TagNames::title; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLTrackElement.h b/Libraries/LibWeb/HTML/HTMLTrackElement.h index 8724dd38670..6a0c78c176f 100644 --- a/Libraries/LibWeb/HTML/HTMLTrackElement.h +++ b/Libraries/LibWeb/HTML/HTMLTrackElement.h @@ -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(node).local_name() == Web::HTML::TagNames::track; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLUListElement.h b/Libraries/LibWeb/HTML/HTMLUListElement.h index 50083f79f6d..c4efa7949ad 100644 --- a/Libraries/LibWeb/HTML/HTMLUListElement.h +++ b/Libraries/LibWeb/HTML/HTMLUListElement.h @@ -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(node).local_name() == Web::HTML::TagNames::ul; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLUnknownElement.h b/Libraries/LibWeb/HTML/HTMLUnknownElement.h index 163da5d55f2..5fdacf66ecf 100644 --- a/Libraries/LibWeb/HTML/HTMLUnknownElement.h +++ b/Libraries/LibWeb/HTML/HTMLUnknownElement.h @@ -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() diff --git a/Libraries/LibWeb/HTML/HTMLVideoElement.h b/Libraries/LibWeb/HTML/HTMLVideoElement.h index 7d9366d31a4..9349f0feb62 100644 --- a/Libraries/LibWeb/HTML/HTMLVideoElement.h +++ b/Libraries/LibWeb/HTML/HTMLVideoElement.h @@ -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(node).local_name() == Web::HTML::TagNames::video; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/Layout/BlockBox.h b/Libraries/LibWeb/Layout/BlockBox.h index 83929ac14ec..ae2336b644f 100644 --- a/Libraries/LibWeb/Layout/BlockBox.h +++ b/Libraries/LibWeb/Layout/BlockBox.h @@ -81,7 +81,3 @@ void BlockBox::for_each_fragment(Callback callback) const } } - -AK_BEGIN_TYPE_TRAITS(Web::Layout::BlockBox) -static bool is_type(const Web::Layout::Node& layout_node) { return layout_node.is_block(); } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/Layout/Box.h b/Libraries/LibWeb/Layout/Box.h index fe9ed426692..6c52072f401 100644 --- a/Libraries/LibWeb/Layout/Box.h +++ b/Libraries/LibWeb/Layout/Box.h @@ -124,7 +124,3 @@ private: }; } - -AK_BEGIN_TYPE_TRAITS(Web::Layout::Box) -static bool is_type(const Web::Layout::Node& layout_node) { return layout_node.is_box(); } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/Layout/BreakNode.h b/Libraries/LibWeb/Layout/BreakNode.h index 2bc15fc5297..d19b2334cb8 100644 --- a/Libraries/LibWeb/Layout/BreakNode.h +++ b/Libraries/LibWeb/Layout/BreakNode.h @@ -45,7 +45,3 @@ private: }; } - -AK_BEGIN_TYPE_TRAITS(Web::Layout::BreakNode) -static bool is_type(const Web::Layout::Node& layout_node) { return layout_node.is_break(); } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/Layout/ButtonBox.h b/Libraries/LibWeb/Layout/ButtonBox.h index 35cc336fc47..9545d912aab 100644 --- a/Libraries/LibWeb/Layout/ButtonBox.h +++ b/Libraries/LibWeb/Layout/ButtonBox.h @@ -55,7 +55,3 @@ private: }; } - -AK_BEGIN_TYPE_TRAITS(Web::Layout::ButtonBox) -static bool is_type(const Web::Layout::Node& layout_node) { return layout_node.is_button(); } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/Layout/CanvasBox.h b/Libraries/LibWeb/Layout/CanvasBox.h index 16c1110724d..989e42859ae 100644 --- a/Libraries/LibWeb/Layout/CanvasBox.h +++ b/Libraries/LibWeb/Layout/CanvasBox.h @@ -47,7 +47,3 @@ private: }; } - -AK_BEGIN_TYPE_TRAITS(Web::Layout::CanvasBox) -static bool is_type(const Web::Layout::Node& layout_node) { return layout_node.is_canvas(); } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/Layout/CheckBox.h b/Libraries/LibWeb/Layout/CheckBox.h index f078952a60f..d63cb08ef16 100644 --- a/Libraries/LibWeb/Layout/CheckBox.h +++ b/Libraries/LibWeb/Layout/CheckBox.h @@ -54,7 +54,3 @@ private: }; } - -AK_BEGIN_TYPE_TRAITS(Web::Layout::CheckBox) -static bool is_type(const Web::Layout::Node& layout_node) { return layout_node.is_check_box(); } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/Layout/FrameBox.h b/Libraries/LibWeb/Layout/FrameBox.h index 840430e4f6e..08766b35787 100644 --- a/Libraries/LibWeb/Layout/FrameBox.h +++ b/Libraries/LibWeb/Layout/FrameBox.h @@ -49,7 +49,3 @@ private: }; } - -AK_BEGIN_TYPE_TRAITS(Web::Layout::FrameBox) -static bool is_type(const Web::Layout::Node& layout_node) { return layout_node.is_frame(); } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/Layout/ImageBox.h b/Libraries/LibWeb/Layout/ImageBox.h index 38a1f89cbe6..726ce0353d7 100644 --- a/Libraries/LibWeb/Layout/ImageBox.h +++ b/Libraries/LibWeb/Layout/ImageBox.h @@ -56,7 +56,3 @@ private: }; } - -AK_BEGIN_TYPE_TRAITS(Web::Layout::ImageBox) -static bool is_type(const Web::Layout::Node& layout_node) { return layout_node.is_image(); } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/Layout/InitialContainingBlockBox.h b/Libraries/LibWeb/Layout/InitialContainingBlockBox.h index ceb09977d34..0b4ab640dd6 100644 --- a/Libraries/LibWeb/Layout/InitialContainingBlockBox.h +++ b/Libraries/LibWeb/Layout/InitialContainingBlockBox.h @@ -61,7 +61,3 @@ private: }; } - -AK_BEGIN_TYPE_TRAITS(Web::Layout::InitialContainingBlockBox) -static bool is_type(const Web::Layout::Node& layout_node) { return layout_node.is_initial_containing_block(); } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/Layout/InlineNode.h b/Libraries/LibWeb/Layout/InlineNode.h index 9725651b2e6..2507d502b69 100644 --- a/Libraries/LibWeb/Layout/InlineNode.h +++ b/Libraries/LibWeb/Layout/InlineNode.h @@ -45,7 +45,3 @@ private: }; } - -AK_BEGIN_TYPE_TRAITS(Web::Layout::InlineNode) -static bool is_type(const Web::Layout::Node& layout_node) { return layout_node.is_inline_node(); } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/Layout/ListItemBox.h b/Libraries/LibWeb/Layout/ListItemBox.h index d374ab609d9..28857f30eaf 100644 --- a/Libraries/LibWeb/Layout/ListItemBox.h +++ b/Libraries/LibWeb/Layout/ListItemBox.h @@ -48,7 +48,3 @@ private: }; } - -AK_BEGIN_TYPE_TRAITS(Web::Layout::ListItemBox) -static bool is_type(const Web::Layout::Node& layout_node) { return layout_node.is_list_item(); } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/Layout/Node.h b/Libraries/LibWeb/Layout/Node.h index 69a7192b4f4..bc41aa37c98 100644 --- a/Libraries/LibWeb/Layout/Node.h +++ b/Libraries/LibWeb/Layout/Node.h @@ -271,7 +271,3 @@ inline NodeWithStyle* Node::parent() } } - -AK_BEGIN_TYPE_TRAITS(Web::Layout::NodeWithStyle) -static bool is_type(const Web::Layout::Node& node) { return node.has_style(); } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/Layout/ReplacedBox.h b/Libraries/LibWeb/Layout/ReplacedBox.h index e64be16db07..cf166485a90 100644 --- a/Libraries/LibWeb/Layout/ReplacedBox.h +++ b/Libraries/LibWeb/Layout/ReplacedBox.h @@ -76,7 +76,3 @@ private: }; } - -AK_BEGIN_TYPE_TRAITS(Web::Layout::ReplacedBox) -static bool is_type(const Web::Layout::Node& layout_node) { return layout_node.is_replaced(); } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/Layout/TableBox.h b/Libraries/LibWeb/Layout/TableBox.h index a4079805414..75241b4f396 100644 --- a/Libraries/LibWeb/Layout/TableBox.h +++ b/Libraries/LibWeb/Layout/TableBox.h @@ -41,7 +41,3 @@ private: }; } - -AK_BEGIN_TYPE_TRAITS(Web::Layout::TableBox) -static bool is_type(const Web::Layout::Node& layout_node) { return layout_node.is_table(); } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/Layout/TableCellBox.h b/Libraries/LibWeb/Layout/TableCellBox.h index e8eba520e36..fa008eff37e 100644 --- a/Libraries/LibWeb/Layout/TableCellBox.h +++ b/Libraries/LibWeb/Layout/TableCellBox.h @@ -47,7 +47,3 @@ private: }; } - -AK_BEGIN_TYPE_TRAITS(Web::Layout::TableCellBox) -static bool is_type(const Web::Layout::Node& layout_node) { return layout_node.is_table_cell(); } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/Layout/TableRowBox.h b/Libraries/LibWeb/Layout/TableRowBox.h index 5870789d95c..4d48b6c17f3 100644 --- a/Libraries/LibWeb/Layout/TableRowBox.h +++ b/Libraries/LibWeb/Layout/TableRowBox.h @@ -41,7 +41,3 @@ private: }; } - -AK_BEGIN_TYPE_TRAITS(Web::Layout::TableRowBox) -static bool is_type(const Web::Layout::Node& layout_node) { return layout_node.is_table_row(); } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/Layout/TableRowGroupBox.h b/Libraries/LibWeb/Layout/TableRowGroupBox.h index c887c770830..1187badbf4e 100644 --- a/Libraries/LibWeb/Layout/TableRowGroupBox.h +++ b/Libraries/LibWeb/Layout/TableRowGroupBox.h @@ -43,7 +43,3 @@ private: }; } - -AK_BEGIN_TYPE_TRAITS(Web::Layout::TableRowGroupBox) -static bool is_type(const Web::Layout::Node& layout_node) { return layout_node.is_table_row_group(); } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/Layout/TextNode.h b/Libraries/LibWeb/Layout/TextNode.h index e19692511ef..dcc1b984bc7 100644 --- a/Libraries/LibWeb/Layout/TextNode.h +++ b/Libraries/LibWeb/Layout/TextNode.h @@ -63,7 +63,3 @@ private: }; } - -AK_BEGIN_TYPE_TRAITS(Web::Layout::TextNode) -static bool is_type(const Web::Layout::Node& layout_node) { return layout_node.is_text(); } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/Layout/WidgetBox.h b/Libraries/LibWeb/Layout/WidgetBox.h index 0c5f734cd24..70db566e39e 100644 --- a/Libraries/LibWeb/Layout/WidgetBox.h +++ b/Libraries/LibWeb/Layout/WidgetBox.h @@ -51,7 +51,3 @@ private: }; } - -AK_BEGIN_TYPE_TRAITS(Web::Layout::WidgetBox) -static bool is_type(const Web::Layout::Node& layout_node) { return layout_node.is_widget(); } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/SVG/SVGElement.h b/Libraries/LibWeb/SVG/SVGElement.h index b96ea1e774d..94fbb80c764 100644 --- a/Libraries/LibWeb/SVG/SVGElement.h +++ b/Libraries/LibWeb/SVG/SVGElement.h @@ -44,7 +44,3 @@ private: }; } - -AK_BEGIN_TYPE_TRAITS(Web::SVG::SVGElement) -static bool is_type(const Web::DOM::Node& node) { return node.is_svg_element(); } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/SVG/SVGGraphicsElement.h b/Libraries/LibWeb/SVG/SVGGraphicsElement.h index 657a4489574..0a380456b9d 100644 --- a/Libraries/LibWeb/SVG/SVGGraphicsElement.h +++ b/Libraries/LibWeb/SVG/SVGGraphicsElement.h @@ -55,7 +55,3 @@ private: }; } - -AK_BEGIN_TYPE_TRAITS(Web::SVG::SVGGraphicsElement) -static bool is_type(const Web::DOM::Node& node) { return is(node) && downcast(node).is_graphics_element(); } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/SVG/SVGPathElement.h b/Libraries/LibWeb/SVG/SVGPathElement.h index bca0da456d5..cc6025fb025 100644 --- a/Libraries/LibWeb/SVG/SVGPathElement.h +++ b/Libraries/LibWeb/SVG/SVGPathElement.h @@ -122,7 +122,3 @@ private: }; } - -AK_BEGIN_TYPE_TRAITS(Web::SVG::SVGPathElement) -static bool is_type(const Web::DOM::Node& node) { return node.is_svg_element() && downcast(node).local_name() == Web::SVG::TagNames::path; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/SVG/SVGSVGElement.h b/Libraries/LibWeb/SVG/SVGSVGElement.h index 4478ebd6174..0e6c99b5044 100644 --- a/Libraries/LibWeb/SVG/SVGSVGElement.h +++ b/Libraries/LibWeb/SVG/SVGSVGElement.h @@ -47,7 +47,3 @@ private: }; } - -AK_BEGIN_TYPE_TRAITS(Web::SVG::SVGSVGElement) -static bool is_type(const Web::DOM::Node& node) { return node.is_svg_element() && downcast(node).local_name() == Web::SVG::TagNames::svg; } -AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/UIEvents/MouseEvent.h b/Libraries/LibWeb/UIEvents/MouseEvent.h index ebc84ddecbf..1314858baf7 100644 --- a/Libraries/LibWeb/UIEvents/MouseEvent.h +++ b/Libraries/LibWeb/UIEvents/MouseEvent.h @@ -58,7 +58,3 @@ private: }; } - -AK_BEGIN_TYPE_TRAITS(Web::UIEvents::MouseEvent) -static bool is_type(const Web::DOM::Event& event) { return event.is_mouse_event(); } -AK_END_TYPE_TRAITS()