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

Unified Diff: third_party/WebKit/Source/core/paint/README.md

Issue 1798263002: Rename isTreatedAsOrStackingContext to isStacked (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Markdown, isStacked, paintAllPhasesAtomically Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/paint/README.md
diff --git a/third_party/WebKit/Source/core/paint/README.md b/third_party/WebKit/Source/core/paint/README.md
index 049c92e457f758de557398e3fa9ed3476700f577..fa036e54c41ddae80063d1de6d87a5b9403da0db 100644
--- a/third_party/WebKit/Source/core/paint/README.md
+++ b/third_party/WebKit/Source/core/paint/README.md
@@ -2,6 +2,46 @@
This directory contains implementation of painters of layout objects.
+## Stacked contents and stacking contexts
+
+This chapter is basically a clarification of [CSS 2.1 appendix E. Elaborate description
+of Stacking Contexts](http://www.w3.org/TR/CSS21/zindex.html).
+
+According to the documentation, we can have the following types of elements that are
+treated in different ways during painting:
+
+* Stacked elements: elements that are z-ordered in stacking contexts.
+
+ * Stacking contexts: elements with non-auto z-indices.
+
+ * Elements that are not real stacking contexts but are treated as stacking
+ contexts and their z-ordering are managed by real stacking contexts.
+ They are positioned elements with `z-index: auto` (E.2.8 in the documentation).
chrishtr 2016/03/16 16:26:16 Add a paragraph below that explains what "treated
Xianzhu 2016/03/16 18:10:24 Done.
+ They must be managed by the enclosing stacking context as stacked elements
+ because `z-index:auto` and `z-index:0` are considered equal for stacking
+ context sorting and they may interleave by DOM order.
+
+ They are painted as self-painting PaintLayers.
+
+* Non-stacked pseudo stacking contexts: elements that are not stacked, but paint
+ their descendants (excluding any stacked contents) as if they created stacking
+ contexts. This includes
+
+ * inline blocks, inline tables, inline-level replaced elements
+ (E.2.7.2.1.4 in the documentation)
+ * non-positioned floating elements (E.2.5 in the documentation)
+ * [flex items](http://www.w3.org/TR/css-flexbox-1/#painting)
+ * [grid items](http://www.w3.org/TR/css-grid-1/#z-order)
+ * custom scrollbar parts
+
+ They are painted as pseudo stacking contexts by `ObjectPainter::paintAsPseudoStackingContext()`.
pdr. 2016/03/16 02:22:53 Nit: update to be paintAllPhasesAtomically
Xianzhu 2016/03/16 18:10:24 Done.
+
+* Other normal elements.
+
+"Stacked element" is not defined as a formal term in the documentation, but we found
+it convenient to use this term to refer to any elements participating z-index ordering
+in stacking contexts.
+
## Painters
## Paint invalidation

Powered by Google App Engine
This is Rietveld 408576698