Closed Bug 1786452 Opened 2 years ago Closed 2 years ago

Overscroll effect not gone on Android 12+ if finger is released

Categories

(GeckoView :: Core, defect, P1)

All
Android

Tracking

(firefox104 wontfix, firefox105 wontfix, firefox106 fixed)

RESOLVED FIXED
106 Branch
Tracking Status
firefox104 --- wontfix
firefox105 --- wontfix
firefox106 --- fixed

People

(Reporter: m_kato, Assigned: botond)

References

(Regressed 1 open bug)

Details

(Whiteboard: [geckoview:m106])

Attachments

(5 files)

This is moved from bug 1710708.

Android 12+ uses stretch animation for overscroll animation, instead of glow drawing. But when using stretch animation, animation isn't sometimes finished. So Overscroll effect is kept even if user release finger on screen.

The APZ call sequences are the following

  1. AndroidContentController::UpdateOverscrollOffset
  2. AndroidContentController::UpdateOverscrollVelocity

UpdateOverscrollVelocity calls EdgeEffect.onRelease in OverscrollEdgeEffect.setVelocity, So animation is finished.

But when this occurs, the APZ call sequences are the following

  1. AndroidContentController::UpdateOverscrollOffset
  2. AndroidContentController::UpdateOverscrollVelocity
  3. AndroidContentController::UpdateOverscrollOffset
    ... (repeat 3. since we keep finger on screen)
    n. AndroidContentController::UpdateOverscrollOffset.

So since UpdateOverscrollOffset doesn't call EdgeEffect.onRelease, animation isn't finished. When using glow drawing, I am not sure that EdgeEffect seems to finish animation even if not calling EdgeEffect.onRelease...

Severity: -- → S3
Priority: -- → P2
See Also: → 1710708

GeckoView's overscroll is implemented by OS side using
WidgetOverscrollEffect.

When not releasing finger during overscroll, stretched animation is kept on
Android 12+ since EdgeEffect.onRelease isn't called. Then, when releasing
finger, this animation isn't finished on GeckoView with Android 12+.

When this situation, APZ doesn't call
WidgetOverscrollEffect::HandleFlingOverscroll by releasing finger due to too
small velocity value in AsyncPanZoomController::HandleEndOfPan. So there is
no way to detect whether releasing finger on GeckoView side.

I think We should notify GeckoView of releasing finger to finish animation.

This won't occurs on GenericOverscollEffect on macOS since overscoll
animation is managed by APZ and this animation will be finished by
UpdateAnimation.

Assignee: nobody → m_kato
Status: NEW → ASSIGNED
Priority: P2 → P1
Whiteboard: [geckoview:m106]

The function is used in some scenarios unrelated to fling animation.

A couple of call sites, which are only interested in overscrolling that
induces a transform, are changed to call IsPhysicallyOverscrolled(),
the GenericOverscrollEffect implementation, directly.

Depends on D157004

Attachment #9293380 - Attachment description: Bug 1786452 - Finish overscroll animation when finishing pan. r=botond → Bug 1786452 - Finish overscroll animation when finishing pan. r=m_kato
Pushed by bballo@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9918193202b5
Rename OverscrollEffectBase::HandleFlingOverscroll() to RelieveOverscroll(). r=hiro
https://hg.mozilla.org/integration/autoland/rev/d76ddc2e3c58
Implement IsOverscrolled() for WidgetOverscrollEffect. r=hiro
https://hg.mozilla.org/integration/autoland/rev/6f111e745189
Implement ClearOverscroll() for WidgetOverscrollEffect. r=hiro
https://hg.mozilla.org/integration/autoland/rev/b584463ec5b6
Finish overscroll animation when finishing pan. r=geckoview-reviewers,owlish,m_kato
https://hg.mozilla.org/integration/autoland/rev/0bdbe3eb11f6
Add a gtest. r=hiro
Regressions: 1848824
Assignee: m_kato → botond
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: