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

Issue 1798263002: Rename isTreatedAsOrStackingContext to isStacked (Closed)

Created:
4 years, 9 months ago by Xianzhu
Modified:
4 years, 9 months ago
Reviewers:
chrishtr, pdr., trchen
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, blink-reviews, blink-reviews-layout_chromium.org, blink-reviews-paint_chromium.org, blink-reviews-style_chromium.org, chromium-reviews, darin (slow to review), dshwang, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, qsr+mojo_chromium.org, slimming-paint-reviews_chromium.org, szager+layoutwatch_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Rename isTreatedAsOrStackingContext to isStacked and move out of ComputedStyle Previous isTreatedAsStackingContext is confusing because besides positioned elements we also treats some other elements as "pseudo stacking contexts" (see ObjectPainter::paintPseudoStackingContext() ==> renamed to ObjectPainter::paintAllPhasesAtomically()). The actual difference between elements "isTreatedAsStackingContext" and other pseudo stacking contexts is that the former are treated as "z-index:0" so are stacked in the containing stacking context. Then isTreatedAsOrStackingContext() is to check if the element should be stacked, so rename it to isStacked(). Added a chapter in Source/core/paint/README.md to explain how we understand and use the concepts. Also avoid "pseudo stacking context". Rename ObjectPainter::paintPseudoStackingContext() to ObjectPainter::paintAllPhasesAtomically(). Committed: https://crrev.com/c717c257efe380a6498363f60a350d5835c545bb Cr-Commit-Position: refs/heads/master@{#381657}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : Markdown, isStacked, paintAllPhasesAtomically #

Total comments: 16

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : Add back m_isStacked #

Patch Set 8 : Fix windows compile #

Unified diffs Side-by-side diffs Delta from patch set Stats (+139 lines, -92 lines) Patch
M third_party/WebKit/Source/core/frame/LocalFrame.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp View 1 2 3 4 5 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/layout/compositing/CompositingInputsUpdater.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/compositing/GraphicsLayerUpdater.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/paint/BlockFlowPainter.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/paint/BlockPainter.h View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/paint/BlockPainter.cpp View 1 2 3 2 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/paint/GridPainter.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/paint/ObjectPainter.h View 1 2 3 1 chunk +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/paint/ObjectPainter.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/paint/PaintLayer.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/paint/PaintLayer.cpp View 1 2 3 4 5 4 chunks +7 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintLayerStackingNode.h View 1 2 3 4 5 6 7 6 chunks +30 lines, -23 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintLayerStackingNode.cpp View 1 2 3 4 5 6 5 chunks +12 lines, -17 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintLayerStackingNodeIterator.cpp View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintPhase.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/paint/README.md View 1 2 3 4 5 1 chunk +53 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/paint/SVGForeignObjectPainter.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/paint/ScrollbarPainter.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/style/ComputedStyle.h View 1 2 3 4 1 chunk +12 lines, -21 lines 0 comments Download

Messages

