As r154965, it looks we can also generate toFooElement() functions from tagname data. Kling, how do you think to generate toFooElement() as well ?
Created attachment 210444 [details] Simple suggestion based on r154965
Created attachment 210451 [details] WIP
Created attachment 210542 [details] Patch
Attachment 210542 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/GNUmakefile.am', u'Source/WebCore/GNUmakefile.list.am', u'Source/WebCore/WebCore.vcxproj/WebCore.vcxproj', u'Source/WebCore/WebCore.xcodeproj/project.pbxproj', u'Source/WebCore/dom/make_names.pl', u'Source/WebCore/html/HTMLAnchorElement.h', u'Source/WebCore/html/HTMLAreaElement.h', u'Source/WebCore/html/HTMLAudioElement.h', u'Source/WebCore/html/HTMLCanvasElement.h', u'Source/WebCore/html/HTMLElement.h', u'Source/WebCore/html/HTMLFormElement.h', u'Source/WebCore/html/HTMLFrameSetElement.h', u'Source/WebCore/html/HTMLImageElement.h', u'Source/WebCore/html/HTMLInputElement.h', u'Source/WebCore/html/HTMLLabelElement.h', u'Source/WebCore/html/HTMLMapElement.h', u'Source/WebCore/html/HTMLMeterElement.h', u'Source/WebCore/html/HTMLOptGroupElement.h', u'Source/WebCore/html/HTMLOptionElement.h', u'Source/WebCore/html/HTMLProgressElement.h', u'Source/WebCore/html/HTMLScriptElement.h', u'Source/WebCore/html/HTMLStyleElement.h', u'Source/WebCore/html/HTMLTableElement.h', u'Source/WebCore/html/HTMLTableRowElement.h', u'Source/WebCore/html/HTMLTagNames.in', u'Source/WebCore/html/HTMLTextAreaElement.h', u'Source/WebCore/html/HTMLTitleElement.h', u'Source/WebCore/svg/SVGElement.h', u'Source/WebCore/svg/SVGFontElement.h', u'Source/WebCore/svg/SVGFontFaceElement.h', u'Source/WebCore/svg/SVGImageElement.h', u'Source/WebCore/svg/SVGScriptElement.h', u'Source/WebCore/svg/svgtags.in']" exit_code: 1 Source/WebCore/html/HTMLElement.h:28: Alphabetical sorting problem. [build/include_order] [4] Total errors found: 1 in 11 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 210542 [details] Patch So cool! r=me
Comment on attachment 210542 [details] Patch Clearing flags on attachment: 210542 Committed r155155: <http://trac.webkit.org/changeset/155155>
All reviewed patches have been landed. Closing bug.
Comment on attachment 210542 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=210542&action=review > Source/WebCore/dom/make_names.pl:638 > + print F "inline $class* $castingHelper(Node* node) { ASSERT_WITH_SECURITY_IMPLICATION(!node || $checkHelper(node)); return reinterpret_cast<".$class."*>(node); }\n"; AFAIK, C++ standard doesn't have guarantee that reinterpret_cast<derived_class*>(base_class_pointer) works. It's a compiler-dependent behavior.