Closed Bug 1124608 Opened 10 years ago Closed 10 years ago

Support D3E EventModifierInit

Categories

(Core :: DOM: Events, defect)

defect
Not set
normal

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)

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.
and MouseEventInit and KeyboardEventInit extends this one? Please call the dictionary something else. Like EventModifierInit : UIEventInit
(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.
Attached patch Patch (obsolete) — Splinter Review
Attachment #8554108 - Flags: review?(bugs)
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-
Hmm, so, do you think that these issues should be fixed in the spec side?
Flags: needinfo?(bugs)
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)
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
Attached patch PatchSplinter Review
Attachment #8554108 - Attachment is obsolete: true
Attachment #8589645 - Flags: review?(bugs)
Attachment #8589645 - Flags: review?(bugs) → review+
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
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
Flags: needinfo?(jypenator)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: