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

Side by Side Diff: third_party/WebKit/Source/core/paint/README.md

Issue 2047283002: Avoid touching z-index in StyleAdjuster by using an isStackingContext flag instead (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update comments Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # `Source/core/paint` 1 # `Source/core/paint`
2 2
3 This directory contains implementation of painters of layout objects. It covers 3 This directory contains implementation of painters of layout objects. It covers
4 the following document lifecycle states: 4 the following document lifecycle states:
5 5
6 * PaintInvalidation (`InPaintInvalidation` and `PaintInvalidationClean`) 6 * PaintInvalidation (`InPaintInvalidation` and `PaintInvalidationClean`)
7 * PrePaint (`InPrePaint` and `PrePaintClean`) 7 * PrePaint (`InPrePaint` and `PrePaintClean`)
8 * Paint (`InPaint` and `PaintClean`) 8 * Paint (`InPaint` and `PaintClean`)
9 9
10 ## Glossaries 10 ## Glossaries
11 11
12 ### Stacked elements and stacking contexts 12 ### Stacked elements and stacking contexts
13 13
14 This chapter is basically a clarification of [CSS 2.1 appendix E. Elaborate desc ription 14 This chapter is basically a clarification of [CSS 2.1 appendix E. Elaborate desc ription
15 of Stacking Contexts](http://www.w3.org/TR/CSS21/zindex.html). 15 of Stacking Contexts](http://www.w3.org/TR/CSS21/zindex.html).
16 16
17 Note: we use 'element' instead of 'object' in this chapter to keep consistency w ith 17 Note: we use 'element' instead of 'object' in this chapter to keep consistency w ith
18 the spec. We use 'object' in other places in this document. 18 the spec. We use 'object' in other places in this document.
19 19
20 According to the documentation, we can have the following types of elements that are 20 According to the documentation, we can have the following types of elements that are
21 treated in different ways during painting: 21 treated in different ways during painting:
22 22
23 * Stacked objects: objects that are z-ordered in stacking contexts, including: 23 * Stacked objects: objects that are z-ordered in stacking contexts, including:
24 24
25 * Stacking contexts: elements with non-auto z-indices. 25 * Stacking contexts: elements with non-auto z-indices or other properties
26 that affect stacking e.g. transform, opacity, blend-mode.
26 27
27 * Elements that are not real stacking contexts but are treated as stacking 28 * Elements that are not real stacking contexts but are treated as stacking
28 contexts but don't manage other stacked elements. Their z-ordering are 29 contexts but don't manage other stacked elements. Their z-ordering are
29 managed by real stacking contexts. They are positioned elements with 30 managed by real stacking contexts. They are positioned elements with
30 `z-index: auto` (E.2.8 in the documentation). 31 `z-index: auto` (E.2.8 in the documentation).
31 32
32 They must be managed by the enclosing stacking context as stacked elemen ts 33 They must be managed by the enclosing stacking context as stacked elemen ts
33 because `z-index:auto` and `z-index:0` are considered equal for stacking 34 because `z-index:auto` and `z-index:0` are considered equal for stacking
34 context sorting and they may interleave by DOM order. 35 context sorting and they may interleave by DOM order.
35 36
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 254
254 When layer structure changes, and we are not invalidate paint of the changed sub tree, 255 When layer structure changes, and we are not invalidate paint of the changed sub tree,
255 we need to manually update the `needsPaintPhaseXXX` flags. For example, if an ob ject changes 256 we need to manually update the `needsPaintPhaseXXX` flags. For example, if an ob ject changes
256 style and creates a self-painting-layer, we copy the flags from its containing s elf-painting 257 style and creates a self-painting-layer, we copy the flags from its containing s elf-painting
257 layer to this layer, assuming that this layer needs all paint phases that its co ntainer 258 layer to this layer, assuming that this layer needs all paint phases that its co ntainer
258 self-painting layer needs. 259 self-painting layer needs.
259 260
260 We could update the `needsPaintPhaseXXX` flags in a separate tree walk, but that would regress 261 We could update the `needsPaintPhaseXXX` flags in a separate tree walk, but that would regress
261 performance of the first paint. For slimming paint v2, we can update the flags d uring the 262 performance of the first paint. For slimming paint v2, we can update the flags d uring the
262 pre-painting tree walk to simplify the logics. 263 pre-painting tree walk to simplify the logics.
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayerStackingNode.h ('k') | third_party/WebKit/Source/core/style/ComputedStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698