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

Issue 2961613002: Slightly refactor StickyPositionScrollingConstraints API and add documentation (Closed)

Created:
3 years, 5 months ago by smcgruer
Modified:
3 years, 4 months ago
Reviewers:
flackr, chrishtr, yigu, trchen
CC:
blink-reviews, blink-reviews-layout_chromium.org, chromium-reviews, eae+blinkwatch, jchaffraix+rendering, kenneth.christiansen, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactor StickyPositionScrollingConstraints API and add documentation Main changes: 1. Removed unused method |NearestStickyAncestor|. 2. Removed |GetTotalStickyBoxStickyOffset| and |GetTotalContainingBlockStickyOffset|, which were only accessed in the class implementation so can be accessed directly. 3. Switched ancestor pointers to PaintLayer rather than LayoutBoxModelObject as we always just call ->Layer() on them. 4. Passed the StickyConstraintsMap into |ComputeStickyOffset| and find the ancestors internally, the same way as |GetOffsetForStickyPosition|. BUG=730043, 740070 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Review-Url: https://codereview.chromium.org/2961613002 Cr-Commit-Position: refs/heads/master@{#490996} Committed: https://chromium.googlesource.com/chromium/src/+/979aeb4b47044335a43dbe2d570220cd07589747

Patch Set 1 #

Patch Set 2 : More documentation, split out ancestor offset calculation #

Total comments: 16

Patch Set 3 : Address some reviewer changes #

Patch Set 4 : remove accidental file #

Total comments: 7

Patch Set 5 : Fixed a few comments #

Patch Set 6 : Rebase #

Patch Set 7 : Attempt to address remaining comments #

Total comments: 2

Patch Set 8 : Fix it's -> its #

Total comments: 12

Patch Set 9 : Address most reviewer comments #

Total comments: 1

Patch Set 10 : Add diagram + example #

Unified diffs Side-by-side diffs Delta from patch set Stats (+277 lines, -210 lines) Patch
M third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp View 1 2 3 4 5 6 7 3 chunks +15 lines, -40 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBoxModelObjectTest.cpp View 1 2 3 4 5 6 chunks +55 lines, -64 lines 0 comments Download
M third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp View 1 2 3 4 5 6 7 1 chunk +8 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.h View 1 2 3 4 5 6 7 8 9 7 chunks +141 lines, -69 lines 0 comments Download
M third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.cpp View 1 2 3 4 5 6 6 chunks +58 lines, -26 lines 0 comments Download

Messages

