Closed
Bug 1124608
Opened 10 years ago
Closed 10 years ago
Support D3E EventModifierInit
Categories
(Core :: DOM: Events, defect)
Core
DOM: Events
Tracking
()
RESOLVED
FIXED
mozilla40
Tracking | Status | |
---|---|---|
firefox40 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
References
Details
(Keywords: dev-doc-needed)
Attachments
(1 file, 1 obsolete file)
19.15 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
dictionary SharedKeyboardAndMouseEventInit : UIEventInit {
boolean ctrlKey = false;
boolean shiftKey = false;
boolean altKey = false;
boolean metaKey = false;
boolean keyModifierStateAltGraph = false;
boolean keyModifierStateCapsLock = false;
boolean keyModifierStateFn = false;
boolean keyModifierStateFnLock = false;
boolean keyModifierStateHyper = false;
boolean keyModifierStateNumLock = false;
boolean keyModifierStateOS = false;
boolean keyModifierStateScrollLock = false;
boolean keyModifierStateSuper = false;
boolean keyModifierStateSymbol = false;
boolean keyModifierStateSymbolLock = false;
};
This is necessary for supporting to initialize all modifier states at creating a KeyboardEvent or MouseEvent.
Comment 1•10 years ago
|
||
and MouseEventInit and KeyboardEventInit extends this one?
Please call the dictionary something else.
Like EventModifierInit : UIEventInit
Assignee | ||
Comment 2•10 years ago
|
||
(In reply to Olli Pettay [:smaug] from comment #1)
> and MouseEventInit and KeyboardEventInit extends this one?
Yes, D3E spec defines so.
> Please call the dictionary something else.
> Like EventModifierInit : UIEventInit
Okay, thank you.
Assignee | ||
Comment 3•10 years ago
|
||
Attachment #8554108 -
Flags: review?(bugs)
Comment 4•10 years ago
|
||
Comment on attachment 8554108 [details] [diff] [review]
Patch
>+// Called as SharedKeyboardAndMouseEventInit in D3E spec.
Please get the dictionary fixed there too.
What if some other event type wants to use the dictionary? Then it won't
be only for KeyboardEvent or MouseEvent
>+// NOTE: Gecko doesn't support commented out modifiers yet.
>+dictionary EventModifierInit : UIEventInit
>+{
>+ boolean ctrlKey = false;
>+ boolean shiftKey = false;
>+ boolean altKey = false;
>+ boolean metaKey = false;
>+ boolean keyModifierStateAltGraph = false;
>+ boolean keyModifierStateCapsLock = false;
>+ boolean keyModifierStateFn = false;
>+ // boolean keyModifierStateFnLock = false;
>+ // boolean keyModifierStateHyper = false;
>+ boolean keyModifierStateNumLock = false;
>+ boolean keyModifierStateOS = false;
>+ boolean keyModifierStateScrollLock = false;
>+ // boolean keyModifierStateSuper = false;
>+ // boolean keyModifierStateSymbol = false;
>+ boolean keyModifierStateSymbolLock = false;
>+};
Why the new names are so super long.
This feels a bit developer hostile.
Sorry that I didn't realize this earlier.
Attachment #8554108 -
Flags: review?(bugs) → review-
Assignee | ||
Comment 5•10 years ago
|
||
Hmm, so, do you think that these issues should be fixed in the spec side?
Flags: needinfo?(bugs)
Comment 6•10 years ago
|
||
yes. I think we should figure out better API and get that spec'ed and implement that.
It is not clear to me why the properties in the dictionary need to be so long and repetitive.
Flags: needinfo?(bugs)
Assignee | ||
Comment 7•10 years ago
|
||
Assignee | ||
Comment 8•10 years ago
|
||
renamed:
dictionary EventModifierInit : UIEventInit {
boolean ctrlKey = false;
boolean shiftKey = false;
boolean altKey = false;
boolean metaKey = false;
boolean modifierAltGraph = false;
boolean modifierCapsLock = false;
boolean modifierFn = false;
boolean modifierFnLock = false;
boolean modifierHyper = false;
boolean modifierNumLock = false;
boolean modifierOS = false;
boolean modifierScrollLock = false;
boolean modifierSuper = false;
boolean modifierSymbol = false;
boolean modifierSymbolLock = false;
};
https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#idl-def-EventModifierInit
Summary: Support D3E SharedKeyboardAndMouseEventInit → Support D3E EventModifierInit
Assignee | ||
Comment 9•10 years ago
|
||
Attachment #8554108 -
Attachment is obsolete: true
Attachment #8589645 -
Flags: review?(bugs)
Updated•10 years ago
|
Attachment #8589645 -
Flags: review?(bugs) → review+
Updated•10 years ago
|
Keywords: dev-doc-needed
Assignee | ||
Comment 10•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/1443401a43fb
teoli:
Looks like there are no entry for Event*Init dictionary in MDN. For example, https://developer.mozilla.org/en/docs/Web/API/Event/Event documents it as just an argument of Event constructor. However, the series of Event*Init has independent hierarchy. E.g.,
interface: Event -> UIEvent -> MouseEvent
dictionary: EventInit -> UIEventInit -> EventModifierInit -> MouseEventInit
So, I think that MDN should have /docs/Web/API/Event/(Init|Dictionary)/ or something.
Flags: needinfo?(jypenator)
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-firefox40:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
Updated•8 years ago
|
Flags: needinfo?(jypenator)
You need to log in
before you can comment on or make changes to this bug.
Description
•