Closed Bug 1498329 Opened Last year Closed Last year

Fling stops abruptly when flinging while dynamic toolbar is moving

Categories

(Core :: Panning and Zooming, defect)

All
Android
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla64
Tracking Status
geckoview62 --- unaffected
firefox-esr60 --- unaffected
firefox62 --- unaffected
firefox63 --- unaffected
firefox64 --- fixed

People

(Reporter: h.winnemoeller, Assigned: botond)

References

(Blocks 1 open bug)

Details

(Keywords: regression)

Attachments

(3 files)

STR:
1. Be on a fresh profile.
2. Have full-screen browsing enabled (this is the default pref.).
3. Open a website larger than your viewport, e.g. about:support.
4. Scroll to the middle the page.
5. Make sure that the dynamic toolbar is visible.
6. While always keeping your finger on the screen: Scroll slowly up to make the toolbar disappear, then fling downwards.

Expected results:
A downward fling is performed.

Actual results:
The fling is abruptly stopped or very low in relation to doing the same fling without full-screen browsing.

I have been experiencing this bug since bug 1457586 has landed. Furthermore, I can reproduce this bevahiour on two devices:

# Device 1:
Name 	Fennec
Version 	64.0a1
Build ID 	20181011100144
Update Channel 	nightly
User Agent 	Mozilla/5.0 (Android 6.0.1; Mobile; rv:64.0) Gecko/64.0 Firefox/64.0
OS 	Linux 23
GPU #1
Active	Yes
Description	Model: D6503, Product: D6503, Manufacturer: Sony, Hardware: qcom, OpenGL: Qualcomm -- Adreno (TM) 330 -- OpenGL ES 3.0 V@140.0 AU@ (GIT@I741a3d36ca)
Vendor ID	Qualcomm
Device ID	Adreno (TM) 330
Driver Version	OpenGL ES 3.0 V@140.0 AU@ (GIT@I741a3d36ca)

# Device 2:
Name 	Fennec
Version 	64.0a1
Build ID 	20181011100144
Update Channel 	nightly
User Agent 	Mozilla/5.0 (Android 8.1.0; Mobile; rv:64.0) Gecko/64.0 Firefox/64.0
OS 	Linux 27
GPU #1
Active	Yes
Description	Model: Nokia 6.1, Product: Plate2_00WW, Manufacturer: HMD Global, Hardware: qcom, OpenGL: Qualcomm -- Adreno (TM) 508 -- OpenGL ES 3.2 V@269.0 (GIT@dceea4a, Iedf7298c8c) (Date:02/19/18)
Vendor ID	Qualcomm
Device ID	Adreno (TM) 508
Driver Version	OpenGL ES 3.2 V@269.0 (GIT@dceea4a, Iedf7298c8c) (Date:02/19/18)
I can reproduce this problem on the Moto G5 reference device.
Keywords: regression
Version: unspecified → Trunk
Botond, this bug looks like a regression from bug 1457586.
Blocks: 1457586
No longer depends on: 1457586
Flags: needinfo?(botond)
Whiteboard: [geckoview:p1]
Removing the [geckoview] whiteboard tag because this is an issue in Fennec's dynamic toolbar.
Whiteboard: [geckoview:p1]
I can reproduce this as well. The trick seems to be for your finger to leave the screen after the toolbar has started transitioning off the screen, but before it has finished.

The symptoms seem similar to bug 1257959; it's possible I made a mistake when porting the fix of that bug over to the new fling physics (the "Implement AndroidVelocityTrakcer::HandleDynamicToolbarMovement() usefully" patch in bug 1457586).

Will investigate.
Assignee: nobody → botond
Flags: needinfo?(botond)
The bug occurs whenever AndroidVelocityTracker doesn't have enough position samples to perform a velocity computation, because it discards samples older than a threshold.

There are two specific issues:

 * If there is only one sample that's sufficiently recent, it can't
   perform the computation. In this case, we need to fall back to
   a velocity computed another way. The existing approximation in
   Axis::mVelocity is a good candidate.

 * If there are two samples, it could perform the computation, but
   it currently doesn't because we are unintentinally discarding
   the oldest sample.

Fixes coming up.
Pushed by bballo@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b8d651587221
Fix a bug in AndroidVelocityTracker::ComputeVelocity() where we were unintentionally ignoring the oldest data point. r=kats
https://hg.mozilla.org/integration/autoland/rev/8ceb713af9c7
Use a fallback velocity if the velocity tracker doesn't have enough recent samples to compute a velocity. r=kats
https://hg.mozilla.org/mozilla-central/rev/b8d651587221
https://hg.mozilla.org/mozilla-central/rev/8ceb713af9c7
Status: NEW → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
I still have a problem on today's Nightly (2018-10-17). Should this patch be in there?

