Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(175)

Issue 2124973004: ScrollableArea should update scrollAnimator with clamped position. (Closed)

Created:
4 years, 5 months ago by Eric Seckler
Modified:
4 years, 4 months ago
Reviewers:
bokan, skobes, Sami
CC:
chromium-reviews, blink-reviews, Sami, szager1
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

ScrollableArea should update scrollAnimator with clamped position. Currently, ScrollableArea updates the scrollAnimator with the argument to scrollPositionChanged(), which may lie outside the min/max scroll position of the area. Instead, it should use the clamped new scroll position obtained from the subclass. BUG=626315

Patch Set 1 #

Patch Set 2 : Use clamped but non-truncated position during ScrollableArea update. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 29 (9 generated)
Eric Seckler
Hi David, Discovered this while testing the scroll/scale override patch. (I was observing different currentPosition ...
4 years, 5 months ago (2016-07-07 12:28:48 UTC) #3
Sami
Non-owner lgtm.
4 years, 5 months ago (2016-07-07 12:43:50 UTC) #5
bokan
I've been puzzled by this choice in the past too. ScrollableArea should be the one ...
4 years, 5 months ago (2016-07-07 16:17:24 UTC) #6
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2124973004/1
4 years, 5 months ago (2016-07-08 08:11:04 UTC) #8
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/256694)
4 years, 5 months ago (2016-07-08 09:33:16 UTC) #10
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2124973004/20001
4 years, 5 months ago (2016-07-08 10:20:00 UTC) #12
Eric Seckler
Turns out, we can't simply use the scrollPosition() of the subclass, because this may be ...
4 years, 5 months ago (2016-07-08 12:06:32 UTC) #15
Eric Seckler
On 2016/07/08 12:06:32, Eric Seckler wrote: > Thus, I tried simply clamping the non-truncated position ...
4 years, 5 months ago (2016-07-08 13:53:49 UTC) #16
bokan
On 2016/07/08 13:53:49, Eric Seckler wrote: > On 2016/07/08 12:06:32, Eric Seckler wrote: > > ...
4 years, 5 months ago (2016-07-08 16:13:18 UTC) #17
bokan
Forgot to actually +cc skobes@
4 years, 5 months ago (2016-07-08 16:35:09 UTC) #18
skobes
Yeah clamping is kind of a mess right now. Note that the PLSA::scrollToOffset API currently ...
4 years, 5 months ago (2016-07-08 17:10:26 UTC) #19
skobes
+szager who has also fought with this stuff
4 years, 5 months ago (2016-07-08 17:14:25 UTC) #21
bokan
On 2016/07/08 17:10:26, skobes wrote: > Yeah clamping is kind of a mess right now. ...
4 years, 5 months ago (2016-07-08 17:27:35 UTC) #22
skobes
On 2016/07/08 17:27:35, bokan wrote: > Hmm...that may throw a wrench in here. Although, I ...
4 years, 5 months ago (2016-07-08 21:00:01 UTC) #23
Eric Seckler
Thanks for looking into it, guys. Sounds like David's proposed rework of fractional offsets in ...
4 years, 5 months ago (2016-07-11 09:52:24 UTC) #24
bokan
On 2016/07/11 09:52:24, Eric Seckler wrote: > Thanks for looking into it, guys. Sounds like ...
4 years, 5 months ago (2016-07-11 13:24:46 UTC) #25
skobes
On 2016/07/11 13:24:46, bokan wrote: > ScrollAnimator should always store the fractional regardless of that ...
4 years, 5 months ago (2016-07-11 14:47:31 UTC) #26
bokan
On 2016/07/11 14:47:31, skobes wrote: > On 2016/07/11 13:24:46, bokan wrote: > > ScrollAnimator should ...
4 years, 5 months ago (2016-07-11 15:07:26 UTC) #27
skobes
On 2016/07/11 15:07:26, bokan wrote: > On 2016/07/11 14:47:31, skobes wrote: > > On 2016/07/11 ...
4 years, 5 months ago (2016-07-11 15:43:29 UTC) #28
Eric Seckler
4 years, 5 months ago (2016-07-11 16:36:43 UTC) #29
> But eseckler's proposal to clamp in VisualViewport::setScrollPosition sounds
> fine to me too.

Great, I think clamping there is easier, since is doesn't seem to break existing
behavior. Created a separate review for that change here:
https://codereview.chromium.org/2138823002/

I'll update the bug and point it to the discussion here.

Powered by Google App Engine
This is Rietveld 408576698