Total messages: 40 (18 generated)
smcgruer
https://codereview.chromium.org/2961613002/diff/20001/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp File third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp (right): https://codereview.chromium.org/2961613002/diff/20001/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp#newcode1098 third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp:1098: StickyPositionScrollingConstraints* constraints = &it->value; Refactoring this code made me ...
3 years, 5 months ago (2017-06-26 19:18:56 UTC) #4
flackr
https://codereview.chromium.org/2961613002/diff/20001/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp File third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp (right): https://codereview.chromium.org/2961613002/diff/20001/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp#newcode1098 third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp:1098: StickyPositionScrollingConstraints* constraints = &it->value; On 2017/06/26 19:18:56, smcgruer wrote: ...
3 years, 5 months ago (2017-06-29 15:24:10 UTC) #5
smcgruer
https://codereview.chromium.org/2961613002/diff/20001/third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.cpp File third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.cpp (right): https://codereview.chromium.org/2961613002/diff/20001/third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.cpp#newcode25 third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.cpp:25: // ourselves and our containing block, e.g. an inline ...
3 years, 5 months ago (2017-06-29 18:51:47 UTC) #6
smcgruer
3 years, 5 months ago (2017-06-29 18:52:00 UTC) #8
flackr
https://codereview.chromium.org/2961613002/diff/20001/third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.cpp File third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.cpp (right): https://codereview.chromium.org/2961613002/diff/20001/third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.cpp#newcode25 third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.cpp:25: // ourselves and our containing block, e.g. an inline ...
3 years, 5 months ago (2017-06-30 02:48:35 UTC) #9
yigu
Nice documentation! I wish I could see that earlier.. https://codereview.chromium.org/2961613002/diff/60001/third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.h File third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.h (right): https://codereview.chromium.org/2961613002/diff/60001/third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.h#newcode90 third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.h:90: ...
3 years, 5 months ago (2017-07-05 19:13:57 UTC) #10
smcgruer
https://codereview.chromium.org/2961613002/diff/60001/third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.h File third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.h (right): https://codereview.chromium.org/2961613002/diff/60001/third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.h#newcode90 third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.h:90: // element. (Or after prepaint for SlimmingPaintV2). On 2017/07/05 ...
3 years, 5 months ago (2017-07-06 14:25:38 UTC) #11
flackr
https://codereview.chromium.org/2961613002/diff/60001/third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.h File third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.h (right): https://codereview.chromium.org/2961613002/diff/60001/third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.h#newcode90 third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.h:90: // element. (Or after prepaint for SlimmingPaintV2). On 2017/07/06 ...
3 years, 5 months ago (2017-07-06 14:35:06 UTC) #12
smcgruer
https://codereview.chromium.org/2961613002/diff/20001/third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.cpp File third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.cpp (right): https://codereview.chromium.org/2961613002/diff/20001/third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.cpp#newcode25 third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.cpp:25: // ourselves and our containing block, e.g. an inline ...
3 years, 5 months ago (2017-07-07 13:51:58 UTC) #13
flackr
https://codereview.chromium.org/2961613002/diff/60001/third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.cpp File third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.cpp (right): https://codereview.chromium.org/2961613002/diff/60001/third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.cpp#newcode100 third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.cpp:100: // different members are necessary. On 2017/07/07 13:51:58, smcgruer ...
3 years, 5 months ago (2017-07-19 17:13:34 UTC) #14
smcgruer
https://codereview.chromium.org/2961613002/diff/60001/third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.cpp File third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.cpp (right): https://codereview.chromium.org/2961613002/diff/60001/third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.cpp#newcode100 third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.cpp:100: // different members are necessary. On 2017/07/19 17:13:34, flackr ...
3 years, 5 months ago (2017-07-20 19:25:08 UTC) #16
flackr
lgtm
3 years, 5 months ago (2017-07-25 20:14:33 UTC) #17
smcgruer
Adding trchen, chrishtr for OWNERS. Also if you have any thoughts on the sticky documentation ...
3 years, 4 months ago (2017-07-26 19:39:33 UTC) #19
chrishtr
https://codereview.chromium.org/2961613002/diff/120001/third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.h File third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.h (right): https://codereview.chromium.org/2961613002/diff/120001/third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.h#newcode27 third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.h:27: // rectangle and it's containing block rectangle (both respective ...
3 years, 4 months ago (2017-07-27 00:50:33 UTC) #20
smcgruer
https://codereview.chromium.org/2961613002/diff/120001/third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.h File third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.h (right): https://codereview.chromium.org/2961613002/diff/120001/third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.h#newcode27 third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.h:27: // rectangle and it's containing block rectangle (both respective ...
3 years, 4 months ago (2017-07-27 14:06:52 UTC) #26
chrishtr
https://codereview.chromium.org/2961613002/diff/140001/third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.cpp File third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.cpp (right): https://codereview.chromium.org/2961613002/diff/140001/third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.cpp#newcode10 third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.cpp:10: FloatSize StickyPositionScrollingConstraints::ComputeStickyOffset( Not going to look at code changes ...
3 years, 4 months ago (2017-07-27 15:13:40 UTC) #28
smcgruer
https://codereview.chromium.org/2961613002/diff/140001/third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.cpp File third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.cpp (right): https://codereview.chromium.org/2961613002/diff/140001/third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.cpp#newcode10 third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.cpp:10: FloatSize StickyPositionScrollingConstraints::ComputeStickyOffset( On 2017/07/27 15:13:39, chrishtr wrote: > Not ...
3 years, 4 months ago (2017-07-28 17:35:57 UTC) #31
chrishtr
https://codereview.chromium.org/2961613002/diff/140001/third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.h File third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.h (right): https://codereview.chromium.org/2961613002/diff/140001/third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.h#newcode40 third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.h:40: class StickyPositionScrollingConstraints final { On 2017/07/28 at 17:35:57, smcgruer ...
3 years, 4 months ago (2017-07-28 18:25:51 UTC) #32
smcgruer
https://codereview.chromium.org/2961613002/diff/140001/third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.h File third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.h (right): https://codereview.chromium.org/2961613002/diff/140001/third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.h#newcode40 third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.h:40: class StickyPositionScrollingConstraints final { On 2017/07/28 18:25:51, chrishtr wrote: ...
3 years, 4 months ago (2017-07-31 15:22:34 UTC) #33
chrishtr
lgtm
3 years, 4 months ago (2017-07-31 21:29:53 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2961613002/180001
3 years, 4 months ago (2017-08-01 13:33:10 UTC) #37
commit-bot: I haz the power
3 years, 4 months ago (2017-08-01 15:15:45 UTC) #40
Message was sent while issue was closed.
Committed patchset #10 (id:180001) as
https://chromium.googlesource.com/chromium/src/+/979aeb4b47044335a43dbe2d5702...

Powered by Google App Engine
This is Rietveld 408576698