[B2GDroid] |scrollTo({behavior: 'smooth'...| doesn't work

RESOLVED FIXED

Status

B2GDroid Graveyard
General
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: etienne, Assigned: fabrice)

Tracking

Details

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
I've been told that APZ might only be working on the root scrollable area on Android, which will never work for Gaia since we have nested scrollable areas all the way down :)
(Reporter)

Updated

3 years ago
Blocks: 1170323
(Reporter)

Comment 1

3 years ago
Interestingly snapping is always instant.
We never smoothly scroll to the snapping point, once the snapping kicks in we instantly snap with no transition.
(Reporter)

Comment 2

3 years ago
Looks like smooth scrolling in general doesn't work. Which points to the frames not being APZ enabled.
Are you building with --enable-android-apz in your mozconfig? I don't see that in the confvars for b2gdroid in-tree (but maybe I missed it). Maybe fabrice added that locally when he was building it?
(Reporter)

Comment 5

3 years ago
(In reply to Etienne Segonzac (:etienne) from comment #2)
> Looks like smooth scrolling in general doesn't work. Which points to the
> frames not being APZ enabled.

This is still happening.
Pressing home to go back to the top of the homescreen, pressing home to close the utility tray etc...

All of these call |scrollTo({behavior: 'smooth'...| but we get no frame between the current position and the final position. It looks exactly like a "unsmooth" scrollTo().
(Reporter)

Updated

3 years ago
Summary: [B2GDroid] Scrolling performance is so bad it feels like the pre-APZ days → [B2GDroid] |scrollTo({behavior: 'smooth'...| doesn't work
It's probably running with these two prefs set to false:

http://mxr.mozilla.org/mozilla-central/source/modules/libpref/init/all.js?rev=6111fe8aca39#3651

because of the #ifdef ANDROID. If you set them to true in b2gdroid.js or wrap them in a MOZ_ANDROID_APZ or something it should work.
Component: Panning and Zooming → General
Product: Core → B2GDroid
(Assignee)

Comment 7

3 years ago
Created attachment 8687333 [details] [diff] [review]
smooth-scroll.patch

Works pretty well. Thanks Etienne for spotting that!
Assignee: nobody → fabrice
Attachment #8687333 - Flags: review?(bugmail.mozilla)
Comment on attachment 8687333 [details] [diff] [review]
smooth-scroll.patch

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

r+ for the scroll-behavior pref changes. I don't know about the raptor stuff...
Attachment #8687333 - Flags: review?(bugmail.mozilla) → review+

Comment 10

3 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/683059d91038
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED

Updated

3 years ago
Duplicate of this bug: 1226271
(Assignee)

Updated

3 years ago
Duplicate of this bug: 1202934
You need to log in before you can comment on or make changes to this bug.