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

Issue 2047283002: Avoid touching z-index in StyleAdjuster by using an isStackingContext flag instead (Closed)

Created:
4 years, 6 months ago by alancutter (OOO until 2018)
Modified:
4 years, 5 months ago
Reviewers:
chrishtr, esprehn, rune
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, blink-reviews-dom_chromium.org, blink-reviews-layout_chromium.org, blink-reviews-style_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, rwlbuis, sof, 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

Avoid touching z-index in StyleAdjuster by using an isStackingContext flag instead This change moves logic in StyleAdjuster for changing the computed z-index out into ComputedStyle::updateIsStackingContext(). This ensures we compute and inherit the correct z-index value almost all of the time (see new test failure expectations). Also by updating the flag outside of style resolution any new CSS animations that affect stacking are now accounted for. This patch is an alternative to https://codereview.chromium.org/2035793007. BUG=616674, 375982 Committed: https://crrev.com/a46d892723fe86a7f49113c46e3c40c2343724ce Cr-Commit-Position: refs/heads/master@{#403844}

Patch Set 1 #

Patch Set 2 : setZIndexUpdates #

Patch Set 3 : Add z-index inheritance test #

Patch Set 4 : PseudoIdBackdrop #

Patch Set 5 : Precheck not needed #

Patch Set 6 : Crash test case #

Patch Set 7 : Update old z-index stacking context test #

Total comments: 7

Patch Set 8 : Enum and internals #

Patch Set 9 : Stacking context reftest #

Patch Set 10 : Remove enums and move adjustment #

Patch Set 11 : Failure expectations #

Patch Set 12 : Animation expectation #

Total comments: 2

Patch Set 13 : Update comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+216 lines, -152 lines) Patch
M third_party/WebKit/LayoutTests/animations/interpolation/z-index-interpolation-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +15 lines, -15 lines 0 comments Download
A third_party/WebKit/LayoutTests/animations/transform-css-animation-squash-crash.html View 1 2 3 4 5 6 7 1 chunk +18 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/css3/blending/isolation-isolate-simple.html View 1 2 3 4 5 6 7 8 1 chunk +28 lines, -24 lines 0 comments Download
A third_party/WebKit/LayoutTests/css3/blending/isolation-isolate-simple-expected.html View 1 2 3 4 5 6 7 1 chunk +10 lines, -0 lines 0 comments Download
D third_party/WebKit/LayoutTests/css3/blending/isolation-isolate-simple-expected.txt View 1 2 3 4 5 6 1 chunk +0 lines, -6 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css/getComputedStyle/getComputedStyle-z-index-inherit.html View 1 2 3 4 5 6 7 8 9 1 chunk +34 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css/getComputedStyle/getComputedStyle-z-index-inherit-expected.txt View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -0 lines 0 comments Download
D third_party/WebKit/LayoutTests/fast/css/getComputedStyle/getComputedStyle-zIndex-auto.html View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -35 lines 0 comments Download
D third_party/WebKit/LayoutTests/fast/css/getComputedStyle/getComputedStyle-zIndex-auto-expected.txt View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -8 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css/getComputedStyle/getComputedStyle-zIndex-non-auto.html View 1 2 3 4 5 6 7 8 9 10 1 chunk +18 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css/getComputedStyle/getComputedStyle-zIndex-non-auto-expected.txt View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 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 2 chunks +8 lines, -50 lines 0 comments Download
M third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -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 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBox.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutFullScreen.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutObject.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/paint/PaintLayerStackingNode.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -3 lines 0 comments Download
M third_party/WebKit/Source/core/paint/README.md View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -1 line 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 1 chunk +5 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/style/ComputedStyle.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +55 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/style/StyleRareNonInheritedData.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/style/StyleRareNonInheritedData.cpp View 1 3 chunks +3 lines, -0 lines 0 comments Download

Messages

