Bug 96403 - [chromium] Flings halt immediately on Android content shell
Summary: [chromium] Flings halt immediately on Android content shell
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-11 09:57 PDT by Iain Merrick
Modified: 2012-09-17 06:09 PDT (History)
7 users (show)

See Also:


Attachments
Patch (2.84 KB, patch)
2012-09-11 09:59 PDT, Iain Merrick
jamesr: review-
webkit.review.bot: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Iain Merrick 2012-09-11 09:57:38 PDT
[chromium] Flings halt immediately on Android content shell
Comment 1 Iain Merrick 2012-09-11 09:59:28 PDT
Created attachment 163392 [details]
Patch
Comment 2 WebKit Review Bot 2012-09-11 10:04:04 PDT
Comment on attachment 163392 [details]
Patch

Attachment 163392 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/13824323
Comment 3 James Robinson 2012-09-11 10:08:33 PDT
We already have a bug to calculate proper range, what about doing that?
Comment 4 Iain Merrick 2012-09-11 10:49:49 PDT
Is there code around for that, or just a bug? I was hoping just to do the minimal fix here rather than taking the time to understand and extend the code.
Comment 5 Iain Merrick 2012-09-11 10:52:02 PDT
Er, my laziness aside -- our test infrastructure isn't fully set up to cover this case upstream as far as I can see, so just getting it working and getting fully upstreamed ASAP seems useful.
Comment 6 James Robinson 2012-09-11 11:04:30 PDT
https://bugs.webkit.org/show_bug.cgi?id=93514

That bug has been kicked around for (literally) months.  I'd prefer not to kick it down further
Comment 7 Iain Merrick 2012-09-11 11:11:08 PDT
Do we definitely need it? I guess we'll need to take the range into account somewhere in order to do some kind of overscroll animation (brief highlight or rebound). Do you see that happening in the platform UI layer, or directly in the compositor?

https://bugs.webkit.org/show_bug.cgi?id=93514 is the bug I'm aware of where this has been discussed, but it looks like it didn't get very far.
Comment 8 James Robinson 2012-09-11 11:12:51 PDT
My understanding is the fling range is required to build the correct fling curve on android - is that not true?  If it isn't, why do we need a range at all?
Comment 9 Iain Merrick 2012-09-11 11:19:02 PDT
Here's the Android API that we're calling through to:

http://developer.android.com/reference/android/widget/OverScroller.html#fling(int, int, int, int, int, int, int, int)

If we don't set minX/maxX/minY/maxY, the OverScroller object won't know the bounds of the layer being scrolled, so the gesture adapter will just keep calling scrollBy() until the curve finishes. The layer will just ignore any scrollBy() it can't handle.

If we have nested scrollable layers, this does mean that a single fling gesture could spill over into the outer layer. I think we don't want that on Android -- it should stop the fling when the current layer is exhausted, then scroll the outer layer on the *next* fling -- but it's a pretty subtle distinction.
Comment 10 James Robinson 2012-09-11 11:21:21 PDT
Does that change the curve itself, though?  I thought it did, but if it doesn't then maybe we should just drop the whole range business and just call forceFinished() when we can't take any more scrollBy()s on the currently scrollable layer?
Comment 11 Iain Merrick 2012-09-11 11:23:31 PDT
(In reply to comment #10)
> Does that change the curve itself, though?

Apparently not -- docs say "The distance traveled will depend on the initial velocity of the fling"

> I thought it did, but if it doesn't then maybe we should just drop the whole range business and just call forceFinished() when we can't take any more scrollBy()s on the currently scrollable layer?

That sounds good to me. That's a platform API change, so it needs to be done in a couple of steps, right?
Comment 12 James Robinson 2012-09-11 12:35:27 PDT
Yeah, it might be multi-sided.  I would start by ignoring the parameter on the implementation side, making sure that works, and then working backwards from there.
Comment 13 James Robinson 2012-09-11 19:16:42 PDT
Comment on attachment 163392 [details]
Patch

r- until we can decide if we're ditching this range completely or if we need to calculate it correctly in the short term to get content_shell working, feel free to ignore this value on the chromium side.
Comment 14 Iain Merrick 2012-09-12 03:53:47 PDT
(In reply to comment #13)
> (From update of attachment 163392 [details])
> r- until we can decide if we're ditching this range completely or if we need to calculate it correctly in the short term to get content_shell working, feel free to ignore this value on the chromium side.

Chromium patch: http://codereview.chromium.org/10913218/
Comment 15 Sami Kyöstilä 2012-09-12 06:01:34 PDT
The fling range is useful for two things on Android. First, the fling spline calculated by OverScroller.java[1] varies depending on the target distance. Second,  eventually I think we'll want to render the blue glow and bounce back effects when a fling hits the end of its range.

For the short term I'm fine with hard coding an infinite range for ContentShell, but eventually we should fix this properly.

[1] https://github.com/android/platform_frameworks_base/blob/master/core/java/android/widget/OverScroller.java
Comment 16 Iain Merrick 2012-09-17 06:09:37 PDT
Fixed on the Chromium side.