Bug 120676

Summary: Generate toFooElement() functions from tagname data.
Product: WebKit Reporter: Gyuyoung Kim <gyuyoung.kim>
Component: DOMAssignee: Gyuyoung Kim <gyuyoung.kim>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, darin, kling, tkent
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 120584    
Bug Blocks:    
Attachments:
Description Flags
Simple suggestion based on r154965
none
WIP
none
Patch none

Gyuyoung Kim
Reported 2013-09-04 04:16:07 PDT
As r154965, it looks we can also generate toFooElement() functions from tagname data. Kling, how do you think to generate toFooElement() as well ?
Attachments
Simple suggestion based on r154965 (3.76 KB, patch)
2013-09-04 04:18 PDT, Gyuyoung Kim
no flags
WIP (20.34 KB, patch)
2013-09-04 05:59 PDT, Gyuyoung Kim
no flags
Patch (39.68 KB, patch)
2013-09-04 20:37 PDT, Gyuyoung Kim
no flags
Gyuyoung Kim
Comment 1 2013-09-04 04:18:18 PDT
Created attachment 210444 [details] Simple suggestion based on r154965
Gyuyoung Kim
Comment 2 2013-09-04 05:59:21 PDT
Gyuyoung Kim
Comment 3 2013-09-04 20:37:20 PDT
WebKit Commit Bot
Comment 4 2013-09-04 20:38:55 PDT
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.
Andreas Kling
Comment 5 2013-09-05 15:29:33 PDT
Comment on attachment 210542 [details] Patch So cool! r=me
WebKit Commit Bot
Comment 6 2013-09-05 15:56:42 PDT
Comment on attachment 210542 [details] Patch Clearing flags on attachment: 210542 Committed r155155: <http://trac.webkit.org/changeset/155155>
WebKit Commit Bot
Comment 7 2013-09-05 15:56:45 PDT
All reviewed patches have been landed. Closing bug.
Kent Tamura
Comment 8 2013-09-09 23:37:29 PDT
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.
Note You need to log in before you can comment on or make changes to this bug.