Closed Bug 1105836 Opened 10 years ago Closed 10 years ago

Flywheel scrolling breaks in some cases with event-regions enabled

Categories

(Core :: Panning and Zooming, defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla37

People

(Reporter: kats, Assigned: kats)

References

Details

Attachments

(2 files, 1 obsolete file)

Load latest B2G on flame and turn on layout.event-regions.enabled. Long-press on a homescreen icon to enter edit mode, and then do a double-fling to flywheel-scroll. ER: Flywheel AR: device stops responding to touches

This is a regression from bug 1085404, which made the APZ stop waiting for main-thread content responses while the APZ was in a "fast motion" state. However I stupidly forgot to also confirm the target APZ, so what ends up happening in the case of an initially unconfirmed target is that the input block never gets processed. It gets stuck in the queue, and since all those input events are never delivered to content, the target APZ is never confirmed.
Attached patch Part 1 - Logging (obsolete) — Splinter Review
Lots of logging
Attachment #8529862 - Flags: review?(botond)
Attached patch Part 2 - FixSplinter Review
Attachment #8529863 - Flags: review?(botond)
Comment on attachment 8529862 [details] [diff] [review]
Part 1 - Logging

Review of attachment 8529862 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/layers/apz/src/AsyncPanZoomController.cpp
@@ +2335,5 @@
>  
>  bool AsyncPanZoomController::IsMovingFast() const {
>    ReentrantMonitorAutoEnter lock(mMonitor);
> +  if (GetVelocityVector().Length() > gfxPrefs::APZFlingStopOnTapThreshold()) {
> +    APZC_LOG("%p is moving fast; x-axis: %p, y-axis: %p\n", this, &mX, &mY);

Rather than looking at Axis addresses during debugging, what do you think about giving Axis a virtual method 'const char* Name()', with the implementations returning "x" and "y" respectively, and have debugging statements print Name()?
Attachment #8529863 - Flags: review?(botond) → review+
Name () will help with the biggest problem but there are still going to be multiple x- and y-axis objects, one for each APZC. Any ideas on how to disambiguate those without the address?
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #4)
> Name () will help with the biggest problem but there are still going to be
> multiple x- and y-axis objects, one for each APZC. Any ideas on how to
> disambiguate those without the address?

We can print the address of the APZC along with Name(). That still reduces the number of addresses we have to track while debugging.

I actually prefer identifying APZCs by their ScrollableLayerGuid rather than their address (and that's what I print when I write logging statements of my own), but that's a larger change that we can do separately if we want.
(In reply to Botond Ballo [:botond] from comment #5)
> We can print the address of the APZC along with Name(). That still reduces
> the number of addresses we have to track while debugging.

Good idea! Updated patch to do that.

> I actually prefer identifying APZCs by their ScrollableLayerGuid rather than
> their address (and that's what I print when I write logging statements of my
> own), but that's a larger change that we can do separately if we want.

Yeah we can do that separately. I like having the address there as well because it's easier to grep and match stuff from APZCTM output as well.
Attachment #8529862 - Attachment is obsolete: true
Attachment #8529862 - Flags: review?(botond)
Attachment #8530270 - Flags: review?(botond)
Attachment #8530270 - Flags: review?(botond) → review+
https://hg.mozilla.org/mozilla-central/rev/3910f8c77b51
https://hg.mozilla.org/mozilla-central/rev/5a68579c6fbf
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: