Bug 67568

Summary: Document.createEvent should support all the interfaces of Event we got
Product: WebKit Reporter: Sam Weinig <sam>
Component: New BugsAssignee: Sam Weinig <sam>
Status: RESOLVED FIXED    
Severity: Normal CC: dglazkov, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch andersca: review+, webkit.review.bot: commit-queue-

Sam Weinig
Reported 2011-09-03 13:33:43 PDT
Document.createEvent should support all the interfaces of Event we got
Attachments
Patch (32.66 KB, patch)
2011-09-03 13:47 PDT, Sam Weinig
no flags
Patch (35.36 KB, patch)
2011-09-04 13:38 PDT, Sam Weinig
andersca: review+
webkit.review.bot: commit-queue-
Sam Weinig
Comment 1 2011-09-03 13:47:48 PDT
WebKit Review Bot
Comment 2 2011-09-03 13:48:51 PDT
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.
Sam Weinig
Comment 3 2011-09-03 13:51:30 PDT
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.
WebKit Review Bot
Comment 4 2011-09-03 14:08:44 PDT
Comment on attachment 106267 [details] Patch Attachment 106267 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/9586858
WebKit Review Bot
Comment 5 2011-09-03 14:28:31 PDT
Comment on attachment 106267 [details] Patch Attachment 106267 [details] did not pass cr-mac-ews (chromium): Output: http://queues.webkit.org/results/9590208
Sam Weinig
Comment 6 2011-09-04 13:38:26 PDT
Sam Weinig
Comment 7 2011-09-04 13:39:32 PDT
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.
WebKit Review Bot
Comment 8 2011-09-04 13:42:30 PDT
Comment on attachment 106294 [details] Patch Attachment 106294 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/9595081
Sam Weinig
Comment 9 2011-09-04 14:03:11 PDT
Note You need to log in before you can comment on or make changes to this bug.