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

Issue 2825343003: Clean compositing inputs for location APIs for sticky-affected elements. (Closed)

Created:
3 years, 8 months ago by smcgruer
Modified:
3 years, 7 months ago
CC:
fs, blink-reviews, blink-reviews-dom_chromium.org, blink-reviews-html_chromium.org, blink-reviews-layout_chromium.org, blink-reviews-paint_chromium.org, chromium-reviews, dglazkov+blink, dshwang, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, rwlbuis, sof, szager+layoutwatch_chromium.org, zoltan1
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Clean compositing inputs for location APIs for sticky-affected elements. After layout, the location of position:sticky elements and their descendants will be incorrect until compositing inputs have been cleaned. In most cases this is not an issue since Blink will run a full lifecycle after page change, including compositing. However if the user modifies layout during a script and then calls a location-based API without yielding, compositing inputs would still be dirty. This patch corrects that behavior by ensuring that compositing inputs are clean for location-related APIs. BUG=672457 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Review-Url: https://codereview.chromium.org/2825343003 Cr-Commit-Position: refs/heads/master@{#471221} Committed: https://chromium.googlesource.com/chromium/src/+/383d1bb3f30b49fcdf3918cefc588637aa678ec0

Patch Set 1 #

Total comments: 6

Patch Set 2 : Switch to using an inherited StyleRareInheritedData #

Patch Set 3 : Address reviewer comments #

Total comments: 8

Patch Set 4 : Address reviewer comments #

Patch Set 5 : Also fix the other layout test #

Total comments: 7

Patch Set 6 : Add test for sticky subtrees #

Total comments: 24

Patch Set 7 : First pass addressing reviewer comments #

Total comments: 8

Patch Set 8 : Remove UNLIKELY #

Patch Set 9 : Fix StyleAdjuster.cpp code #

Patch Set 10 : Improve unit-tests #

Patch Set 11 : Rename EnsureLifecycleValidForLocationAPIsForNode #

Total comments: 2

Patch Set 12 : Rebase #

Patch Set 13 : Add intermediate sticky in StickySubtreesAreTrackedCorrectly test #

Total comments: 2

Patch Set 14 : More bikeshedding #

Patch Set 15 : Change bit name #

Patch Set 16 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+463 lines, -12 lines) Patch
A third_party/WebKit/LayoutTests/fast/css/sticky/sticky-position-valid-after-insertion.html View 1 2 3 1 chunk +70 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css/sticky/sticky-position-valid-after-layout.html View 1 2 3 4 1 chunk +58 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +9 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +10 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +24 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/DocumentTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +45 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Element.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 8 chunks +8 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/dom/ElementTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +220 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLElement.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/style/ComputedStyle.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +8 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/style/StyleRareInheritedData.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/style/StyleRareInheritedData.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +3 lines, -0 lines 0 comments Download

Messages