It's better than before but there are still circumstances where a fling while the toolbar animates results in a dead stop.  I think I have to get the length of the fling just right. Also if I do gentle flings up/down/up/down sometimes it gets confused and the up fling results in downward motion.

The best way I can describe is gently bash a page against its upper end stop with the toolbar animating in and out. Do gentle flings of a few inches up/down/up/down very fast & repeatedly hitting the top of the page (so the gray overscroll crescent appears). Occasionally the upward fling (which should start the page scrolling upwards) will fail and the pages comes to a dead stop. I can replicate this with a single upward fling while the toolbar animates, but not very reliably. Occasionally also during an up/down/up/down cycle one of the flings will be in the wrong direction e.g. I fling up but the page moves down. Flings not drags.
I did this video, slightly different technique. When flinging don't do a short flick of the finger, instead do a longer shove perhaps an inch long. If I get length & speed right (which I can do about 50% of the time) the up fling either stops dead or "bounces back" in the opposite direction.

I think the trick is to fling for the whole duration of the toolbar hide, and lift your finger off just as the toolbar completes hiding (???). It's easier to get it to happen if you increase browser.ui.scroll-toolbar-threshold to ~20, then a long "shove" with your finger makes it happen.

Sometimes the upper overscroll crescent shows too during the bounce back.

I turned on pointer stuff in Developer Options so you can see my finger track FWIW.

About half the time I get a normal fling, the other half I get bounce back. As you can see.

Nightly 2018-10-17, I updated about 2 hours ago.
Kats provided me with a logging build to help fix bug 143019 so I logged the fling & bounce back as per comment 11.

You can see my touch events setting the fling up, the fling starts at scroll offset 206.5 px then bounces back to 141 px.

Hope that helps.

