Bug 166284 - Remove initEvent quirk
Summary: Remove initEvent quirk
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-20 15:04 PST by Alex Christensen
Modified: 2017-01-03 23:55 PST (History)
10 users (show)

See Also:


Attachments
Patch (5.52 KB, patch)
2016-12-20 15:12 PST, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (9.28 KB, patch)
2016-12-20 15:39 PST, Alex Christensen
mitz: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2016-12-20 15:04:18 PST
Remove initEvent quirk
Comment 1 Alex Christensen 2016-12-20 15:12:47 PST
Created attachment 297558 [details]
Patch
Comment 2 Alex Christensen 2016-12-20 15:39:53 PST
Created attachment 297563 [details]
Patch
Comment 3 Alex Christensen 2016-12-20 15:54:40 PST
http://trac.webkit.org/changeset/210045
Comment 4 Alexey Proskuryakov 2016-12-20 19:41:43 PST
Is there a radar tracking this?
Comment 5 Alex Christensen 2016-12-20 22:42:11 PST
rdar://problem/29420268
Comment 6 Chris Dumez 2017-01-03 09:09:25 PST
Comment on attachment 297563 [details]
Patch

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

> Source/WebCore/ChangeLog:9
> +        Many web compatibility issues have been found, which leads us to believe that many more exist.

I disagree with this comment, there were no Web compatibility issues found. It merely broke several iOS apps that are WebKit-specific and relied on our bug. Because of this, I believe it is going to be difficult the get the specification changed. It is also going to be difficult to get the specification changed because every other browser out there matches the specification.
I don't mind trying to get the spec changed but until it does, I believe the way forward for us is to use the quirk for iOS apps, not *regress* our standards compliance and interoperability with other browsers.
Comment 7 Chris Dumez 2017-01-03 09:12:13 PST
Comment on attachment 297563 [details]
Patch

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

> Source/WebCore/dom/Event.idl:69
> +    void initEvent(optional DOMString type = "undefined", optional boolean bubbles = false, optional boolean cancelable = false);

Also I doubt there is any app calling initEvent without the first parameter.
Comment 8 Darin Adler 2017-01-03 10:22:09 PST
I agree with Chris’s comments.
Comment 9 Chris Dumez 2017-01-03 10:42:49 PST
(In reply to comment #8)
> I agree with Chris’s comments.

Alex pointed out that Chrome does not match the spec either so we are discussing this upstream at https://github.com/whatwg/dom/issues/387.

I will follow up once we reach agreement at spec-level.
Comment 10 Alex Christensen 2017-01-03 12:58:08 PST
I didn't find any content calling initEvent without the first parameter, they were just missing the second and third.  This just reverted completely to our old behavior.
I think we should definitely become spec compliant, but this doesn't seem to cause interoperability issues; I haven't seen any content that relies on a JavaScript exception when there are fewer than three parameters.
Comment 11 Darin Adler 2017-01-03 23:55:24 PST
Sounds like a good approach.