Closed Bug 1345044 Opened 7 years ago Closed 7 years ago

Make init*Event() arguments optional except the first

Categories

(Core :: DOM: Core & HTML, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: annevk, Assigned: smaug)

References

Details

Attachments

(3 files)

Priority: -- → P3
I think we should really make _all_ init*Events to follow the same pattern. The spec changes covered only parts.
Indeed, follow-up issues were filed for the UI Events specification, but they're simply not fixed yet there. All init*Event() methods should work the same though.
Assignee: nobody → bugs
Comment on attachment 8844701 [details] [diff] [review]
patch

This is rather mechanical change.
I explicitly didn't want to change argument names or anything, so the coding style in different webidl files vary.


There might be some failing tests which need minor tweaking.
Attachment #8844701 - Flags: review?(sshih)
And tests should be coming from w3C wpt
Comment on attachment 8844701 [details] [diff] [review]
patch

Should CompositionEvent also be covered? Others are good to me. Thanks.
Attachment #8844701 - Flags: review?(sshih) → review+
oh, fun. I do have the changes to CompositionEvent still in my editor, but apparently didn't click save.
And good catch!
Plenty of wpt failures.
I think better to wait for the wpt merge and then fix unexpected passes.
Depends on: 1345490
Do you want me to deal with the test failures for you?
Flags: needinfo?(bugs)
Oh, bug 1345490 landed. I was hoping jgraham would have landed also this at the same time.
But if you can fix the unexpected passes, great.
Flags: needinfo?(bugs)
I have a green try run <https://treeherder.mozilla.org/#/jobs?repo=try&revision=2869a57520517517bdb5b372abeb13d3d4cade70&selectedJob=88325633>, with one failure that's been fixed locally.  Should I just push this, or do you want to review the test changes?
Flags: needinfo?(bugs)
Why the additions to /testing/web-platform/meta/html/dom/interfaces.html.ini ?
Flags: needinfo?(bugs)
Because it wasn't updated for the spec change, so if I don't update it to match the new spec, we have new incorrect unexpected fails.
Flags: needinfo?(bugs)
What spec change? How is stuff like
"Element interface: document.createElement("noscript") must inherit property "slot" with the proper type " related to this all?
Why is
+[NoInterfaceObject,
+ Exposed=Window]
+interface Slotable {
+  readonly attribute HTMLSlotElement? assignedSlot;
+};
+Element implements Slotable;
+Text implements Slotable;
added in this bug?
Flags: needinfo?(bugs)
I explained in the commit message:

> The change to
> untested-interfaces.idl is basically just copying updates from
> dom/interfaces.html, which created four new expected failures that are
> unrelated to the code changes here. (I didn't think the noise was
> enough to bother separating into a different commit.)

The test IDL change is not related to this bug, it's just updating the test to a more recent IDL from the spec.  I could put that in a separate commit if you want.  Then I'd have to add some expected failures and remove them in the next commit.  I didn't do it because it was slightly more work and didn't seem to make a difference, but I can do it that way if you prefer.
Flags: needinfo?(bugs)
What I would expect to see here is no idl changes, only changes to .ini files by removing the annotations that some tests fail.
Please don't merge random changes to a single changeset.
Flags: needinfo?(bugs)
(The test updates are in a separate patch reviewed by jgraham.)
Flags: needinfo?(bugs)
Comment on attachment 8854421 [details] [diff] [review]
0001-Bug-1345044-Make-init-Event-arguments-optional-excep.patch

thanks
Flags: needinfo?(bugs)
Attachment #8854421 - Flags: review+
Pushed by ayg@aryeh.name:
https://hg.mozilla.org/integration/mozilla-inbound/rev/9f385861a95e
Update an IDL file for spec change; r=jgraham
https://hg.mozilla.org/integration/mozilla-inbound/rev/5b25d7259b4f
Make init*Event() arguments optional except the first; r=stone
https://hg.mozilla.org/mozilla-central/rev/9f385861a95e
https://hg.mozilla.org/mozilla-central/rev/5b25d7259b4f
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: