1/*
2 * THIS FILE WAS AUTOMATICALLY GENERATED, DO NOT EDIT.
3 *
4 * This file was generated by the dom/make_names.pl script.
5 *
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2013 Apple Inc. All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 *
17 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
18 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
21 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
22 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
23 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
24 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
25 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */
29
30#ifndef HTMLElementTypeHelpers_h
31#define HTMLElementTypeHelpers_h
32
33#include "HTMLNames.h"
34
35namespace WebCore {
36class HTMLAnchorElement;
37}
38namespace WTF {
39template<typename ArgType> class TypeCastTraits<const WebCore::HTMLAnchorElement, ArgType, false /* isBaseType */> {
40public:
41 static bool isOfType(ArgType& node) { return checkTagName(node); }
42private:
43 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::aTag); }
44 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::aTag); }
45 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
46};
47}
48
49namespace WebCore {
50class HTMLAppletElement;
51}
52namespace WTF {
53template<typename ArgType> class TypeCastTraits<const WebCore::HTMLAppletElement, ArgType, false /* isBaseType */> {
54public:
55 static bool isOfType(ArgType& node) { return checkTagName(node); }
56private:
57 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::appletTag); }
58 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::appletTag); }
59 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
60};
61}
62
63namespace WebCore {
64class HTMLAreaElement;
65}
66namespace WTF {
67template<typename ArgType> class TypeCastTraits<const WebCore::HTMLAreaElement, ArgType, false /* isBaseType */> {
68public:
69 static bool isOfType(ArgType& node) { return checkTagName(node); }
70private:
71 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::areaTag); }
72 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::areaTag); }
73 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
74};
75}
76
77namespace WebCore {
78class HTMLAttachmentElement;
79}
80namespace WTF {
81template<typename ArgType> class TypeCastTraits<const WebCore::HTMLAttachmentElement, ArgType, false /* isBaseType */> {
82public:
83 static bool isOfType(ArgType& node) { return checkTagName(node); }
84private:
85 static bool checkTagName(const WebCore::HTMLElement& element) { return !element.isHTMLUnknownElement() && element.hasTagName(WebCore::HTMLNames::attachmentTag); }
86 static bool checkTagName(const WebCore::Node& node) { return is<WebCore::HTMLElement>(node) && checkTagName(downcast<WebCore::HTMLElement>(node)); }
87 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
88};
89}
90
91namespace WebCore {
92class HTMLBDIElement;
93}
94namespace WTF {
95template<typename ArgType> class TypeCastTraits<const WebCore::HTMLBDIElement, ArgType, false /* isBaseType */> {
96public:
97 static bool isOfType(ArgType& node) { return checkTagName(node); }
98private:
99 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::bdiTag); }
100 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::bdiTag); }
101 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
102};
103}
104
105namespace WebCore {
106class HTMLBRElement;
107}
108namespace WTF {
109template<typename ArgType> class TypeCastTraits<const WebCore::HTMLBRElement, ArgType, false /* isBaseType */> {
110public:
111 static bool isOfType(ArgType& node) { return checkTagName(node); }
112private:
113 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::brTag); }
114 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::brTag); }
115 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
116};
117}
118
119namespace WebCore {
120class HTMLBaseElement;
121}
122namespace WTF {
123template<typename ArgType> class TypeCastTraits<const WebCore::HTMLBaseElement, ArgType, false /* isBaseType */> {
124public:
125 static bool isOfType(ArgType& node) { return checkTagName(node); }
126private:
127 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::baseTag); }
128 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::baseTag); }
129 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
130};
131}
132
133namespace WebCore {
134class HTMLBodyElement;
135}
136namespace WTF {
137template<typename ArgType> class TypeCastTraits<const WebCore::HTMLBodyElement, ArgType, false /* isBaseType */> {
138public:
139 static bool isOfType(ArgType& node) { return checkTagName(node); }
140private:
141 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::bodyTag); }
142 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::bodyTag); }
143 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
144};
145}
146
147namespace WebCore {
148class HTMLButtonElement;
149}
150namespace WTF {
151template<typename ArgType> class TypeCastTraits<const WebCore::HTMLButtonElement, ArgType, false /* isBaseType */> {
152public:
153 static bool isOfType(ArgType& node) { return checkTagName(node); }
154private:
155 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::buttonTag); }
156 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::buttonTag); }
157 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
158};
159}
160
161namespace WebCore {
162class HTMLDListElement;
163}
164namespace WTF {
165template<typename ArgType> class TypeCastTraits<const WebCore::HTMLDListElement, ArgType, false /* isBaseType */> {
166public:
167 static bool isOfType(ArgType& node) { return checkTagName(node); }
168private:
169 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::dlTag); }
170 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::dlTag); }
171 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
172};
173}
174
175namespace WebCore {
176class HTMLDataElement;
177}
178namespace WTF {
179template<typename ArgType> class TypeCastTraits<const WebCore::HTMLDataElement, ArgType, false /* isBaseType */> {
180public:
181 static bool isOfType(ArgType& node) { return checkTagName(node); }
182private:
183 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::dataTag); }
184 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::dataTag); }
185 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
186};
187}
188
189namespace WebCore {
190class HTMLDataListElement;
191}
192namespace WTF {
193template<typename ArgType> class TypeCastTraits<const WebCore::HTMLDataListElement, ArgType, false /* isBaseType */> {
194public:
195 static bool isOfType(ArgType& node) { return checkTagName(node); }
196private:
197 static bool checkTagName(const WebCore::HTMLElement& element) { return !element.isHTMLUnknownElement() && element.hasTagName(WebCore::HTMLNames::datalistTag); }
198 static bool checkTagName(const WebCore::Node& node) { return is<WebCore::HTMLElement>(node) && checkTagName(downcast<WebCore::HTMLElement>(node)); }
199 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
200};
201}
202
203namespace WebCore {
204class HTMLDetailsElement;
205}
206namespace WTF {
207template<typename ArgType> class TypeCastTraits<const WebCore::HTMLDetailsElement, ArgType, false /* isBaseType */> {
208public:
209 static bool isOfType(ArgType& node) { return checkTagName(node); }
210private:
211 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::detailsTag); }
212 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::detailsTag); }
213 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
214};
215}
216
217namespace WebCore {
218class HTMLDirectoryElement;
219}
220namespace WTF {
221template<typename ArgType> class TypeCastTraits<const WebCore::HTMLDirectoryElement, ArgType, false /* isBaseType */> {
222public:
223 static bool isOfType(ArgType& node) { return checkTagName(node); }
224private:
225 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::dirTag); }
226 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::dirTag); }
227 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
228};
229}
230
231namespace WebCore {
232class HTMLDivElement;
233}
234namespace WTF {
235template<typename ArgType> class TypeCastTraits<const WebCore::HTMLDivElement, ArgType, false /* isBaseType */> {
236public:
237 static bool isOfType(ArgType& node) { return checkTagName(node); }
238private:
239 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::divTag); }
240 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::divTag); }
241 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
242};
243}
244
245namespace WebCore {
246class HTMLEmbedElement;
247}
248namespace WTF {
249template<typename ArgType> class TypeCastTraits<const WebCore::HTMLEmbedElement, ArgType, false /* isBaseType */> {
250public:
251 static bool isOfType(ArgType& node) { return checkTagName(node); }
252private:
253 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::embedTag); }
254 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::embedTag); }
255 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
256};
257}
258
259namespace WebCore {
260class HTMLFieldSetElement;
261}
262namespace WTF {
263template<typename ArgType> class TypeCastTraits<const WebCore::HTMLFieldSetElement, ArgType, false /* isBaseType */> {
264public:
265 static bool isOfType(ArgType& node) { return checkTagName(node); }
266private:
267 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::fieldsetTag); }
268 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::fieldsetTag); }
269 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
270};
271}
272
273namespace WebCore {
274class HTMLFontElement;
275}
276namespace WTF {
277template<typename ArgType> class TypeCastTraits<const WebCore::HTMLFontElement, ArgType, false /* isBaseType */> {
278public:
279 static bool isOfType(ArgType& node) { return checkTagName(node); }
280private:
281 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::fontTag); }
282 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::fontTag); }
283 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
284};
285}
286
287namespace WebCore {
288class HTMLFormElement;
289}
290namespace WTF {
291template<typename ArgType> class TypeCastTraits<const WebCore::HTMLFormElement, ArgType, false /* isBaseType */> {
292public:
293 static bool isOfType(ArgType& node) { return checkTagName(node); }
294private:
295 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::formTag); }
296 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::formTag); }
297 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
298};
299}
300
301namespace WebCore {
302class HTMLFrameElement;
303}
304namespace WTF {
305template<typename ArgType> class TypeCastTraits<const WebCore::HTMLFrameElement, ArgType, false /* isBaseType */> {
306public:
307 static bool isOfType(ArgType& node) { return checkTagName(node); }
308private:
309 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::frameTag); }
310 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::frameTag); }
311 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
312};
313}
314
315namespace WebCore {
316class HTMLFrameSetElement;
317}
318namespace WTF {
319template<typename ArgType> class TypeCastTraits<const WebCore::HTMLFrameSetElement, ArgType, false /* isBaseType */> {
320public:
321 static bool isOfType(ArgType& node) { return checkTagName(node); }
322private:
323 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::framesetTag); }
324 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::framesetTag); }
325 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
326};
327}
328
329namespace WebCore {
330class HTMLHRElement;
331}
332namespace WTF {
333template<typename ArgType> class TypeCastTraits<const WebCore::HTMLHRElement, ArgType, false /* isBaseType */> {
334public:
335 static bool isOfType(ArgType& node) { return checkTagName(node); }
336private:
337 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::hrTag); }
338 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::hrTag); }
339 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
340};
341}
342
343namespace WebCore {
344class HTMLHeadElement;
345}
346namespace WTF {
347template<typename ArgType> class TypeCastTraits<const WebCore::HTMLHeadElement, ArgType, false /* isBaseType */> {
348public:
349 static bool isOfType(ArgType& node) { return checkTagName(node); }
350private:
351 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::headTag); }
352 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::headTag); }
353 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
354};
355}
356
357namespace WebCore {
358class HTMLHtmlElement;
359}
360namespace WTF {
361template<typename ArgType> class TypeCastTraits<const WebCore::HTMLHtmlElement, ArgType, false /* isBaseType */> {
362public:
363 static bool isOfType(ArgType& node) { return checkTagName(node); }
364private:
365 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::htmlTag); }
366 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::htmlTag); }
367 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
368};
369}
370
371namespace WebCore {
372class HTMLIFrameElement;
373}
374namespace WTF {
375template<typename ArgType> class TypeCastTraits<const WebCore::HTMLIFrameElement, ArgType, false /* isBaseType */> {
376public:
377 static bool isOfType(ArgType& node) { return checkTagName(node); }
378private:
379 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::iframeTag); }
380 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::iframeTag); }
381 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
382};
383}
384
385namespace WebCore {
386class HTMLImageElement;
387}
388namespace WTF {
389template<typename ArgType> class TypeCastTraits<const WebCore::HTMLImageElement, ArgType, false /* isBaseType */> {
390public:
391 static bool isOfType(ArgType& node) { return checkTagName(node); }
392private:
393 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::imgTag); }
394 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::imgTag); }
395 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
396};
397}
398
399namespace WebCore {
400class HTMLInputElement;
401}
402namespace WTF {
403template<typename ArgType> class TypeCastTraits<const WebCore::HTMLInputElement, ArgType, false /* isBaseType */> {
404public:
405 static bool isOfType(ArgType& node) { return checkTagName(node); }
406private:
407 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::inputTag); }
408 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::inputTag); }
409 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
410};
411}
412
413namespace WebCore {
414class HTMLKeygenElement;
415}
416namespace WTF {
417template<typename ArgType> class TypeCastTraits<const WebCore::HTMLKeygenElement, ArgType, false /* isBaseType */> {
418public:
419 static bool isOfType(ArgType& node) { return checkTagName(node); }
420private:
421 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::keygenTag); }
422 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::keygenTag); }
423 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
424};
425}
426
427namespace WebCore {
428class HTMLLIElement;
429}
430namespace WTF {
431template<typename ArgType> class TypeCastTraits<const WebCore::HTMLLIElement, ArgType, false /* isBaseType */> {
432public:
433 static bool isOfType(ArgType& node) { return checkTagName(node); }
434private:
435 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::liTag); }
436 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::liTag); }
437 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
438};
439}
440
441namespace WebCore {
442class HTMLLabelElement;
443}
444namespace WTF {
445template<typename ArgType> class TypeCastTraits<const WebCore::HTMLLabelElement, ArgType, false /* isBaseType */> {
446public:
447 static bool isOfType(ArgType& node) { return checkTagName(node); }
448private:
449 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::labelTag); }
450 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::labelTag); }
451 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
452};
453}
454
455namespace WebCore {
456class HTMLLegendElement;
457}
458namespace WTF {
459template<typename ArgType> class TypeCastTraits<const WebCore::HTMLLegendElement, ArgType, false /* isBaseType */> {
460public:
461 static bool isOfType(ArgType& node) { return checkTagName(node); }
462private:
463 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::legendTag); }
464 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::legendTag); }
465 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
466};
467}
468
469namespace WebCore {
470class HTMLLinkElement;
471}
472namespace WTF {
473template<typename ArgType> class TypeCastTraits<const WebCore::HTMLLinkElement, ArgType, false /* isBaseType */> {
474public:
475 static bool isOfType(ArgType& node) { return checkTagName(node); }
476private:
477 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::linkTag); }
478 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::linkTag); }
479 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
480};
481}
482
483namespace WebCore {
484class HTMLMapElement;
485}
486namespace WTF {
487template<typename ArgType> class TypeCastTraits<const WebCore::HTMLMapElement, ArgType, false /* isBaseType */> {
488public:
489 static bool isOfType(ArgType& node) { return checkTagName(node); }
490private:
491 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::mapTag); }
492 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::mapTag); }
493 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
494};
495}
496
497namespace WebCore {
498class HTMLMarqueeElement;
499}
500namespace WTF {
501template<typename ArgType> class TypeCastTraits<const WebCore::HTMLMarqueeElement, ArgType, false /* isBaseType */> {
502public:
503 static bool isOfType(ArgType& node) { return checkTagName(node); }
504private:
505 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::marqueeTag); }
506 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::marqueeTag); }
507 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
508};
509}
510
511namespace WebCore {
512class HTMLMenuElement;
513}
514namespace WTF {
515template<typename ArgType> class TypeCastTraits<const WebCore::HTMLMenuElement, ArgType, false /* isBaseType */> {
516public:
517 static bool isOfType(ArgType& node) { return checkTagName(node); }
518private:
519 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::menuTag); }
520 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::menuTag); }
521 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
522};
523}
524
525namespace WebCore {
526class HTMLMenuItemElement;
527}
528namespace WTF {
529template<typename ArgType> class TypeCastTraits<const WebCore::HTMLMenuItemElement, ArgType, false /* isBaseType */> {
530public:
531 static bool isOfType(ArgType& node) { return checkTagName(node); }
532private:
533 static bool checkTagName(const WebCore::HTMLElement& element) { return !element.isHTMLUnknownElement() && element.hasTagName(WebCore::HTMLNames::menuitemTag); }
534 static bool checkTagName(const WebCore::Node& node) { return is<WebCore::HTMLElement>(node) && checkTagName(downcast<WebCore::HTMLElement>(node)); }
535 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
536};
537}
538
539namespace WebCore {
540class HTMLMetaElement;
541}
542namespace WTF {
543template<typename ArgType> class TypeCastTraits<const WebCore::HTMLMetaElement, ArgType, false /* isBaseType */> {
544public:
545 static bool isOfType(ArgType& node) { return checkTagName(node); }
546private:
547 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::metaTag); }
548 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::metaTag); }
549 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
550};
551}
552
553namespace WebCore {
554class HTMLMeterElement;
555}
556namespace WTF {
557template<typename ArgType> class TypeCastTraits<const WebCore::HTMLMeterElement, ArgType, false /* isBaseType */> {
558public:
559 static bool isOfType(ArgType& node) { return checkTagName(node); }
560private:
561 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::meterTag); }
562 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::meterTag); }
563 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
564};
565}
566
567namespace WebCore {
568class HTMLOListElement;
569}
570namespace WTF {
571template<typename ArgType> class TypeCastTraits<const WebCore::HTMLOListElement, ArgType, false /* isBaseType */> {
572public:
573 static bool isOfType(ArgType& node) { return checkTagName(node); }
574private:
575 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::olTag); }
576 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::olTag); }
577 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
578};
579}
580
581namespace WebCore {
582class HTMLObjectElement;
583}
584namespace WTF {
585template<typename ArgType> class TypeCastTraits<const WebCore::HTMLObjectElement, ArgType, false /* isBaseType */> {
586public:
587 static bool isOfType(ArgType& node) { return checkTagName(node); }
588private:
589 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::objectTag); }
590 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::objectTag); }
591 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
592};
593}
594
595namespace WebCore {
596class HTMLOptGroupElement;
597}
598namespace WTF {
599template<typename ArgType> class TypeCastTraits<const WebCore::HTMLOptGroupElement, ArgType, false /* isBaseType */> {
600public:
601 static bool isOfType(ArgType& node) { return checkTagName(node); }
602private:
603 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::optgroupTag); }
604 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::optgroupTag); }
605 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
606};
607}
608
609namespace WebCore {
610class HTMLOptionElement;
611}
612namespace WTF {
613template<typename ArgType> class TypeCastTraits<const WebCore::HTMLOptionElement, ArgType, false /* isBaseType */> {
614public:
615 static bool isOfType(ArgType& node) { return checkTagName(node); }
616private:
617 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::optionTag); }
618 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::optionTag); }
619 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
620};
621}
622
623namespace WebCore {
624class HTMLOutputElement;
625}
626namespace WTF {
627template<typename ArgType> class TypeCastTraits<const WebCore::HTMLOutputElement, ArgType, false /* isBaseType */> {
628public:
629 static bool isOfType(ArgType& node) { return checkTagName(node); }
630private:
631 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::outputTag); }
632 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::outputTag); }
633 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
634};
635}
636
637namespace WebCore {
638class HTMLParagraphElement;
639}
640namespace WTF {
641template<typename ArgType> class TypeCastTraits<const WebCore::HTMLParagraphElement, ArgType, false /* isBaseType */> {
642public:
643 static bool isOfType(ArgType& node) { return checkTagName(node); }
644private:
645 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::pTag); }
646 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::pTag); }
647 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
648};
649}
650
651namespace WebCore {
652class HTMLParamElement;
653}
654namespace WTF {
655template<typename ArgType> class TypeCastTraits<const WebCore::HTMLParamElement, ArgType, false /* isBaseType */> {
656public:
657 static bool isOfType(ArgType& node) { return checkTagName(node); }
658private:
659 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::paramTag); }
660 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::paramTag); }
661 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
662};
663}
664
665namespace WebCore {
666class HTMLPictureElement;
667}
668namespace WTF {
669template<typename ArgType> class TypeCastTraits<const WebCore::HTMLPictureElement, ArgType, false /* isBaseType */> {
670public:
671 static bool isOfType(ArgType& node) { return checkTagName(node); }
672private:
673 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::pictureTag); }
674 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::pictureTag); }
675 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
676};
677}
678
679namespace WebCore {
680class HTMLProgressElement;
681}
682namespace WTF {
683template<typename ArgType> class TypeCastTraits<const WebCore::HTMLProgressElement, ArgType, false /* isBaseType */> {
684public:
685 static bool isOfType(ArgType& node) { return checkTagName(node); }
686private:
687 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::progressTag); }
688 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::progressTag); }
689 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
690};
691}
692
693namespace WebCore {
694class HTMLScriptElement;
695}
696namespace WTF {
697template<typename ArgType> class TypeCastTraits<const WebCore::HTMLScriptElement, ArgType, false /* isBaseType */> {
698public:
699 static bool isOfType(ArgType& node) { return checkTagName(node); }
700private:
701 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::scriptTag); }
702 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::scriptTag); }
703 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
704};
705}
706
707namespace WebCore {
708class HTMLSelectElement;
709}
710namespace WTF {
711template<typename ArgType> class TypeCastTraits<const WebCore::HTMLSelectElement, ArgType, false /* isBaseType */> {
712public:
713 static bool isOfType(ArgType& node) { return checkTagName(node); }
714private:
715 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::selectTag); }
716 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::selectTag); }
717 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
718};
719}
720
721namespace WebCore {
722class HTMLSlotElement;
723}
724namespace WTF {
725template<typename ArgType> class TypeCastTraits<const WebCore::HTMLSlotElement, ArgType, false /* isBaseType */> {
726public:
727 static bool isOfType(ArgType& node) { return checkTagName(node); }
728private:
729 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::slotTag); }
730 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::slotTag); }
731 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
732};
733}
734
735namespace WebCore {
736class HTMLSourceElement;
737}
738namespace WTF {
739template<typename ArgType> class TypeCastTraits<const WebCore::HTMLSourceElement, ArgType, false /* isBaseType */> {
740public:
741 static bool isOfType(ArgType& node) { return checkTagName(node); }
742private:
743 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::sourceTag); }
744 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::sourceTag); }
745 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
746};
747}
748
749namespace WebCore {
750class HTMLSpanElement;
751}
752namespace WTF {
753template<typename ArgType> class TypeCastTraits<const WebCore::HTMLSpanElement, ArgType, false /* isBaseType */> {
754public:
755 static bool isOfType(ArgType& node) { return checkTagName(node); }
756private:
757 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::spanTag); }
758 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::spanTag); }
759 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
760};
761}
762
763namespace WebCore {
764class HTMLStyleElement;
765}
766namespace WTF {
767template<typename ArgType> class TypeCastTraits<const WebCore::HTMLStyleElement, ArgType, false /* isBaseType */> {
768public:
769 static bool isOfType(ArgType& node) { return checkTagName(node); }
770private:
771 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::styleTag); }
772 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::styleTag); }
773 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
774};
775}
776
777namespace WebCore {
778class HTMLSummaryElement;
779}
780namespace WTF {
781template<typename ArgType> class TypeCastTraits<const WebCore::HTMLSummaryElement, ArgType, false /* isBaseType */> {
782public:
783 static bool isOfType(ArgType& node) { return checkTagName(node); }
784private:
785 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::summaryTag); }
786 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::summaryTag); }
787 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
788};
789}
790
791namespace WebCore {
792class HTMLTableCaptionElement;
793}
794namespace WTF {
795template<typename ArgType> class TypeCastTraits<const WebCore::HTMLTableCaptionElement, ArgType, false /* isBaseType */> {
796public:
797 static bool isOfType(ArgType& node) { return checkTagName(node); }
798private:
799 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::captionTag); }
800 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::captionTag); }
801 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
802};
803}
804
805namespace WebCore {
806class HTMLTableElement;
807}
808namespace WTF {
809template<typename ArgType> class TypeCastTraits<const WebCore::HTMLTableElement, ArgType, false /* isBaseType */> {
810public:
811 static bool isOfType(ArgType& node) { return checkTagName(node); }
812private:
813 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::tableTag); }
814 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::tableTag); }
815 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
816};
817}
818
819namespace WebCore {
820class HTMLTableRowElement;
821}
822namespace WTF {
823template<typename ArgType> class TypeCastTraits<const WebCore::HTMLTableRowElement, ArgType, false /* isBaseType */> {
824public:
825 static bool isOfType(ArgType& node) { return checkTagName(node); }
826private:
827 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::trTag); }
828 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::trTag); }
829 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
830};
831}
832
833namespace WebCore {
834class HTMLTemplateElement;
835}
836namespace WTF {
837template<typename ArgType> class TypeCastTraits<const WebCore::HTMLTemplateElement, ArgType, false /* isBaseType */> {
838public:
839 static bool isOfType(ArgType& node) { return checkTagName(node); }
840private:
841 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::templateTag); }
842 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::templateTag); }
843 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
844};
845}
846
847namespace WebCore {
848class HTMLTextAreaElement;
849}
850namespace WTF {
851template<typename ArgType> class TypeCastTraits<const WebCore::HTMLTextAreaElement, ArgType, false /* isBaseType */> {
852public:
853 static bool isOfType(ArgType& node) { return checkTagName(node); }
854private:
855 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::textareaTag); }
856 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::textareaTag); }
857 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
858};
859}
860
861namespace WebCore {
862class HTMLTimeElement;
863}
864namespace WTF {
865template<typename ArgType> class TypeCastTraits<const WebCore::HTMLTimeElement, ArgType, false /* isBaseType */> {
866public:
867 static bool isOfType(ArgType& node) { return checkTagName(node); }
868private:
869 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::timeTag); }
870 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::timeTag); }
871 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
872};
873}
874
875namespace WebCore {
876class HTMLTitleElement;
877}
878namespace WTF {
879template<typename ArgType> class TypeCastTraits<const WebCore::HTMLTitleElement, ArgType, false /* isBaseType */> {
880public:
881 static bool isOfType(ArgType& node) { return checkTagName(node); }
882private:
883 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::titleTag); }
884 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::titleTag); }
885 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
886};
887}
888
889namespace WebCore {
890class HTMLTrackElement;
891}
892namespace WTF {
893template<typename ArgType> class TypeCastTraits<const WebCore::HTMLTrackElement, ArgType, false /* isBaseType */> {
894public:
895 static bool isOfType(ArgType& node) { return checkTagName(node); }
896private:
897 static bool checkTagName(const WebCore::HTMLElement& element) { return !element.isHTMLUnknownElement() && element.hasTagName(WebCore::HTMLNames::trackTag); }
898 static bool checkTagName(const WebCore::Node& node) { return is<WebCore::HTMLElement>(node) && checkTagName(downcast<WebCore::HTMLElement>(node)); }
899 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
900};
901}
902
903namespace WebCore {
904class HTMLUListElement;
905}
906namespace WTF {
907template<typename ArgType> class TypeCastTraits<const WebCore::HTMLUListElement, ArgType, false /* isBaseType */> {
908public:
909 static bool isOfType(ArgType& node) { return checkTagName(node); }
910private:
911 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::ulTag); }
912 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::ulTag); }
913 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
914};
915}
916
917namespace WebCore {
918class HTMLWBRElement;
919}
920namespace WTF {
921template<typename ArgType> class TypeCastTraits<const WebCore::HTMLWBRElement, ArgType, false /* isBaseType */> {
922public:
923 static bool isOfType(ArgType& node) { return checkTagName(node); }
924private:
925 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::wbrTag); }
926 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::wbrTag); }
927 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
928};
929}
930
931namespace WebCore {
932class RubyElement;
933}
934namespace WTF {
935template<typename ArgType> class TypeCastTraits<const WebCore::RubyElement, ArgType, false /* isBaseType */> {
936public:
937 static bool isOfType(ArgType& node) { return checkTagName(node); }
938private:
939 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::rubyTag); }
940 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::rubyTag); }
941 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
942};
943}
944
945namespace WebCore {
946class RubyTextElement;
947}
948namespace WTF {
949template<typename ArgType> class TypeCastTraits<const WebCore::RubyTextElement, ArgType, false /* isBaseType */> {
950public:
951 static bool isOfType(ArgType& node) { return checkTagName(node); }
952private:
953 static bool checkTagName(const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::rtTag); }
954 static bool checkTagName(const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::rtTag); }
955 static bool checkTagName(const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); }
956};
957}
958
959#endif
960