Document.createEvent should support all the interfaces of Event we got
Created attachment 106267 [details] Patch
Attachment 106267 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/fast..." exit_code: 1 LayoutTests/ChangeLog:9: Need whitespace between colon and description [changelog/filechangedescriptionwhitespace] [5] Source/WebCore/dom/Document.cpp:98: "HashChangeEvent.h" already included at Source/WebCore/dom/Document.cpp:97 [build/include] [4] Total errors found: 2 in 7 files If any of these errors are false positives, please file a bug against check-webkit-style.
Throwing this patch up to run it on the bots. There are few things I don't like about it: 1) It doesn't make it any harder for people to make this mistake in the future. One idea I had about that was replacing all the isFooEvent() virtual functions with a virtual function that returns an enum EventType, and then somehow switching on that event type in Document.createEvent() (sans-default), thus making it a compile error to not add a case. 2) The test contains commented out code to test the interfaces that are not on in the main builds. I should really move it, but it makes me sad.
Comment on attachment 106267 [details] Patch Attachment 106267 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/9586858
Comment on attachment 106267 [details] Patch Attachment 106267 [details] did not pass cr-mac-ews (chromium): Output: http://queues.webkit.org/results/9590208
Created attachment 106294 [details] Patch
I like this version a bit more, and I think this is as far down the rabbit hole as I want to go. If I think of better ways to prevent this mistake in the future, I will file follow ups.
Comment on attachment 106294 [details] Patch Attachment 106294 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/9595081
Committed r94505: <http://trac.webkit.org/changeset/94505>