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

Issue 1961243002: Round anchor offsets to DIPs in ScrollAnchor::restore. (Closed)

Created:
4 years, 7 months ago by skobes
Modified:
4 years, 7 months ago
Reviewers:
ojan, ymalik, szager1, eae
CC:
blink-reviews, blink-reviews-layout_chromium.org, chromium-reviews, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Round anchor offsets to DIPs in ScrollAnchor::restore. A fractional adjustment may not match the actual pixel delta of the anchor node. This eliminates visible judder when the anchor node's position is animating. Also ignore FrameView's fractional scroll offset when computing the anchor's viewport-relative position. This ensures we round in the right direction. BUG=594450 Committed: https://crrev.com/3c17160bd5dd8a82b0a9bd2b9cb531e285e6386f Cr-Commit-Position: refs/heads/master@{#392752}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : tweak and add comments #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+36 lines, -8 lines) Patch
M third_party/WebKit/Source/core/layout/ScrollAnchor.cpp View 1 2 2 chunks +19 lines, -8 lines 2 comments Download
M third_party/WebKit/Source/core/layout/ScrollAnchorTest.cpp View 1 1 chunk +17 lines, -0 lines 0 comments Download

Messages

Total messages: 20 (9 generated)
skobes
This seems to eliminate the animation judder in all the scenarios I tested: - high ...
4 years, 7 months ago (2016-05-10 01:23:12 UTC) #3
ymalik
lgtm, Can you add a quick comment about why rounding works here? I guess it's ...
4 years, 7 months ago (2016-05-10 17:03:14 UTC) #4
skobes
On 2016/05/10 17:03:14, ymalik1 wrote: > lgtm, > > Can you add a quick comment ...
4 years, 7 months ago (2016-05-10 20:27:51 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1961243002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1961243002/40001
4 years, 7 months ago (2016-05-10 20:36:21 UTC) #10
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 7 months ago (2016-05-10 22:40:50 UTC) #12
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/3c17160bd5dd8a82b0a9bd2b9cb531e285e6386f Cr-Commit-Position: refs/heads/master@{#392752}
4 years, 7 months ago (2016-05-10 22:42:15 UTC) #14
ojan
eae or szager are better reviewers than me for this change. eae/szager, mind sanity checking ...
4 years, 7 months ago (2016-05-10 23:05:05 UTC) #16
eae
https://codereview.chromium.org/1961243002/diff/40001/third_party/WebKit/Source/core/layout/ScrollAnchor.cpp File third_party/WebKit/Source/core/layout/ScrollAnchor.cpp (right): https://codereview.chromium.org/1961243002/diff/40001/third_party/WebKit/Source/core/layout/ScrollAnchor.cpp#newcode98 third_party/WebKit/Source/core/layout/ScrollAnchor.cpp:98: relativeBounds.moveBy(-flooredIntPoint(scroller->scrollPositionDouble())); We round scroll offsets in PaintLayerScrollableArea and floor ...
4 years, 7 months ago (2016-05-10 23:09:18 UTC) #17
skobes
https://codereview.chromium.org/1961243002/diff/40001/third_party/WebKit/Source/core/layout/ScrollAnchor.cpp File third_party/WebKit/Source/core/layout/ScrollAnchor.cpp (right): https://codereview.chromium.org/1961243002/diff/40001/third_party/WebKit/Source/core/layout/ScrollAnchor.cpp#newcode98 third_party/WebKit/Source/core/layout/ScrollAnchor.cpp:98: relativeBounds.moveBy(-flooredIntPoint(scroller->scrollPositionDouble())); On 2016/05/10 23:09:18, eae wrote: > We round ...
4 years, 7 months ago (2016-05-10 23:19:00 UTC) #18
eae
On 2016/05/10 23:19:00, skobes wrote: > https://codereview.chromium.org/1961243002/diff/40001/third_party/WebKit/Source/core/layout/ScrollAnchor.cpp > File third_party/WebKit/Source/core/layout/ScrollAnchor.cpp (right): > > https://codereview.chromium.org/1961243002/diff/40001/third_party/WebKit/Source/core/layout/ScrollAnchor.cpp#newcode98 > ...
4 years, 7 months ago (2016-05-10 23:23:24 UTC) #19
skobes
4 years, 7 months ago (2016-05-10 23:31:17 UTC) #20
Message was sent while issue was closed.
And just to close the loop on my original comments upthread - the reason
rounding to physical pixels didn't work is that we don't actually layout at
physical-pixel granularity (http://crbug.com/610805). :)

Powered by Google App Engine
This is Rietveld 408576698