Bug 120584

Summary: Generate isFooElement() functions from tagname data.
Product: WebKit Reporter: Andreas Kling <kling>
Component: DOMAssignee: Andreas Kling <kling>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, commit-queue, kling, koivisto, rniwa
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 120605    
Bug Blocks: 120297, 120676    
Attachments:
Description Flags
Patch
koivisto: review+, buildbot: commit-queue-
Patch for landing?
commit-queue: commit-queue-
No? This time?
none
Without kling-relative paths :|
commit-queue: commit-queue-
With HTMLElementTypeChecks.h copied to privateheaders
commit-queue: commit-queue-
Patch for landing... none

Description Andreas Kling 2013-09-01 12:20:58 PDT
Generate isFooElement() functions from tagname data.
Comment 1 Andreas Kling 2013-09-01 12:38:27 PDT
Created attachment 210253 [details]
Patch
Comment 2 WebKit Commit Bot 2013-09-01 12:40:17 PDT
Attachment 210253 [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/HTMLBaseElement.h', u'Source/WebCore/html/HTMLCanvasElement.h', u'Source/WebCore/html/HTMLElement.h', u'Source/WebCore/html/HTMLFieldSetElement.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/HTMLLegendElement.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/HTMLParamElement.h', u'Source/WebCore/html/HTMLProgressElement.h', u'Source/WebCore/html/HTMLScriptElement.h', u'Source/WebCore/html/HTMLSourceElement.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/html/HTMLTrackElement.h', u'Source/WebCore/svg/SVGElement.h', u'Source/WebCore/svg/SVGFontElement.h', u'Source/WebCore/svg/SVGFontFaceElement.h', u'Source/WebCore/svg/SVGForeignObjectElement.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:27:  Alphabetical sorting problem.  [build/include_order] [4]
Total errors found: 1 in 10 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Antti Koivisto 2013-09-01 12:57:51 PDT
Comment on attachment 210253 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=210253&action=review

r=me, nice, so much red!

> Source/WebCore/dom/make_names.pl:648
> +sub printTypeChecksHeaderFile
> +{
> +    my ($headerPath) = shift;
> +    my $F;
> +    open F, ">$headerPath";
> +    printLicenseHeader($F);
> +

Could this include some information about how the file was generated on top of the header?

> Source/WebCore/html/HTMLTagNames.in:27
>  body
>  br interfaceName=HTMLBRElement
>  button constructorNeedsFormElement
> -canvas
> +canvas generateTypeChecks
>  caption interfaceName=HTMLTableCaptionElement

It would nice to get these for all types where it works (either automatically or adding generateTypeChecks). It is kinda non-obvious you need to locate this file and add some magic keywords to fix the problem.
Comment 4 Build Bot 2013-09-01 13:17:11 PDT
Comment on attachment 210253 [details]
Patch

Attachment 210253 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/1641775
Comment 5 Build Bot 2013-09-01 13:21:27 PDT
Comment on attachment 210253 [details]
Patch

Attachment 210253 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/1657705
Comment 6 Andreas Kling 2013-09-02 08:11:37 PDT
Committed r154955: <http://trac.webkit.org/changeset/154955>
Comment 7 WebKit Commit Bot 2013-09-02 08:15:58 PDT
Re-opened since this is blocked by bug 120605
Comment 8 Andreas Kling 2013-09-02 08:31:15 PDT
Created attachment 210289 [details]
Patch for landing?

Xcode4 on bots didn't like my xcodeproj despite it building fine locally :(
Let's see if this works better.
Comment 9 WebKit Commit Bot 2013-09-02 08:32:59 PDT
Comment on attachment 210289 [details]
Patch for landing?

Rejecting attachment 210289 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.appspot.com', '--bot-id=webkit-cq-01', 'validate-changelog', '--check-oops', '--non-interactive', 210289, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

ChangeLog entry in Source/WebCore/ChangeLog contains OOPS!.

Full output: http://webkit-queues.appspot.com/results/1688031
Comment 10 Andreas Kling 2013-09-02 08:33:49 PDT
Created attachment 210290 [details]
No? This time?
Comment 11 WebKit Commit Bot 2013-09-02 08:34:54 PDT
Attachment 210290 [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/HTMLBaseElement.h', u'Source/WebCore/html/HTMLCanvasElement.h', u'Source/WebCore/html/HTMLElement.h', u'Source/WebCore/html/HTMLFieldSetElement.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/HTMLLegendElement.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/HTMLParamElement.h', u'Source/WebCore/html/HTMLProgressElement.h', u'Source/WebCore/html/HTMLScriptElement.h', u'Source/WebCore/html/HTMLSourceElement.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/html/HTMLTrackElement.h', u'Source/WebCore/svg/SVGElement.h', u'Source/WebCore/svg/SVGFontElement.h', u'Source/WebCore/svg/SVGFontFaceElement.h', u'Source/WebCore/svg/SVGForeignObjectElement.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 10 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 12 Andreas Kling 2013-09-02 08:56:41 PDT
Oh wow I see the problem. I am an idiot.
Comment 13 Andreas Kling 2013-09-02 09:30:54 PDT
Created attachment 210295 [details]
Without kling-relative paths :|
Comment 14 WebKit Commit Bot 2013-09-02 09:32:22 PDT
Attachment 210295 [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/HTMLBaseElement.h', u'Source/WebCore/html/HTMLCanvasElement.h', u'Source/WebCore/html/HTMLElement.h', u'Source/WebCore/html/HTMLFieldSetElement.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/HTMLLegendElement.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/HTMLParamElement.h', u'Source/WebCore/html/HTMLProgressElement.h', u'Source/WebCore/html/HTMLScriptElement.h', u'Source/WebCore/html/HTMLSourceElement.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/html/HTMLTrackElement.h', u'Source/WebCore/svg/SVGElement.h', u'Source/WebCore/svg/SVGFontElement.h', u'Source/WebCore/svg/SVGFontFaceElement.h', u'Source/WebCore/svg/SVGForeignObjectElement.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 10 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 15 WebKit Commit Bot 2013-09-02 10:05:27 PDT
Comment on attachment 210295 [details]
Without kling-relative paths :|

Rejecting attachment 210295 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.appspot.com', '--bot-id=webkit-cq-03', 'build', '--no-clean', '--no-update', '--build-style=release', '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit

Last 500 characters of output:
mmands failed:
	CompileC /Volumes/Data/EWS/WebKit/WebKitBuild/WebKit.build/Release/WebKit.build/Objects-normal/x86_64/WebChromeClient.o mac/WebCoreSupport/WebChromeClient.mm normal x86_64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler
	CompileC /Volumes/Data/EWS/WebKit/WebKitBuild/WebKit.build/Release/WebKit.build/Objects-normal/x86_64/WebFrameLoaderClient.o mac/WebCoreSupport/WebFrameLoaderClient.mm normal x86_64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler
(2 failures)

Full output: http://webkit-queues.appspot.com/results/1680520
Comment 16 Build Bot 2013-09-02 10:09:49 PDT
Comment on attachment 210295 [details]
Without kling-relative paths :|

Attachment 210295 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/1684059
Comment 17 Build Bot 2013-09-02 10:16:50 PDT
Comment on attachment 210295 [details]
Without kling-relative paths :|

Attachment 210295 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/1689028
Comment 18 Andreas Kling 2013-09-02 10:23:25 PDT
Created attachment 210299 [details]
With HTMLElementTypeChecks.h copied to privateheaders
Comment 19 WebKit Commit Bot 2013-09-02 10:58:01 PDT
Comment on attachment 210299 [details]
With HTMLElementTypeChecks.h copied to privateheaders

Rejecting attachment 210299 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.appspot.com', '--bot-id=webkit-cq-03', 'build', '--no-clean', '--no-update', '--build-style=release', '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit

Last 500 characters of output:
ommands failed:
	CompileC /Volumes/Data/EWS/WebKit/WebKitBuild/WebKit.build/Release/WebKit.build/Objects-normal/x86_64/WebChromeClient.o mac/WebCoreSupport/WebChromeClient.mm normal x86_64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler
	CompileC /Volumes/Data/EWS/WebKit/WebKitBuild/WebKit.build/Release/WebKit.build/Objects-normal/x86_64/WebFullScreenController.o mac/WebView/WebFullScreenController.mm normal x86_64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler
(2 failures)

Full output: http://webkit-queues.appspot.com/results/1609997
Comment 20 Andreas Kling 2013-09-02 11:55:25 PDT
Created attachment 210304 [details]
Patch for landing...

I wonder how my local environment can be this robust against mistakes.
Comment 21 WebKit Commit Bot 2013-09-02 13:09:07 PDT
Comment on attachment 210304 [details]
Patch for landing...

Clearing flags on attachment: 210304

Committed r154965: <http://trac.webkit.org/changeset/154965>
Comment 22 WebKit Commit Bot 2013-09-02 13:09:12 PDT
All reviewed patches have been landed.  Closing bug.