Closed
Bug 971462
Opened 10 years ago
Closed 6 years ago
Simplify constructor of WidgetCommandEvent
Categories
(Core :: DOM: UI Events & Focus Handling, defect)
Core
DOM: UI Events & Focus Handling
Tracking
()
RESOLVED
FIXED
mozilla63
Tracking | Status | |
---|---|---|
firefox63 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
Details
Attachments
(2 files)
No description provided.
Assignee | ||
Comment 1•10 years ago
|
||
This is used only for onAppCommand... InitWithAppCommand() or SetAppCommand() is better?
Attachment #8374716 -
Flags: review?(bugs)
Comment 2•10 years ago
|
||
Comment on attachment 8374716 [details] [diff] [review] Patch This feels odd. Perhaps InitAppCommand should take two nsIAtoms, the one for userType and the one for command. Or just let the ctor to take command but hide nsGkAtoms::onAppCommand in the implementation of ctor, and don't have InitAppCommand at all.
Attachment #8374716 -
Flags: review?(bugs) → review-
Assignee | ||
Comment 3•10 years ago
|
||
(In reply to Olli Pettay [:smaug] from comment #2) > Perhaps InitAppCommand should take two nsIAtoms, the one for userType and > the one for command. I think that if we'll take this approach, the name should be InitCommand(). However, it looks like redundant all callers to pass nsGkAtoms::onAppCommand for the userType. Therefore, I added InitAppCommand() only for onAppCommand. Don't you mind the redundancy? > Or just let the ctor to take command but hide nsGkAtoms::onAppCommand in the > implementation of ctor, and don't have InitAppCommand at all. I think that this is not good for the case of document.createEvent("commandevent").
Flags: needinfo?(bugs)
Comment 4•10 years ago
|
||
How is .createEvent case relevant here? Could we actually get rid of gecko only CommandEvent, and just make FF UI to use the better keyboard event support we have these days.
Flags: needinfo?(bugs)
Assignee | ||
Comment 5•6 years ago
|
||
The constructor of WidgetCommandEvent takes 2 nsAtom pointers. One is for specifying event type, the other is for specifying the command. The difference of these arguments are pretty unclear for other developers and the former argument is always nsGkAtoms::onAppCommand unless nullptr in C++ code. So, we can hide the former argument. Then, we should create another constructor for creating empty command event from constructor of dom::CommandEvent.
Comment 6•6 years ago
|
||
Comment on attachment 8995941 [details] Bug 971462 - Hide event type from constructor of WidgetCommandEvent Olli Pettay [:smaug] has approved the revision. https://phabricator.services.mozilla.com/D2506
Attachment #8995941 -
Flags: review+
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/86f8589018f6 Hide event type from constructor of WidgetCommandEvent r=smaug
Assignee | ||
Comment 8•6 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=2a72ef5aa2c9fd24e20202dedf2004e98a6cb6ac
Comment 9•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/86f8589018f6
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox63:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Updated•5 years ago
|
Component: Event Handling → User events and focus handling
You need to log in
before you can comment on or make changes to this bug.
Description
•