Closed
Bug 1278268
Opened 8 years ago
Closed 8 years ago
Update widget wheel synthesization functions to move the mouse cursor if needed
Categories
(Core :: Panning and Zooming, defect)
Core
Panning and Zooming
Tracking
()
RESOLVED
FIXED
mozilla50
People
(Reporter: kats, Assigned: kats)
Details
(Keywords: arch, Whiteboard: [gfx-noted])
Attachments
(4 files)
(In reply to Botond Ballo [:botond] from bug 1276107 comment #39) > (In reply to Kartikaya Gupta (email:kats@mozilla.com) from bug 1276107 comment #37) > > Another, perhaps better, option to avoid the footgun is to modify the > > wheel-synthesization functions in the widget code to move the mouse to > > provided coordinates before synthesizing the wheel. I'm not 100% sure if > > that would work though. > > Discussed this with Kats; this will be explored in a follow-up. This bug is the follow-up.
Assignee | ||
Comment 1•8 years ago
|
||
Sadly after two days of tinkering with this I am still unable to get it to work on Windows. It looks like if you inject a mousemove followed by a mousewheel into the Windows APIs you still get the mousewheel message back before the mousemove. What a disaster.
Assignee | ||
Comment 2•8 years ago
|
||
I even tried throwing in some NS_DispatchToMainThread calls to spin the event loop and wasn't successful. The next option is to provide a guarantee that any move-synth call will fire a mousemove event. That way even no-op moves will fire a mousemove event and we don't need to track the coordinates in JS to know if it's a no-op or not.
Assignee | ||
Comment 3•8 years ago
|
||
Turns out windows itself does send us the mousemove event, but in the widget code we run into the condition at [1] and drop it. I have patches that seem to be working on all platforms now. Try pushes coming shortly.
Assignee | ||
Comment 4•8 years ago
|
||
[1] http://searchfox.org/mozilla-central/rev/3f096f780166bc4772199d79a79c8e3541ff99be/widget/windows/nsWindow.cpp#4033
Assignee | ||
Comment 5•8 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=ce19ae49d04f https://treeherder.mozilla.org/#/jobs?repo=try&revision=dd4dc0f3de9c
Assignee | ||
Comment 6•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/58672/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/58672/
Attachment #8761567 -
Flags: review?(botond)
Attachment #8761568 -
Flags: review?(botond)
Attachment #8761569 -
Flags: review?(jmathies)
Attachment #8761570 -
Flags: review?(botond)
Assignee | ||
Comment 7•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/58674/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/58674/
Assignee | ||
Comment 8•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/58676/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/58676/
Assignee | ||
Comment 9•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/58678/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/58678/
Comment 10•8 years ago
|
||
Comment on attachment 8761569 [details] Bug 1278268 - Ensure that no-op mousemove synthesizations on Windows still fire a mousemove event. https://reviewboard.mozilla.org/r/58676/#review55760 looks ok to me.
Attachment #8761569 -
Flags: review?(jmathies) → review+
Comment 11•8 years ago
|
||
Comment on attachment 8761567 [details] Bug 1278268 - Fix a latent bug in a test where we try to scroll something before it's layerized. https://reviewboard.mozilla.org/r/58672/#review55906
Attachment #8761567 -
Flags: review?(botond) → review+
Comment 12•8 years ago
|
||
Comment on attachment 8761568 [details] Bug 1278268 - Back out cset 8c896f70f97b from bug 1276107 as we have a better fix in hand. https://reviewboard.mozilla.org/r/58674/#review55912
Attachment #8761568 -
Flags: review?(botond) → review+
Comment 13•8 years ago
|
||
Comment on attachment 8761570 [details] Bug 1278268 - Simplify some test code to use the moveMouseAndScrollWheelOver function. https://reviewboard.mozilla.org/r/58678/#review55914
Attachment #8761570 -
Flags: review?(botond) → review+
Comment 14•8 years ago
|
||
Thanks for figuring out a proper solution to this footgun, and doing this cleanup!
Comment 15•8 years ago
|
||
Pushed by kgupta@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/38d10c62b33b Fix a latent bug in a test where we try to scroll something before it's layerized. r=botond https://hg.mozilla.org/integration/mozilla-inbound/rev/9d17d61ee826 Back out cset 8c896f70f97b from bug 1276107 as we have a better fix in hand. r=botond https://hg.mozilla.org/integration/mozilla-inbound/rev/acc080f11d72 Ensure that no-op mousemove synthesizations on Windows still fire a mousemove event. r=jimm https://hg.mozilla.org/integration/mozilla-inbound/rev/1f6385cec917 Simplify some test code to use the moveMouseAndScrollWheelOver function. r=botond
Comment 16•8 years ago
|
||
backout bugherder |
https://hg.mozilla.org/mozilla-central/rev/9d17d61ee826
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox50:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
Comment 17•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/38d10c62b33b https://hg.mozilla.org/mozilla-central/rev/acc080f11d72 https://hg.mozilla.org/mozilla-central/rev/1f6385cec917
Assignee | ||
Comment 18•8 years ago
|
||
I don't think this needs uplifting.
You need to log in
before you can comment on or make changes to this bug.
Description
•