Closed Bug 1390145 Opened 2 years ago Closed 2 years ago

Content jumps around when hiding/showing urlbar

Categories

(Firefox for Android :: Toolbar, defect, P3)

57 Branch
Unspecified
Android
defect

Tracking

()

RESOLVED FIXED
Firefox 57
Tracking Status
fennec + ---
firefox55 --- unaffected
firefox56 --- disabled
firefox57 --- fixed

People

(Reporter: snorp, Assigned: rbarker)

References

Details

(Keywords: regression)

Attachments

(1 file)

Recently I've noticed that I get one frame where the content jumps down about $URLBAR_HEIGHT pixels. I usually notice this when the urlbar is in the process of showing or hiding.
Nightly only, or beta too?
OS: Unspecified → Android
Priority: -- → P3
Version: unspecified → 57 Branch
Only Nightly. Easy to repro:

1) Scroll down the page slowly, enough that the urlbar starts to scroll away
2) release while the urlbar is partially hidden
3) observe about one frame of jumpy content
tracking-fennec: --- → ?
Duplicate of this bug: 1388803
Comment on attachment 8897070 [details]
Bug 1390145 - Disable apz.frame_delay.enabled on Fennec nightly to prevent page jitter when dynamic toolbar is animated

https://reviewboard.mozilla.org/r/168354/#review173620
Attachment #8897070 - Flags: review?(botond) → review+
Pushed by rbarker@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/eb73e2d20c19
Disable apz.frame_delay.enabled on Fennec nightly to prevent page jitter when dynamic toolbar is animated r=botond
https://hg.mozilla.org/mozilla-central/rev/eb73e2d20c19
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 57
tracking-fennec: ? → +
The current dynamic toolbar implementation relies on the ability to scroll the content in the same frame that the composition height is changed in the compositor thread by calling parent->GetAPZCTreeManager()->AdjustScrollForSurfaceShift() in
https://dxr.mozilla.org/mozilla-central/rev/f9a5e9ed62103c84e4cde915f4d08f1ce71be83e/gfx/layers/apz/src/AndroidDynamicToolbarAnimator.cpp#334

So that when the composition size is changed the content may be shifted to give the appearance that nothing has moved.

In particular, when the page is scrolled to the end and the toolbar is hidden, it gets animated into view. Once visible the composition bounds are reduced by the height of the toolbar. This change in composition bounds normally cause the bottom of the page to slide off the screen. To prevent this, the content is scrolled up so that the bottom of the page is still at the bottom of the page. By adding a frame delay to the scroll operation, there is a frame where the content shifts off the page and then jumps back up once the scroll is processed.
Blocks: 1400440
You need to log in before you can comment on or make changes to this bug.