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

Issue 1553603003: Tweak the math in ScrollOffsetAnimationCurve::UpdateTarget. (Closed)

Created:
4 years, 11 months ago by skobes
Modified:
4 years, 11 months ago
Reviewers:
ajuma, ymalik
CC:
chromium-reviews, cc-bugs_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Tweak the math in ScrollOffsetAnimationCurve::UpdateTarget. The existing division-by-0 guard was not correct, since MaximumDimension can return negative values. This led to occasional wild jumps when scrolling up and down quickly (because new_velocity had the wrong sign). This patch addresses the sign issue and improves handling of cases where we have a large current velocity and a small delta to the new target. BUG=575 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Committed: https://crrev.com/a78fdc918ae09ee12096d99dc75a42b949f6b5de Cr-Commit-Position: refs/heads/master@{#367200}

Patch Set 1 #

Patch Set 2 : #

Total comments: 9

Patch Set 3 : address review comment #

Patch Set 4 : address ymalik's comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+64 lines, -62 lines) Patch
M cc/animation/scroll_offset_animation_curve.cc View 1 2 3 3 chunks +49 lines, -12 lines 0 comments Download
M cc/animation/scroll_offset_animation_curve_unittest.cc View 1 1 chunk +15 lines, -50 lines 0 comments Download

Messages

Total messages: 30 (15 generated)
skobes
4 years, 11 months ago (2015-12-30 01:31:27 UTC) #6
ymalik
lgtm with questions https://codereview.chromium.org/1553603003/diff/20001/cc/animation/scroll_offset_animation_curve.cc File cc/animation/scroll_offset_animation_curve.cc (right): https://codereview.chromium.org/1553603003/diff/20001/cc/animation/scroll_offset_animation_curve.cc#newcode150 cc/animation/scroll_offset_animation_curve.cc:150: old_delta_max_dimension * 2.5f; I am trying ...
4 years, 11 months ago (2015-12-30 19:30:18 UTC) #7
ymalik
lgtm with questions https://codereview.chromium.org/1553603003/diff/20001/cc/animation/scroll_offset_animation_curve.cc File cc/animation/scroll_offset_animation_curve.cc (right): https://codereview.chromium.org/1553603003/diff/20001/cc/animation/scroll_offset_animation_curve.cc#newcode150 cc/animation/scroll_offset_animation_curve.cc:150: old_delta_max_dimension * 2.5f; I am trying ...
4 years, 11 months ago (2015-12-30 19:30:18 UTC) #8
skobes
+ajuma for OWNERS https://codereview.chromium.org/1553603003/diff/20001/cc/animation/scroll_offset_animation_curve.cc File cc/animation/scroll_offset_animation_curve.cc (right): https://codereview.chromium.org/1553603003/diff/20001/cc/animation/scroll_offset_animation_curve.cc#newcode150 cc/animation/scroll_offset_animation_curve.cc:150: old_delta_max_dimension * 2.5f; On 2015/12/30 19:30:18, ...
4 years, 11 months ago (2015-12-30 19:44:20 UTC) #10
ajuma
https://codereview.chromium.org/1553603003/diff/20001/cc/animation/scroll_offset_animation_curve.cc File cc/animation/scroll_offset_animation_curve.cc (right): https://codereview.chromium.org/1553603003/diff/20001/cc/animation/scroll_offset_animation_curve.cc#newcode152 cc/animation/scroll_offset_animation_curve.cc:152: return bound < kEpsilon ? std::numeric_limits<double>::infinity() : bound; Should ...
4 years, 11 months ago (2015-12-30 19:58:23 UTC) #11
skobes
https://codereview.chromium.org/1553603003/diff/20001/cc/animation/scroll_offset_animation_curve.cc File cc/animation/scroll_offset_animation_curve.cc (right): https://codereview.chromium.org/1553603003/diff/20001/cc/animation/scroll_offset_animation_curve.cc#newcode152 cc/animation/scroll_offset_animation_curve.cc:152: return bound < kEpsilon ? std::numeric_limits<double>::infinity() : bound; On ...
4 years, 11 months ago (2015-12-30 20:07:30 UTC) #13
ajuma
On 2015/12/30 20:07:30, skobes wrote: > https://codereview.chromium.org/1553603003/diff/20001/cc/animation/scroll_offset_animation_curve.cc > File cc/animation/scroll_offset_animation_curve.cc (right): > > https://codereview.chromium.org/1553603003/diff/20001/cc/animation/scroll_offset_animation_curve.cc#newcode152 > ...
4 years, 11 months ago (2015-12-30 20:09:31 UTC) #14
ymalik
https://codereview.chromium.org/1553603003/diff/20001/cc/animation/scroll_offset_animation_curve.cc File cc/animation/scroll_offset_animation_curve.cc (right): https://codereview.chromium.org/1553603003/diff/20001/cc/animation/scroll_offset_animation_curve.cc#newcode150 cc/animation/scroll_offset_animation_curve.cc:150: old_delta_max_dimension * 2.5f; On 2015/12/30 19:44:20, skobes wrote: > ...
4 years, 11 months ago (2015-12-30 20:10:00 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1553603003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1553603003/40001
4 years, 11 months ago (2015-12-30 20:10:08 UTC) #18
skobes
https://codereview.chromium.org/1553603003/diff/20001/cc/animation/scroll_offset_animation_curve.cc File cc/animation/scroll_offset_animation_curve.cc (right): https://codereview.chromium.org/1553603003/diff/20001/cc/animation/scroll_offset_animation_curve.cc#newcode150 cc/animation/scroll_offset_animation_curve.cc:150: old_delta_max_dimension * 2.5f; On 2015/12/30 20:09:59, ymalik1 wrote: > ...
4 years, 11 months ago (2015-12-30 20:19:43 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1553603003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1553603003/60001
4 years, 11 months ago (2015-12-30 20:20:35 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/154193)
4 years, 11 months ago (2015-12-30 21:56:35 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1553603003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1553603003/60001
4 years, 11 months ago (2015-12-30 22:02:46 UTC) #27
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 11 months ago (2015-12-30 23:03:23 UTC) #28
commit-bot: I haz the power
4 years, 11 months ago (2015-12-30 23:04:34 UTC) #30
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/a78fdc918ae09ee12096d99dc75a42b949f6b5de
Cr-Commit-Position: refs/heads/master@{#367200}

Powered by Google App Engine
This is Rietveld 408576698