Total messages: 41 (9 generated)
Xianzhu
4 years, 9 months ago (2016-03-14 22:10:15 UTC) #2
trchen
I'm not sure if the new term is less confusing than what we already have... ...
4 years, 9 months ago (2016-03-15 00:12:14 UTC) #3
Xianzhu
On 2016/03/15 00:12:14, trchen wrote: > I'm not sure if the new term is less ...
4 years, 9 months ago (2016-03-15 01:11:02 UTC) #4
Xianzhu
chrishtr/pdr what are your preferences of the naming: isTreatedAsOrStackingContext, isStackedContent or participatesZIndexOrdering?
4 years, 9 months ago (2016-03-15 17:49:53 UTC) #5
Xianzhu
I still prefer isStackedContent because it's shorter and its meaning is clear. I will use ...
4 years, 9 months ago (2016-03-15 17:53:35 UTC) #6
pdr.
This doesn't really seem to belong on ComputedStyle since it's just a paint concept. What ...
4 years, 9 months ago (2016-03-15 20:12:07 UTC) #7
Xianzhu
On 2016/03/15 20:12:07, pdr wrote: > This doesn't really seem to belong on ComputedStyle since ...
4 years, 9 months ago (2016-03-15 20:38:48 UTC) #8
pdr.
On 2016/03/15 at 20:38:48, wangxianzhu wrote: > On 2016/03/15 20:12:07, pdr wrote: > > This ...
4 years, 9 months ago (2016-03-15 21:37:59 UTC) #9
chrishtr
On 2016/03/15 at 21:37:59, pdr wrote: > On 2016/03/15 at 20:38:48, wangxianzhu wrote: > > ...
4 years, 9 months ago (2016-03-15 21:46:37 UTC) #10
Xianzhu
On 2016/03/15 21:37:59, pdr wrote: > On 2016/03/15 at 20:38:48, wangxianzhu wrote: > > On ...
4 years, 9 months ago (2016-03-15 21:53:13 UTC) #11
pdr.
Ok, let me try to summarize. We have 3 classes of "stacking-context-ish" painting situations: B. ...
4 years, 9 months ago (2016-03-15 22:40:54 UTC) #12
Xianzhu
On 2016/03/15 22:40:54, pdr wrote: > Ok, let me try to summarize. We have 3 ...
4 years, 9 months ago (2016-03-15 23:36:52 UTC) #13
Xianzhu
Rethought about the difference between positioned elements with 'z-index:auto' and other pseudo stacking contexts. Previously ...
4 years, 9 months ago (2016-03-15 23:52:45 UTC) #14
trchen
On 2016/03/15 23:52:45, Xianzhu wrote: > Rethought about the difference between positioned elements with 'z-index:auto' ...
4 years, 9 months ago (2016-03-16 00:05:09 UTC) #15
Xianzhu
On 2016/03/16 00:05:09, trchen wrote: > On 2016/03/15 23:52:45, Xianzhu wrote: > > Rethought about ...
4 years, 9 months ago (2016-03-16 00:12:07 UTC) #16
pdr.
I learned a lot in this review too. What are you thoughts about the direction ...
4 years, 9 months ago (2016-03-16 00:21:16 UTC) #17
pdr.
On 2016/03/15 at 23:36:52, wangxianzhu wrote: > I removed the FIXME about floating objects because ...
4 years, 9 months ago (2016-03-16 00:23:02 UTC) #18
Xianzhu
On 2016/03/16 00:21:16, pdr wrote: > I learned a lot in this review too. > ...
4 years, 9 months ago (2016-03-16 00:37:41 UTC) #19
Xianzhu
Ptal: - added a markdown chapter; - use even shorter name: isStacked; - avoid "pseudo ...
4 years, 9 months ago (2016-03-16 01:01:19 UTC) #21
pdr.
https://codereview.chromium.org/1798263002/diff/40001/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp File third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp (right): https://codereview.chromium.org/1798263002/diff/40001/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp#newcode299 third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp:299: // a stacked content, creating this layer may cause ...
4 years, 9 months ago (2016-03-16 02:22:53 UTC) #22
pdr.
LGTM There's a lot of good stuff in this patch: paintAllPhasesAtomically is a great improvement, ...
4 years, 9 months ago (2016-03-16 06:40:23 UTC) #23
chrishtr
https://codereview.chromium.org/1798263002/diff/40001/third_party/WebKit/Source/core/paint/PaintLayerStackingNode.cpp File third_party/WebKit/Source/core/paint/PaintLayerStackingNode.cpp (right): https://codereview.chromium.org/1798263002/diff/40001/third_party/WebKit/Source/core/paint/PaintLayerStackingNode.cpp#newcode64 third_party/WebKit/Source/core/paint/PaintLayerStackingNode.cpp:64: m_isStacked = shouldStackObject(*layoutObject()); Why is this code caching shouldStackObject(*layoutObject())? ...
4 years, 9 months ago (2016-03-16 16:26:16 UTC) #24
Xianzhu
https://codereview.chromium.org/1798263002/diff/40001/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp File third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp (right): https://codereview.chromium.org/1798263002/diff/40001/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp#newcode299 third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp:299: // a stacked content, creating this layer may cause ...
4 years, 9 months ago (2016-03-16 18:10:24 UTC) #25
chrishtr
https://codereview.chromium.org/1798263002/diff/40001/third_party/WebKit/Source/core/paint/PaintLayerStackingNode.cpp File third_party/WebKit/Source/core/paint/PaintLayerStackingNode.cpp (right): https://codereview.chromium.org/1798263002/diff/40001/third_party/WebKit/Source/core/paint/PaintLayerStackingNode.cpp#newcode64 third_party/WebKit/Source/core/paint/PaintLayerStackingNode.cpp:64: m_isStacked = shouldStackObject(*layoutObject()); On 2016/03/16 at 18:10:24, Xianzhu wrote: ...
4 years, 9 months ago (2016-03-16 18:15:09 UTC) #26
Xianzhu
https://codereview.chromium.org/1798263002/diff/40001/third_party/WebKit/Source/core/paint/PaintLayerStackingNode.cpp File third_party/WebKit/Source/core/paint/PaintLayerStackingNode.cpp (right): https://codereview.chromium.org/1798263002/diff/40001/third_party/WebKit/Source/core/paint/PaintLayerStackingNode.cpp#newcode64 third_party/WebKit/Source/core/paint/PaintLayerStackingNode.cpp:64: m_isStacked = shouldStackObject(*layoutObject()); On 2016/03/16 18:15:09, chrishtr wrote: > ...
4 years, 9 months ago (2016-03-16 21:28:41 UTC) #27
chrishtr
lgtm
4 years, 9 months ago (2016-03-16 21:40:44 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1798263002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1798263002/100001
4 years, 9 months ago (2016-03-16 21:55:58 UTC) #31
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/182380)
4 years, 9 months ago (2016-03-16 22:45:26 UTC) #33
Xianzhu
Removing PaintLayerStackingNode::m_isStacked breaks the logic when a layer is removed during style change. In PaintLayer::removeChild(), ...
4 years, 9 months ago (2016-03-17 00:54:48 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1798263002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1798263002/140001
4 years, 9 months ago (2016-03-17 02:27:47 UTC) #37
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years, 9 months ago (2016-03-17 03:48:10 UTC) #39
commit-bot: I haz the power
4 years, 9 months ago (2016-03-17 03:50:04 UTC) #41
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/c717c257efe380a6498363f60a350d5835c545bb
Cr-Commit-Position: refs/heads/master@{#381657}

Powered by Google App Engine
This is Rietveld 408576698