Closed
Bug 1161206
Opened 10 years ago
Closed 10 years ago
Allow synthesizing native mouse wheel events on OS X
Categories
(Core :: Widget: Cocoa, defect)
Tracking
()
RESOLVED
FIXED
mozilla40
Tracking | Status | |
---|---|---|
firefox40 | --- | fixed |
People
(Reporter: kats, Assigned: kats)
References
Details
Attachments
(2 files, 2 obsolete files)
6.07 KB,
patch
|
mstange
:
review+
|
Details | Diff | Splinter Review |
7.07 KB,
patch
|
mstange
:
review+
|
Details | Diff | Splinter Review |
In order to properly exercise the APZ code we need to be able to synthesize and dispatch native events on desktop platforms. The stubs for these already exist (see nsIDOMWindowUtils::sendNative*) but they are not implemented across all platforms. This bug is specifically about implementing SynthesizeNativeMouseScrollEvent on OS X.
Assignee | ||
Comment 1•10 years ago
|
||
This implements the function
Attachment #8601076 -
Flags: review?(mstange)
Assignee | ||
Comment 2•10 years ago
|
||
This is a test that exercises the native synthesization function in the other patch. It's a modified version of the test I added in bug 1013432, that uses native event synthesization. This test passes for me locally under the following configurations on OS X:
./mach mochitest-plain gfx/layers/apz/test/test_wheel_scroll.html
./mach mochitest-plain --e10s gfx/layers/apz/test/test_wheel_scroll.html
./mach mochitest-plain --e10s --setpref=layers.async-pan-zoom.enabled=true gfx/layers/apz/test/test_wheel_scroll.html
I want to test it on windows too before flagging for review.
Comment 3•10 years ago
|
||
Comment on attachment 8601076 [details] [diff] [review]
Patch
Review of attachment 8601076 [details] [diff] [review]:
-----------------------------------------------------------------
::: widget/cocoa/nsChildView.mm
@@ +1211,5 @@
> + (aAdditionalFlags & nsIDOMWindowUtils::MOUSESCROLL_SCROLL_LINES)
> + ? kCGScrollEventUnitLine : kCGScrollEventUnitPixel;
> + CGEventRef cgEvent = CGEventCreateScrollWheelEvent(NULL, units, 3, aDeltaY, aDeltaX, aDeltaZ);
> + if (!cgEvent)
> + return NS_ERROR_FAILURE;
{}
Attachment #8601076 -
Flags: review?(mstange) → review+
Assignee | ||
Comment 4•10 years ago
|
||
Updated test to be more robust. It passes locally for me on OS X and windows, using all the configurations I listed in comment 2
Try push at https://treeherder.mozilla.org/#/jobs?repo=try&revision=11fd6584a02e - will wait for that to go green before requesting review. (Also I'll need to disable the test on non-(mac+windows) platforms).
Attachment #8601077 -
Attachment is obsolete: true
Assignee | ||
Comment 5•10 years ago
|
||
Try push has this test passing on mac and windows as expected, and failing on linux as expected. Updated mochitest.ini to only run on cocoa/windows toolkits.
Attachment #8601488 -
Attachment is obsolete: true
Attachment #8601543 -
Flags: review?(mstange)
Updated•10 years ago
|
Attachment #8601543 -
Flags: review?(mstange) → review+
Comment 7•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/b0d3859a249b
https://hg.mozilla.org/mozilla-central/rev/510299530155
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox40:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in
before you can comment on or make changes to this bug.
Description
•