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 | |
35 | namespace WebCore { |
36 | class HTMLAnchorElement; |
37 | } |
38 | namespace WTF { |
39 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLAnchorElement, ArgType, false /* isBaseType */> { |
40 | public: |
41 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
42 | private: |
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 | |
49 | namespace WebCore { |
50 | class HTMLAppletElement; |
51 | } |
52 | namespace WTF { |
53 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLAppletElement, ArgType, false /* isBaseType */> { |
54 | public: |
55 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
56 | private: |
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 | |
63 | namespace WebCore { |
64 | class HTMLAreaElement; |
65 | } |
66 | namespace WTF { |
67 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLAreaElement, ArgType, false /* isBaseType */> { |
68 | public: |
69 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
70 | private: |
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 | |
77 | namespace WebCore { |
78 | class HTMLAttachmentElement; |
79 | } |
80 | namespace WTF { |
81 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLAttachmentElement, ArgType, false /* isBaseType */> { |
82 | public: |
83 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
84 | private: |
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 | |
91 | namespace WebCore { |
92 | class HTMLBDIElement; |
93 | } |
94 | namespace WTF { |
95 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLBDIElement, ArgType, false /* isBaseType */> { |
96 | public: |
97 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
98 | private: |
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 | |
105 | namespace WebCore { |
106 | class HTMLBRElement; |
107 | } |
108 | namespace WTF { |
109 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLBRElement, ArgType, false /* isBaseType */> { |
110 | public: |
111 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
112 | private: |
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 | |
119 | namespace WebCore { |
120 | class HTMLBaseElement; |
121 | } |
122 | namespace WTF { |
123 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLBaseElement, ArgType, false /* isBaseType */> { |
124 | public: |
125 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
126 | private: |
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 | |
133 | namespace WebCore { |
134 | class HTMLBodyElement; |
135 | } |
136 | namespace WTF { |
137 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLBodyElement, ArgType, false /* isBaseType */> { |
138 | public: |
139 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
140 | private: |
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 | |
147 | namespace WebCore { |
148 | class HTMLButtonElement; |
149 | } |
150 | namespace WTF { |
151 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLButtonElement, ArgType, false /* isBaseType */> { |
152 | public: |
153 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
154 | private: |
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 | |
161 | namespace WebCore { |
162 | class HTMLDListElement; |
163 | } |
164 | namespace WTF { |
165 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLDListElement, ArgType, false /* isBaseType */> { |
166 | public: |
167 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
168 | private: |
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 | |
175 | namespace WebCore { |
176 | class HTMLDataElement; |
177 | } |
178 | namespace WTF { |
179 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLDataElement, ArgType, false /* isBaseType */> { |
180 | public: |
181 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
182 | private: |
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 | |
189 | namespace WebCore { |
190 | class HTMLDataListElement; |
191 | } |
192 | namespace WTF { |
193 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLDataListElement, ArgType, false /* isBaseType */> { |
194 | public: |
195 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
196 | private: |
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 | |
203 | namespace WebCore { |
204 | class HTMLDetailsElement; |
205 | } |
206 | namespace WTF { |
207 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLDetailsElement, ArgType, false /* isBaseType */> { |
208 | public: |
209 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
210 | private: |
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 | |
217 | namespace WebCore { |
218 | class HTMLDirectoryElement; |
219 | } |
220 | namespace WTF { |
221 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLDirectoryElement, ArgType, false /* isBaseType */> { |
222 | public: |
223 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
224 | private: |
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 | |
231 | namespace WebCore { |
232 | class HTMLDivElement; |
233 | } |
234 | namespace WTF { |
235 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLDivElement, ArgType, false /* isBaseType */> { |
236 | public: |
237 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
238 | private: |
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 | |
245 | namespace WebCore { |
246 | class HTMLEmbedElement; |
247 | } |
248 | namespace WTF { |
249 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLEmbedElement, ArgType, false /* isBaseType */> { |
250 | public: |
251 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
252 | private: |
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 | |
259 | namespace WebCore { |
260 | class HTMLFieldSetElement; |
261 | } |
262 | namespace WTF { |
263 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLFieldSetElement, ArgType, false /* isBaseType */> { |
264 | public: |
265 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
266 | private: |
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 | |
273 | namespace WebCore { |
274 | class HTMLFontElement; |
275 | } |
276 | namespace WTF { |
277 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLFontElement, ArgType, false /* isBaseType */> { |
278 | public: |
279 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
280 | private: |
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 | |
287 | namespace WebCore { |
288 | class HTMLFormElement; |
289 | } |
290 | namespace WTF { |
291 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLFormElement, ArgType, false /* isBaseType */> { |
292 | public: |
293 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
294 | private: |
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 | |
301 | namespace WebCore { |
302 | class HTMLFrameElement; |
303 | } |
304 | namespace WTF { |
305 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLFrameElement, ArgType, false /* isBaseType */> { |
306 | public: |
307 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
308 | private: |
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 | |
315 | namespace WebCore { |
316 | class HTMLFrameSetElement; |
317 | } |
318 | namespace WTF { |
319 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLFrameSetElement, ArgType, false /* isBaseType */> { |
320 | public: |
321 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
322 | private: |
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 | |
329 | namespace WebCore { |
330 | class HTMLHRElement; |
331 | } |
332 | namespace WTF { |
333 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLHRElement, ArgType, false /* isBaseType */> { |
334 | public: |
335 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
336 | private: |
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 | |
343 | namespace WebCore { |
344 | class HTMLHeadElement; |
345 | } |
346 | namespace WTF { |
347 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLHeadElement, ArgType, false /* isBaseType */> { |
348 | public: |
349 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
350 | private: |
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 | |
357 | namespace WebCore { |
358 | class HTMLHtmlElement; |
359 | } |
360 | namespace WTF { |
361 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLHtmlElement, ArgType, false /* isBaseType */> { |
362 | public: |
363 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
364 | private: |
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 | |
371 | namespace WebCore { |
372 | class HTMLIFrameElement; |
373 | } |
374 | namespace WTF { |
375 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLIFrameElement, ArgType, false /* isBaseType */> { |
376 | public: |
377 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
378 | private: |
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 | |
385 | namespace WebCore { |
386 | class HTMLImageElement; |
387 | } |
388 | namespace WTF { |
389 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLImageElement, ArgType, false /* isBaseType */> { |
390 | public: |
391 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
392 | private: |
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 | |
399 | namespace WebCore { |
400 | class HTMLInputElement; |
401 | } |
402 | namespace WTF { |
403 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLInputElement, ArgType, false /* isBaseType */> { |
404 | public: |
405 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
406 | private: |
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 | |
413 | namespace WebCore { |
414 | class HTMLKeygenElement; |
415 | } |
416 | namespace WTF { |
417 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLKeygenElement, ArgType, false /* isBaseType */> { |
418 | public: |
419 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
420 | private: |
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 | |
427 | namespace WebCore { |
428 | class HTMLLIElement; |
429 | } |
430 | namespace WTF { |
431 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLLIElement, ArgType, false /* isBaseType */> { |
432 | public: |
433 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
434 | private: |
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 | |
441 | namespace WebCore { |
442 | class HTMLLabelElement; |
443 | } |
444 | namespace WTF { |
445 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLLabelElement, ArgType, false /* isBaseType */> { |
446 | public: |
447 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
448 | private: |
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 | |
455 | namespace WebCore { |
456 | class HTMLLegendElement; |
457 | } |
458 | namespace WTF { |
459 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLLegendElement, ArgType, false /* isBaseType */> { |
460 | public: |
461 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
462 | private: |
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 | |
469 | namespace WebCore { |
470 | class HTMLLinkElement; |
471 | } |
472 | namespace WTF { |
473 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLLinkElement, ArgType, false /* isBaseType */> { |
474 | public: |
475 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
476 | private: |
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 | |
483 | namespace WebCore { |
484 | class HTMLMapElement; |
485 | } |
486 | namespace WTF { |
487 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLMapElement, ArgType, false /* isBaseType */> { |
488 | public: |
489 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
490 | private: |
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 | |
497 | namespace WebCore { |
498 | class HTMLMarqueeElement; |
499 | } |
500 | namespace WTF { |
501 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLMarqueeElement, ArgType, false /* isBaseType */> { |
502 | public: |
503 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
504 | private: |
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 | |
511 | namespace WebCore { |
512 | class ; |
513 | } |
514 | namespace WTF { |
515 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLMenuElement, ArgType, false /* isBaseType */> { |
516 | public: |
517 | static bool (ArgType& node) { return checkTagName(node); } |
518 | private: |
519 | static bool (const WebCore::HTMLElement& element) { return element.hasTagName(WebCore::HTMLNames::menuTag); } |
520 | static bool (const WebCore::Node& node) { return node.hasTagName(WebCore::HTMLNames::menuTag); } |
521 | static bool (const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); } |
522 | }; |
523 | } |
524 | |
525 | namespace WebCore { |
526 | class ; |
527 | } |
528 | namespace WTF { |
529 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLMenuItemElement, ArgType, false /* isBaseType */> { |
530 | public: |
531 | static bool (ArgType& node) { return checkTagName(node); } |
532 | private: |
533 | static bool (const WebCore::HTMLElement& element) { return !element.isHTMLUnknownElement() && element.hasTagName(WebCore::HTMLNames::menuitemTag); } |
534 | static bool (const WebCore::Node& node) { return is<WebCore::HTMLElement>(node) && checkTagName(downcast<WebCore::HTMLElement>(node)); } |
535 | static bool (const WebCore::EventTarget& target) { return is<WebCore::Node>(target) && checkTagName(downcast<WebCore::Node>(target)); } |
536 | }; |
537 | } |
538 | |
539 | namespace WebCore { |
540 | class HTMLMetaElement; |
541 | } |
542 | namespace WTF { |
543 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLMetaElement, ArgType, false /* isBaseType */> { |
544 | public: |
545 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
546 | private: |
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 | |
553 | namespace WebCore { |
554 | class HTMLMeterElement; |
555 | } |
556 | namespace WTF { |
557 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLMeterElement, ArgType, false /* isBaseType */> { |
558 | public: |
559 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
560 | private: |
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 | |
567 | namespace WebCore { |
568 | class HTMLOListElement; |
569 | } |
570 | namespace WTF { |
571 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLOListElement, ArgType, false /* isBaseType */> { |
572 | public: |
573 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
574 | private: |
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 | |
581 | namespace WebCore { |
582 | class HTMLObjectElement; |
583 | } |
584 | namespace WTF { |
585 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLObjectElement, ArgType, false /* isBaseType */> { |
586 | public: |
587 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
588 | private: |
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 | |
595 | namespace WebCore { |
596 | class HTMLOptGroupElement; |
597 | } |
598 | namespace WTF { |
599 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLOptGroupElement, ArgType, false /* isBaseType */> { |
600 | public: |
601 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
602 | private: |
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 | |
609 | namespace WebCore { |
610 | class HTMLOptionElement; |
611 | } |
612 | namespace WTF { |
613 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLOptionElement, ArgType, false /* isBaseType */> { |
614 | public: |
615 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
616 | private: |
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 | |
623 | namespace WebCore { |
624 | class HTMLOutputElement; |
625 | } |
626 | namespace WTF { |
627 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLOutputElement, ArgType, false /* isBaseType */> { |
628 | public: |
629 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
630 | private: |
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 | |
637 | namespace WebCore { |
638 | class HTMLParagraphElement; |
639 | } |
640 | namespace WTF { |
641 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLParagraphElement, ArgType, false /* isBaseType */> { |
642 | public: |
643 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
644 | private: |
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 | |
651 | namespace WebCore { |
652 | class HTMLParamElement; |
653 | } |
654 | namespace WTF { |
655 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLParamElement, ArgType, false /* isBaseType */> { |
656 | public: |
657 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
658 | private: |
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 | |
665 | namespace WebCore { |
666 | class HTMLPictureElement; |
667 | } |
668 | namespace WTF { |
669 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLPictureElement, ArgType, false /* isBaseType */> { |
670 | public: |
671 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
672 | private: |
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 | |
679 | namespace WebCore { |
680 | class HTMLProgressElement; |
681 | } |
682 | namespace WTF { |
683 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLProgressElement, ArgType, false /* isBaseType */> { |
684 | public: |
685 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
686 | private: |
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 | |
693 | namespace WebCore { |
694 | class HTMLScriptElement; |
695 | } |
696 | namespace WTF { |
697 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLScriptElement, ArgType, false /* isBaseType */> { |
698 | public: |
699 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
700 | private: |
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 | |
707 | namespace WebCore { |
708 | class HTMLSelectElement; |
709 | } |
710 | namespace WTF { |
711 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLSelectElement, ArgType, false /* isBaseType */> { |
712 | public: |
713 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
714 | private: |
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 | |
721 | namespace WebCore { |
722 | class HTMLSlotElement; |
723 | } |
724 | namespace WTF { |
725 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLSlotElement, ArgType, false /* isBaseType */> { |
726 | public: |
727 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
728 | private: |
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 | |
735 | namespace WebCore { |
736 | class HTMLSourceElement; |
737 | } |
738 | namespace WTF { |
739 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLSourceElement, ArgType, false /* isBaseType */> { |
740 | public: |
741 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
742 | private: |
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 | |
749 | namespace WebCore { |
750 | class HTMLSpanElement; |
751 | } |
752 | namespace WTF { |
753 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLSpanElement, ArgType, false /* isBaseType */> { |
754 | public: |
755 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
756 | private: |
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 | |
763 | namespace WebCore { |
764 | class HTMLStyleElement; |
765 | } |
766 | namespace WTF { |
767 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLStyleElement, ArgType, false /* isBaseType */> { |
768 | public: |
769 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
770 | private: |
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 | |
777 | namespace WebCore { |
778 | class HTMLSummaryElement; |
779 | } |
780 | namespace WTF { |
781 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLSummaryElement, ArgType, false /* isBaseType */> { |
782 | public: |
783 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
784 | private: |
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 | |
791 | namespace WebCore { |
792 | class HTMLTableCaptionElement; |
793 | } |
794 | namespace WTF { |
795 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLTableCaptionElement, ArgType, false /* isBaseType */> { |
796 | public: |
797 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
798 | private: |
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 | |
805 | namespace WebCore { |
806 | class HTMLTableElement; |
807 | } |
808 | namespace WTF { |
809 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLTableElement, ArgType, false /* isBaseType */> { |
810 | public: |
811 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
812 | private: |
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 | |
819 | namespace WebCore { |
820 | class HTMLTableRowElement; |
821 | } |
822 | namespace WTF { |
823 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLTableRowElement, ArgType, false /* isBaseType */> { |
824 | public: |
825 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
826 | private: |
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 | |
833 | namespace WebCore { |
834 | class HTMLTemplateElement; |
835 | } |
836 | namespace WTF { |
837 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLTemplateElement, ArgType, false /* isBaseType */> { |
838 | public: |
839 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
840 | private: |
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 | |
847 | namespace WebCore { |
848 | class HTMLTextAreaElement; |
849 | } |
850 | namespace WTF { |
851 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLTextAreaElement, ArgType, false /* isBaseType */> { |
852 | public: |
853 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
854 | private: |
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 | |
861 | namespace WebCore { |
862 | class HTMLTimeElement; |
863 | } |
864 | namespace WTF { |
865 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLTimeElement, ArgType, false /* isBaseType */> { |
866 | public: |
867 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
868 | private: |
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 | |
875 | namespace WebCore { |
876 | class HTMLTitleElement; |
877 | } |
878 | namespace WTF { |
879 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLTitleElement, ArgType, false /* isBaseType */> { |
880 | public: |
881 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
882 | private: |
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 | |
889 | namespace WebCore { |
890 | class HTMLTrackElement; |
891 | } |
892 | namespace WTF { |
893 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLTrackElement, ArgType, false /* isBaseType */> { |
894 | public: |
895 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
896 | private: |
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 | |
903 | namespace WebCore { |
904 | class HTMLUListElement; |
905 | } |
906 | namespace WTF { |
907 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLUListElement, ArgType, false /* isBaseType */> { |
908 | public: |
909 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
910 | private: |
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 | |
917 | namespace WebCore { |
918 | class HTMLWBRElement; |
919 | } |
920 | namespace WTF { |
921 | template<typename ArgType> class TypeCastTraits<const WebCore::HTMLWBRElement, ArgType, false /* isBaseType */> { |
922 | public: |
923 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
924 | private: |
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 | |
931 | namespace WebCore { |
932 | class RubyElement; |
933 | } |
934 | namespace WTF { |
935 | template<typename ArgType> class TypeCastTraits<const WebCore::RubyElement, ArgType, false /* isBaseType */> { |
936 | public: |
937 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
938 | private: |
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 | |
945 | namespace WebCore { |
946 | class RubyTextElement; |
947 | } |
948 | namespace WTF { |
949 | template<typename ArgType> class TypeCastTraits<const WebCore::RubyTextElement, ArgType, false /* isBaseType */> { |
950 | public: |
951 | static bool isOfType(ArgType& node) { return checkTagName(node); } |
952 | private: |
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 | |