Total messages: 43 (20 generated)
alancutter (OOO until 2018)
+esprehn for ComputedStyle & StyleRareNonInheritedData. +christhtr for everything else.
4 years, 6 months ago (2016-06-09 04:49:26 UTC) #7
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2047283002/40001
4 years, 6 months ago (2016-06-09 04:49:49 UTC) #9
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2047283002/100001
4 years, 6 months ago (2016-06-09 05:25:18 UTC) #11
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/241690)
4 years, 6 months ago (2016-06-09 06:55:01 UTC) #13
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2047283002/120001
4 years, 6 months ago (2016-06-09 08:03:01 UTC) #15
rune
375982 is not fixed since we're still adjusting z-index to auto for non-positioned elements: <!DOCTYPE ...
4 years, 6 months ago (2016-06-09 09:10:25 UTC) #18
rune
https://codereview.chromium.org/2047283002/diff/120001/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp File third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp (left): https://codereview.chromium.org/2047283002/diff/120001/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp#oldcode184 third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp:184: style.setHasAutoZIndex(); This also incorrectly affects computed style.
4 years, 6 months ago (2016-06-09 09:13:43 UTC) #19
commit-bot: I haz the power
Dry run: 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/236200)
4 years, 6 months ago (2016-06-09 11:05:06 UTC) #21
alancutter (OOO until 2018)
https://codereview.chromium.org/2047283002/diff/120001/third_party/WebKit/LayoutTests/css3/blending/isolation-isolate-simple.html File third_party/WebKit/LayoutTests/css3/blending/isolation-isolate-simple.html (right): https://codereview.chromium.org/2047283002/diff/120001/third_party/WebKit/LayoutTests/css3/blending/isolation-isolate-simple.html#newcode24 third_party/WebKit/LayoutTests/css3/blending/isolation-isolate-simple.html:24: assert_true(internals.isStackingContext(isolator_accelerated), 'hardware path'); On 2016/06/09 at 09:10:25, rune wrote: ...
4 years, 6 months ago (2016-06-10 04:59:31 UTC) #22
alancutter (OOO until 2018)
https://codereview.chromium.org/2047283002/diff/120001/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp File third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp (left): https://codereview.chromium.org/2047283002/diff/120001/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp#oldcode184 third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp:184: style.setHasAutoZIndex(); On 2016/06/09 at 09:13:43, rune wrote: > This ...
4 years, 6 months ago (2016-06-10 05:36:47 UTC) #23
alancutter (OOO until 2018)
https://codereview.chromium.org/2047283002/diff/120001/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp File third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp (left): https://codereview.chromium.org/2047283002/diff/120001/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp#oldcode184 third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp:184: style.setHasAutoZIndex(); On 2016/06/10 at 05:36:47, alancutter wrote: > On ...
4 years, 6 months ago (2016-06-10 08:26:00 UTC) #26
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2047283002/220001
4 years, 6 months ago (2016-06-10 08:46:28 UTC) #28
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-10 10:15:28 UTC) #30
rune
lgtm with comment nits. https://codereview.chromium.org/2047283002/diff/220001/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp File third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp (right): https://codereview.chromium.org/2047283002/diff/220001/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp#newcode156 third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp:156: // TODO(alancutter): Avoid altering z-index ...
4 years, 6 months ago (2016-06-10 12:25:52 UTC) #31
chrishtr
PaintLayerStackingNode also has stale references to non-auto z-index.
4 years, 6 months ago (2016-06-10 22:09:04 UTC) #32
alancutter (OOO until 2018)
On 2016/06/10 at 22:09:04, chrishtr wrote: > PaintLayerStackingNode also has stale references to non-auto z-index. ...
4 years, 5 months ago (2016-06-30 06:36:45 UTC) #33
chrishtr
On 2016/06/30 at 06:36:45, alancutter wrote: > On 2016/06/10 at 22:09:04, chrishtr wrote: > > ...
4 years, 5 months ago (2016-06-30 20:04:52 UTC) #34
chrishtr
4 years, 5 months ago (2016-06-30 20:04:57 UTC) #35
alancutter (OOO until 2018)
On 2016/06/30 at 20:04:52, chrishtr wrote: > On 2016/06/30 at 06:36:45, alancutter wrote: > > ...
4 years, 5 months ago (2016-07-05 04:57:55 UTC) #36
chrishtr
lgtm
4 years, 5 months ago (2016-07-05 19:37:27 UTC) #37
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/2047283002/240001
4 years, 5 months ago (2016-07-06 02:22:59 UTC) #40
commit-bot: I haz the power
Committed patchset #13 (id:240001)
4 years, 5 months ago (2016-07-06 03:57:57 UTC) #41
commit-bot: I haz the power
4 years, 5 months ago (2016-07-06 04:00:00 UTC) #43
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/a46d892723fe86a7f49113c46e3c40c2343724ce
Cr-Commit-Position: refs/heads/master@{#403844}

Powered by Google App Engine
This is Rietveld 408576698