Closed Bug 1289435 Opened 8 years ago Closed 8 years ago

Support touch event synthesization on non-touch Windows

Categories

(Core :: Panning and Zooming, defect, P3)

50 Branch
Unspecified
Windows
defect

Tracking

()

RESOLVED FIXED
mozilla51
Tracking Status
firefox50 --- wontfix
firefox51 --- fixed

People

(Reporter: kats, Assigned: kats)

References

Details

(Whiteboard: [gfx-noted])

Attachments

(3 files)

+++ This bug was initially created as a clone of Bug #1288187 +++ Same thing as bug 1288187, but this bug is for non-touch windows devices, where the native synthesization code currently bails out at [1]. [1] http://searchfox.org/mozilla-central/rev/868b17897f7a7fcd7f6f67fd8185a7370db46604/widget/windows/nsWindowBase.cpp#131
Summary: Support touch event synthesization on OS X → Support touch event synthesization on non-touch Windows
Note to self: :bigben pointed out that the code I added in bug 1288187 was missing timestamps on the events, so that needs to be fixed as well.
So it seems like on tryserver now the InitTouchInjection codepath is the one being taken, and synthesizing touch events seems to somehow trigger a WM_LBUTTONDOWN at an inopportune time, which creates a mouse-drag block and disrupts the touch block. If I force the code to return false from InitTouchInjection so that we use the fake touch events I added, then the tests pass just fine. I'm not sure why this mouse event is getting generated. I think for now it's still worth landing the code even if we don't enable the tests on windows, because the devtools work can still use it.
This also modifies the windows widget code to use this new helper function, as it avoids an unnecessary round-trip where a MultiTouchInput gets converted to a WidgetTouchEvent (in nsWindow.cpp) and then back to a MultiTouchInput (in APZCTreeManager.cpp) Review commit: https://reviewboard.mozilla.org/r/68634/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/68634/
Comment on attachment 8777021 [details] Bug 1289435 - Ensure that the synthesized native touch events have sane timestamps. https://reviewboard.mozilla.org/r/68632/#review65706
Attachment #8777021 - Flags: review?(mstange) → review+
Comment on attachment 8777022 [details] Bug 1289435 - Extract a helper function to dispatch MultiTouchInput to APZ if applicable and then to Gecko. https://reviewboard.mozilla.org/r/68634/#review65710
Attachment #8777022 - Flags: review?(mstange) → review+
Comment on attachment 8777023 [details] Bug 1289435 - Support native event synthesization even for non-touch windows devices. https://reviewboard.mozilla.org/r/68636/#review66022
Attachment #8777023 - Flags: review?(jmathies) → review+
Pushed by kgupta@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/25aa60d92c63 Ensure that the synthesized native touch events have sane timestamps. r=mstange https://hg.mozilla.org/integration/mozilla-inbound/rev/60baa125c3ab Extract a helper function to dispatch MultiTouchInput to APZ if applicable and then to Gecko. r=mstange https://hg.mozilla.org/integration/mozilla-inbound/rev/3c6cd7ea04ef Support native event synthesization even for non-touch windows devices. r=jimm
Blocks: 1291819
Version: Trunk → 50 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: