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

Unified Diff: Source/core/style/ComputedStyle.h

Issue 1176503002: Rename isNormalFlowOnly to something meaningful (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Nittified! Created 5 years, 6 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
« no previous file with comments | « Source/core/paint/DeprecatedPaintLayerStackingNode.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/style/ComputedStyle.h
diff --git a/Source/core/style/ComputedStyle.h b/Source/core/style/ComputedStyle.h
index 71c132621d8369d5138c3a993d331669364778ad..bbd7a2ba3ef7fcb01c1c74aafa35fef19f19ef05 100644
--- a/Source/core/style/ComputedStyle.h
+++ b/Source/core/style/ComputedStyle.h
@@ -1204,6 +1204,22 @@ public:
PrintColorAdjust printColorAdjust() const { return static_cast<PrintColorAdjust>(inherited_flags.m_printColorAdjust); }
void setPrintColorAdjust(PrintColorAdjust value) { inherited_flags.m_printColorAdjust = value; }
+ // A stacking context is painted atomically and defines a stacking order, whereas
+ // a containing stacking context defines in which order the stacking contexts
+ // below are painted. In Blink, a stacking context is defined by non-auto
+ // z-index'. This invariant is enforced by the logic in StyleAdjuster
+ // See CSS 2.1, Appendix E for more details.
+ bool isStackingContext() const { return !hasAutoZIndex(); }
+
+ // Some elements are "treated as if they create a new stacking context" for the purpose
+ // of painting and hit testing. However they don't determine the stacking of the stacking
+ // context underneath them. That means that they are painted atomically.
+ bool isTreatedAsStackingContextForPainting() const
+ {
+ // FIXME: Floating objects are also considered stacking contexts for painting.
+ return isStackingContext() || position() != StaticPosition;
+ }
+
bool hasAutoZIndex() const { return m_box->hasAutoZIndex(); }
void setHasAutoZIndex() { SET_VAR(m_box, m_hasAutoZIndex, true); SET_VAR(m_box, m_zIndex, 0); }
int zIndex() const { return m_box->zIndex(); }
« no previous file with comments | « Source/core/paint/DeprecatedPaintLayerStackingNode.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698