10-17 18:32:46.608 26762 26762 W GeckoNPZC: Received touch event y=997.0 at t=52318798
10-17 18:32:46.608 26762 26762 I Gecko   : APZ untransformed 886 -> 886 using APZ offsets 0.000000 0.000000 0.000000 0.000000
10-17 18:32:46.671 26762 26762 W GeckoNPZC: Received touch event y=989.06775 at t=52318858
10-17 18:32:46.671 26762 26762 I Gecko   : APZ untransformed 878 -> 878 using APZ offsets 0.000000 0.000000 0.000000 0.000000
10-17 18:32:46.688 26762 26762 W GeckoNPZC: Received touch event y=965.16223 at t=52318875
10-17 18:32:46.688 26762 26762 I Gecko   : APZ untransformed 854 -> 854 using APZ offsets 0.000000 0.000000 0.000000 0.000000
10-17 18:32:46.699 26762 26820 I Gecko   : APZSampling at 486034.481064 -> sampleTime 486050.921845 8:0.000000 3:0.000000
10-17 18:32:46.704 26762 26762 W GeckoNPZC: Received touch event y=912.0 at t=52318892
10-17 18:32:46.705 26762 26762 I Gecko   : APZ untransformed 801 -> 854 using APZ offsets 0.000000 0.000000 0.000000 0.000000
10-17 18:32:46.707 26762 26820 I Gecko   : APZSampling at 486040.892679 -> sampleTime 486056.581116 8:26.500000 3:0.000000
10-17 18:32:46.721 26762 26762 W GeckoNPZC: Received touch event y=836.0 at t=52318908
10-17 18:32:46.722 26762 26762 I Gecko   : APZ untransformed 725 -> 801 using APZ offsets 0.000000 26.500000 26.500000 26.500000
10-17 18:32:46.722 26762 26820 I Gecko   : APZSampling at 486057.746637 -> sampleTime 486073.708616 8:64.500000 3:0.000000
10-17 18:32:46.738 26762 26762 W GeckoNPZC: Received touch event y=722.84924 at t=52318925
10-17 18:32:46.738 26762 26762 I Gecko   : APZ untransformed 611 -> 725 using APZ offsets 0.000000 64.500000 64.500000 64.500000
10-17 18:32:46.739 26762 26820 I Gecko   : APZSampling at 486073.750023 -> sampleTime 486090.033720 8:121.500000 3:0.000000
10-17 18:32:46.751 26762 26762 W GeckoNPZC: Received touch event y=620.64923 at t=52318939
10-17 18:32:46.755 26762 26820 I Gecko   : APZSampling at 486090.176377 -> sampleTime 486106.326480 8:121.500000 3:0.000000
10-17 18:32:46.768 26762 26762 W GeckoNPZC: Received touch event y=494.203 at t=52318955
10-17 18:32:46.768 26762 26762 I Gecko   : APZ untransformed 494 -> 611 using APZ offsets 0.000000 121.500000 121.500000 121.500000
10-17 18:32:46.772 26762 26820 I Gecko   : APZSampling at 486107.131741 -> sampleTime 486123.580543 8:180.000000 3:0.000000
10-17 18:32:46.778 26762 26762 W GeckoNPZC: Received touch event y=441.0 at t=52318963
10-17 18:32:46.779 26762 26762 I Gecko   : APZ untransformed 441 -> 494 using APZ offsets 121.500000 180.000000 180.000000 180.000000
10-17 18:32:46.779 26762 26762 W GeckoNPZC: Received touch event y=441.0 at t=52318971
10-17 18:32:46.779 26762 26762 I Gecko   : APZ untransformed 441 -> 494 using APZ offsets 121.500000 180.000000 180.000000 180.000000
10-17 18:32:46.788 26762 26820 I Gecko   : APZSampling at 486123.446168 -> sampleTime 486139.781793 8:206.500000 3:0.000000
10-17 18:32:46.806 26762 26820 I Gecko   : APZSampling at 486140.789293 -> sampleTime 486157.125278 8:193.463821 3:0.000000
10-17 18:32:46.822 26762 26820 I Gecko   : APZSampling at 486157.121429 -> sampleTime 486173.587366 8:185.274780 3:0.000000
10-17 18:32:46.838 26762 26820 I Gecko   : APZSampling at 486173.524970 -> sampleTime 486189.995126 8:178.395691 3:0.000000
10-17 18:32:46.856 26762 26820 I Gecko   : APZSampling at 486190.895387 -> sampleTime 486207.125276 8:172.444519 3:0.000000
10-17 18:32:46.872 26762 26820 I Gecko   : APZSampling at 486207.322002 -> sampleTime 486223.759918 8:167.115173 3:0.000000
10-17 18:32:46.889 26762 26820 I Gecko   : APZSampling at 486223.820127 -> sampleTime 486240.155647 8:162.705841 3:0.000000
10-17 18:32:46.905 26762 26820 I Gecko   : APZSampling at 486240.150908 -> sampleTime 486256.578303 8:158.994690 3:0.000000
10-17 18:32:46.922 26762 26820 I Gecko   : APZSampling at 486257.649293 -> sampleTime 486273.791940 8:155.826767 3:0.000000
10-17 18:32:46.939 26762 26820 I Gecko   : APZSampling at 486274.099085 -> sampleTime 486290.379761 8:153.004120 3:0.000000
10-17 18:32:46.955 26762 26820 I Gecko   : APZSampling at 486290.394450 -> sampleTime 486306.806793 8:150.701996 3:0.000000
10-17 18:32:46.972 26762 26820 I Gecko   : APZSampling at 486306.950908 -> sampleTime 486323.237626 8:148.771301 3:0.000000
10-17 18:32:46.989 26762 26820 I Gecko   : APZSampling at 486324.375647 -> sampleTime 486340.458604 8:147.145676 3:0.000000
10-17 18:32:47.005 26762 26820 I Gecko   : APZSampling at 486340.687158 -> sampleTime 486357.095386 8:145.728989 3:0.000000
10-17 18:32:47.022 26762 26820 I Gecko   : APZSampling at 486357.272783 -> sampleTime 486373.551845 8:144.607529 3:0.000000
10-17 18:32:47.038 26762 26820 I Gecko   : APZSampling at 486373.658304 -> sampleTime 486389.985855 8:143.709885 3:0.000000
10-17 18:32:47.056 26762 26820 I Gecko   : APZSampling at 486391.039606 -> sampleTime 486407.125268 8:143.002121 3:0.000000
10-17 18:32:47.072 26762 26820 I Gecko   : APZSampling at 486407.567106 -> sampleTime 486423.791934 8:142.446106 3:0.000000
10-17 18:32:47.089 26762 26820 I Gecko   : APZSampling at 486423.995387 -> sampleTime 486440.287782 8:142.066391 3:0.000000
10-17 18:32:47.105 26762 26820 I Gecko   : APZSampling at 486440.309658 -> sampleTime 486456.722418 8:141.831940 3:0.000000
10-17 18:32:47.122 26762 26820 I Gecko   : APZSampling at 486456.745074 -> sampleTime 486473.145803 8:141.831940 3:0.000000
10-17 18:32:47.583 26762 26820 I Gecko   : APZSampling at 486918.024970 -> sampleTime 486934.338459 8:141.831940 3:0.000000
10-17 18:32:47.982 26762 26820 I Gecko   : APZSampling at 487316.892678 -> sampleTime 487333.185959 8:141.831940 3:0.000000
I filed bug 1499941 for the remaining issue described in comment 10 through comment 12; please take any follow-up discussion there. Thanks!
See Also: → 1499941
You need to log in before you can comment on or make changes to this bug.