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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBox.cpp

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/layout/LayoutBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index f760f4c05c473670efff8a3d7e8f2dba5f5de787..206441579efdc8ea113ffa3917ac45b1d3be5f96 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -108,7 +108,7 @@ PaintLayerType LayoutBox::layerTypeRequired() const
// position:static elements that are not flex-items get their z-index coerced to auto.
if (isPositioned() || createsGroup() || hasClipPath() || hasTransformRelatedProperty()
|| style()->hasCompositorProxy() || hasHiddenBackface() || hasReflection() || style()->specifiesColumns()
- || !style()->hasAutoZIndex() || style()->shouldCompositeForCurrentAnimations())
+ || style()->isStackingContext() || style()->shouldCompositeForCurrentAnimations())
return NormalPaintLayer;
if (hasOverflowClip())
@@ -1388,7 +1388,7 @@ static bool isCandidateForOpaquenessTest(const LayoutBox& childBox)
if (childLayer->compositingState() != NotComposited)
return false;
// FIXME: Deal with z-index.
- if (!childStyle.hasAutoZIndex())
+ if (childStyle.isStackingContext())
return false;
if (childLayer->hasTransformRelatedProperty() || childLayer->isTransparent() || childLayer->hasFilterInducingProperty())
return false;

Powered by Google App Engine
This is Rietveld 408576698