Total messages: 69 (31 generated)
smcgruer
3 years, 8 months ago (2017-04-19 14:33:17 UTC) #2
smcgruer
Chris, Rob, This is a re-implementation of PS2 from https://codereview.chromium.org/2647533002/. As discussed in that code ...
3 years, 8 months ago (2017-04-19 14:36:39 UTC) #5
flackr
On 2017/04/19 14:36:39, smcgruer wrote: > Chris, Rob, > > This is a re-implementation of ...
3 years, 8 months ago (2017-04-20 06:32:00 UTC) #6
chrishtr
Looks generally good except that those unittests fail, and the other comments below. https://codereview.chromium.org/2825343003/diff/1/third_party/WebKit/Source/core/dom/Element.cpp File ...
3 years, 8 months ago (2017-04-20 17:40:34 UTC) #7
smcgruer
On 2017/04/20 06:32:00, flackr wrote: > For these two issues, something based on Element::recalcStyle is ...
3 years, 7 months ago (2017-04-24 15:30:58 UTC) #8
smcgruer
Switched to using an inherited rare data css style which appears to work. This may ...
3 years, 7 months ago (2017-04-26 14:37:07 UTC) #9
flackr
I think an alternative is to make RecalcStyle get called by dirtying the style on ...
3 years, 7 months ago (2017-04-26 15:08:01 UTC) #10
smcgruer
https://codereview.chromium.org/2825343003/diff/40001/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-position-valid-after-insertion.html File third_party/WebKit/LayoutTests/fast/css/sticky/sticky-position-valid-after-insertion.html (right): https://codereview.chromium.org/2825343003/diff/40001/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-position-valid-after-insertion.html#newcode43 third_party/WebKit/LayoutTests/fast/css/sticky/sticky-position-valid-after-insertion.html:43: var scroller = document.getElementById('scroller'); On 2017/04/26 15:08:00, flackr wrote: ...
3 years, 7 months ago (2017-04-26 17:45:46 UTC) #11
flackr
https://codereview.chromium.org/2825343003/diff/80001/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp File third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp (right): https://codereview.chromium.org/2825343003/diff/80001/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp#newcode979 third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp:979: state.Style()->SetIsInStickySubtree(state.ParentStyle()->IsInStickySubtree()); I patched this in and I only see ...
3 years, 7 months ago (2017-04-27 15:50:03 UTC) #12
smcgruer
https://codereview.chromium.org/2825343003/diff/80001/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp File third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp (right): https://codereview.chromium.org/2825343003/diff/80001/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp#newcode979 third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp:979: state.Style()->SetIsInStickySubtree(state.ParentStyle()->IsInStickySubtree()); On 2017/04/27 15:50:02, flackr wrote: > I patched ...
3 years, 7 months ago (2017-04-27 16:05:28 UTC) #13
flackr
https://codereview.chromium.org/2825343003/diff/80001/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp File third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp (right): https://codereview.chromium.org/2825343003/diff/80001/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp#newcode979 third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp:979: state.Style()->SetIsInStickySubtree(state.ParentStyle()->IsInStickySubtree()); On 2017/04/27 16:05:28, smcgruer wrote: > On 2017/04/27 ...
3 years, 7 months ago (2017-04-27 17:17:01 UTC) #14
flackr
https://codereview.chromium.org/2825343003/diff/80001/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp File third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp (right): https://codereview.chromium.org/2825343003/diff/80001/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp#newcode979 third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp:979: state.Style()->SetIsInStickySubtree(state.ParentStyle()->IsInStickySubtree()); On 2017/04/27 17:17:01, flackr wrote: > On 2017/04/27 ...
3 years, 7 months ago (2017-04-27 17:20:53 UTC) #15
flackr
https://codereview.chromium.org/2825343003/diff/80001/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp File third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp (right): https://codereview.chromium.org/2825343003/diff/80001/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp#newcode979 third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp:979: state.Style()->SetIsInStickySubtree(state.ParentStyle()->IsInStickySubtree()); On 2017/04/27 17:20:53, flackr wrote: > On 2017/04/27 ...
3 years, 7 months ago (2017-04-27 19:20:51 UTC) #16
smcgruer
FYI once you are both happy with this (Chris, Rob), then I will write up ...
3 years, 7 months ago (2017-04-28 18:20:37 UTC) #17
chrishtr
+meade for style changes.
3 years, 7 months ago (2017-04-28 20:13:31 UTC) #19
fs
Drive-by https://codereview.chromium.org/2825343003/diff/100001/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp File third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp (right): https://codereview.chromium.org/2825343003/diff/100001/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp#newcode972 third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp:972: state.Style()->SetIsInStickySubtree(state.ParentStyle()->IsInStickySubtree()); Do you even need this? Your bit ...
3 years, 7 months ago (2017-04-29 09:59:06 UTC) #20
fs
https://codereview.chromium.org/2825343003/diff/100001/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp File third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp (right): https://codereview.chromium.org/2825343003/diff/100001/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp#newcode987 third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp:987: state.Style()->SetIsInStickySubtree(position == EPosition::kSticky || Thinking about it some more, ...
3 years, 7 months ago (2017-04-29 12:10:31 UTC) #21
meade_UTC10
+shend, who's working on ComputedStyle right now fs had some good comments - I'm going ...
3 years, 7 months ago (2017-05-01 06:59:48 UTC) #23
shend
On 2017/05/01 at 06:59:48, meade wrote: > +shend, who's working on ComputedStyle right now > ...
3 years, 7 months ago (2017-05-01 07:03:03 UTC) #24
smcgruer
https://codereview.chromium.org/2825343003/diff/100001/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp File third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp (right): https://codereview.chromium.org/2825343003/diff/100001/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp#newcode972 third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp:972: state.Style()->SetIsInStickySubtree(state.ParentStyle()->IsInStickySubtree()); On 2017/04/29 09:59:06, fs wrote: > Do you ...
3 years, 7 months ago (2017-05-01 20:15:16 UTC) #25
fs
looks good to me (w/ some additional nits and poor bikeshed colors.) https://codereview.chromium.org/2825343003/diff/100001/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp File third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp ...
3 years, 7 months ago (2017-05-01 21:19:34 UTC) #27
smcgruer
https://codereview.chromium.org/2825343003/diff/100001/third_party/WebKit/Source/core/dom/Element.cpp File third_party/WebKit/Source/core/dom/Element.cpp (right): https://codereview.chromium.org/2825343003/diff/100001/third_party/WebKit/Source/core/dom/Element.cpp#newcode657 third_party/WebKit/Source/core/dom/Element.cpp:657: EnsureLifecycleValidForLocationAPIs(); On 2017/05/01 21:19:34, fs wrote: > On 2017/05/01 ...
3 years, 7 months ago (2017-05-02 15:25:41 UTC) #28
fs
https://codereview.chromium.org/2825343003/diff/100001/third_party/WebKit/Source/core/dom/Element.cpp File third_party/WebKit/Source/core/dom/Element.cpp (right): https://codereview.chromium.org/2825343003/diff/100001/third_party/WebKit/Source/core/dom/Element.cpp#newcode1135 third_party/WebKit/Source/core/dom/Element.cpp:1135: EnsureLifecycleValidForLocationAPIs(); On 2017/05/02 at 15:25:41, smcgruer wrote: > On ...
3 years, 7 months ago (2017-05-02 15:58:08 UTC) #29
smcgruer
https://codereview.chromium.org/2825343003/diff/100001/third_party/WebKit/Source/core/dom/Element.cpp File third_party/WebKit/Source/core/dom/Element.cpp (right): https://codereview.chromium.org/2825343003/diff/100001/third_party/WebKit/Source/core/dom/Element.cpp#newcode1135 third_party/WebKit/Source/core/dom/Element.cpp:1135: EnsureLifecycleValidForLocationAPIs(); On 2017/05/02 15:58:07, fs wrote: > On 2017/05/02 ...
3 years, 7 months ago (2017-05-02 17:25:30 UTC) #30
meade_UTC10
lgtm for core/css and core/style changes
3 years, 7 months ago (2017-05-03 03:34:01 UTC) #31
smcgruer
Thanks for the lgtm meade, shend. I have updated the unit-tests to be better (imo), ...
3 years, 7 months ago (2017-05-03 17:56:58 UTC) #34
flackr
https://codereview.chromium.org/2825343003/diff/200001/third_party/WebKit/Source/core/dom/ElementTest.cpp File third_party/WebKit/Source/core/dom/ElementTest.cpp (right): https://codereview.chromium.org/2825343003/diff/200001/third_party/WebKit/Source/core/dom/ElementTest.cpp#newcode216 third_party/WebKit/Source/core/dom/ElementTest.cpp:216: // Now switch the parent back to being non-sticky ...
3 years, 7 months ago (2017-05-04 14:40:59 UTC) #41
smcgruer
https://codereview.chromium.org/2825343003/diff/200001/third_party/WebKit/Source/core/dom/ElementTest.cpp File third_party/WebKit/Source/core/dom/ElementTest.cpp (right): https://codereview.chromium.org/2825343003/diff/200001/third_party/WebKit/Source/core/dom/ElementTest.cpp#newcode216 third_party/WebKit/Source/core/dom/ElementTest.cpp:216: // Now switch the parent back to being non-sticky ...
3 years, 7 months ago (2017-05-04 15:25:33 UTC) #42
flackr
The general change LGTM, I have a suggestion around naming consistency with the method and ...
3 years, 7 months ago (2017-05-04 19:00:51 UTC) #43
smcgruer
Ok, it looks like the comments are starting to dry up, so if nobody brings ...
3 years, 7 months ago (2017-05-08 14:32:06 UTC) #47
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/2825343003/280001
3 years, 7 months ago (2017-05-11 13:41:10 UTC) #53
commit-bot: I haz the power
Try jobs failed on following builders: android_clang_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_clang_dbg_recipe/builds/266752)
3 years, 7 months ago (2017-05-11 13:45:00 UTC) #55
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/2825343003/300001
3 years, 7 months ago (2017-05-11 14:01:15 UTC) #58
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/451816)
3 years, 7 months ago (2017-05-11 16:12:30 UTC) #60
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/2825343003/300001
3 years, 7 months ago (2017-05-11 18:10:55 UTC) #62
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/452180)
3 years, 7 months ago (2017-05-11 20:23:03 UTC) #64
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/2825343003/300001
3 years, 7 months ago (2017-05-12 03:34:05 UTC) #66
commit-bot: I haz the power
3 years, 7 months ago (2017-05-12 04:33:02 UTC) #69
Message was sent while issue was closed.
Committed patchset #16 (id:300001) as
https://chromium.googlesource.com/chromium/src/+/383d1bb3f30b49fcdf3918cefc58...

Powered by Google App Engine
This is Rietveld 408576698