Closed
Bug 942689
Opened 11 years ago
Closed 11 years ago
Defect - Simulated mouse events for tap gestures do not include modifier key info
Categories
(Core :: Panning and Zooming, defect, P2)
Tracking
()
RESOLVED
FIXED
mozilla28
Tracking | Status | |
---|---|---|
firefox28 | --- | fixed |
People
(Reporter: mbrubeck, Assigned: mbrubeck)
References
Details
(Whiteboard: [block28] feature=defect c=tbd u=tbd p=2 [qa-])
Attachments
(1 file, 1 obsolete file)
AsyncPanZoomController and GestureEventListener pass "tap" events to the GeckoContentController, which uses them to generate mouse events. However, these events do not include the appropriate modifier flags when modifier keys (e.g. ctrl, alt, shift) are pressed. In Metro Firefox, bug 941324 switched from generating mouse events in widget code to using APZC's GestureEventListener. This broke things like control-clictap to open a link in a new window. This patch adds modifier info to the tap events produced by APZC, and makes the Metro front-end use this info when generating mouse events. (We'll need to do the same for B2G in a follow-up patch, though this isn't critical until B2G devices have hardware keyboards.) Requesting review from jimm for the Windows parts, roc for the xpwidgets parts, and botond for the gfx parts. One question in particular: Is there a better way or place to handle the conversion from the widget mozilla::Modifiers to the nsIDOMWindowUtils modifier flags?
Attachment #8337528 -
Flags: review?(roc)
Attachment #8337528 -
Flags: review?(jmathies)
Attachment #8337528 -
Flags: review?(botond)
Assignee | ||
Comment 1•11 years ago
|
||
Sorry, found one line that I missed in the previous version.
Attachment #8337528 -
Attachment is obsolete: true
Attachment #8337528 -
Flags: review?(roc)
Attachment #8337528 -
Flags: review?(jmathies)
Attachment #8337528 -
Flags: review?(botond)
Attachment #8337529 -
Flags: review?(roc)
Attachment #8337529 -
Flags: review?(jmathies)
Attachment #8337529 -
Flags: review?(botond)
Attachment #8337529 -
Flags: review?(roc) → review+
Comment 2•11 years ago
|
||
Comment on attachment 8337529 [details] [diff] [review] patch v2 nice! For the mod flag conversions, you might flag masayuki, he's the expert on that down in widget.
Attachment #8337529 -
Flags: review?(jmathies) → review+
Assignee | ||
Comment 3•11 years ago
|
||
This Try push failed on B2G because of a build error in ContentProcessController: https://tbpl.mozilla.org/?tree=Try&rev=d91c9ad09ca2 Pushed again with a trivial fix: https://tbpl.mozilla.org/?tree=Try&rev=358cb673e158
Assignee | ||
Comment 4•11 years ago
|
||
Comment on attachment 8337529 [details] [diff] [review] patch v2 Masayuki, is this a reasonable way to convert the widget "Modifiers" flags to ones that can be used with nsIDOMWindowUtils? Is there a better solution?
Attachment #8337529 -
Flags: feedback?(masayuki)
Assignee | ||
Updated•11 years ago
|
OS: Windows 8.1 → All
Hardware: x86_64 → All
Summary: Simulated mouse events for tap gestures do not include modifier key info → Defect - Simulated mouse events for tap gestures do not include modifier key info
Whiteboard: [block28]
Updated•11 years ago
|
Blocks: metrov1it20
Priority: -- → P2
QA Contact: jbecerra
Whiteboard: [block28] → [block28] feature=defect c=tbd u=tbd p=2
Comment 5•11 years ago
|
||
Comment on attachment 8337529 [details] [diff] [review] patch v2 Review of attachment 8337529 [details] [diff] [review]: ----------------------------------------------------------------- We also have GeckoContentController implementations in http://mxr.mozilla.org/mozilla-central/source/widget/android/AndroidBridge.h and http://mxr.mozilla.org/mozilla-central/source/widget/gonk/ParentProcessController.h. The Android one isn't currently used, but the file is still compiled, and the overridden methods are marked MOZ_OVERRIDE, so the signatures of Handle*Tap need to be updated to not break Fennec builds. The implementations can ignore the modifiers for now. The parent process one just has no ops for the Handle*Tap functions, but again the signatures need to be updated. r=me with these changes. ::: dom/ipc/TabParent.cpp @@ +498,3 @@ > { > if (!mIsDestroyed) { > unused << SendHandleDoubleTap(aPoint); Is propagating the modifiers to TabChild the part that you said will be done in a follow-up patch? If so, can you add a TODO comment in these functions? ::: gfx/layers/ipc/AsyncPanZoomController.cpp @@ +114,5 @@ > + return result; > +} > + > +} > + If there is a more general place in the code than AsyncPanZoomController.cpp to place this function, I think we should do that. If not then there is fine.
Attachment #8337529 -
Flags: review?(botond) → review+
Assignee | ||
Comment 6•11 years ago
|
||
(In reply to Botond Ballo [:botond] from comment #5) > The Android one isn't currently used, but the file is still compiled, and > the overridden methods are marked MOZ_OVERRIDE, so the signatures of > Handle*Tap need to be updated to not break Fennec builds. The > implementations can ignore the modifiers for now. Pushed to Try again with build fixes: https://tbpl.mozilla.org/?tree=Try&rev=19e70444723b > ::: dom/ipc/TabParent.cpp > Is propagating the modifiers to TabChild the part that you said will be done > in a follow-up patch? If so, can you add a TODO comment in these functions? Yes -- I'll file the follow-up bug once this lands, and I can write a patch too. > If there is a more general place in the code than AsyncPanZoomController.cpp > to place this function, I think we should do that. If not then there is fine. I'm open to suggestions here. I considered putting it in nsDOMWindowUtils, but I'd need to add it as a public API rather than a static function...
Assignee | ||
Comment 7•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/c3110e9acf10
Comment 8•11 years ago
|
||
Comment on attachment 8337529 [details] [diff] [review] patch v2 Hmm, IIRC, nsDOMWindowUtils.cpp already has same method. Could you make it as static and use it from the AsyncPanZoomController.cpp?
Comment 9•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/c3110e9acf10
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Assignee | ||
Comment 10•11 years ago
|
||
(In reply to Masayuki Nakano (:masayuki) (Mozilla Japan) from comment #8) > Hmm, IIRC, nsDOMWindowUtils.cpp already has same method. Could you make it > as static and use it from the AsyncPanZoomController.cpp? nsDOMWindowUtils only has a method to do the reverse conversion (from nsIDOMWindowUtils modifiers to mozilla::Modifiers). Also, I think we can't use static nsDOMWindowUtils methods from AsyncPanZoomController, because nsDOMWindowUtils.h is not exported. Should we move this new method to nsDOMWindowUtils, and add that header to EXPORTS so we can use it from gfx?
Comment 11•11 years ago
|
||
(In reply to Matt Brubeck (:mbrubeck) from comment #10) > (In reply to Masayuki Nakano (:masayuki) (Mozilla Japan) from comment #8) > > Hmm, IIRC, nsDOMWindowUtils.cpp already has same method. Could you make it > > as static and use it from the AsyncPanZoomController.cpp? > > nsDOMWindowUtils only has a method to do the reverse conversion (from > nsIDOMWindowUtils modifiers to mozilla::Modifiers). Ah... > Also, I think we can't use static nsDOMWindowUtils methods from > AsyncPanZoomController, because nsDOMWindowUtils.h is not exported. > > Should we move this new method to nsDOMWindowUtils, and add that header to > EXPORTS so we can use it from gfx? Hmm, then, I think that WidgetInputEvent should have two static methods for converting modifier flags. If it's implemented in WidgetEventsImpl.cpp, it doesn't harm include hell. I'll file a bug for this issue.
Assignee | ||
Updated•11 years ago
|
Attachment #8337529 -
Flags: feedback?(masayuki)
status-firefox28:
--- → fixed
Whiteboard: [block28] feature=defect c=tbd u=tbd p=2 → [block28] feature=defect c=tbd u=tbd p=2 [qa-]
You need to log in
before you can comment on or make changes to this bug.
Description
•