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

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

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: Animation expectation Created 4 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
Index: third_party/WebKit/Source/core/style/ComputedStyle.h
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.h b/third_party/WebKit/Source/core/style/ComputedStyle.h
index 5fcda23f6e5c1630ac1fab03817ed21f1bdbe3d9..658a77520496bec582c23d36e5a907209f444b41 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.h
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.h
@@ -1275,10 +1275,12 @@ public:
// 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
+ // below are painted.
// See CSS 2.1, Appendix E (https://www.w3.org/TR/CSS21/zindex.html) for more details.
- bool isStackingContext() const { return !hasAutoZIndex(); }
+ bool isStackingContext() const { return rareNonInheritedData->m_isStackingContext; }
+
+ void updateIsStackingContext(bool isDocumentElement, bool isInTopLayer);
+ void setIsStackingContext(bool b) { SET_VAR(rareNonInheritedData, m_isStackingContext, b); }
// Stacking contexts and positioned elements[1] are stacked (sorted in negZOrderList
// and posZOrderList) in their enclosing stacking contexts.

Powered by Google App Engine
This is Rietveld 408576698