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

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: 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 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 4a8c20e3dea1bc54408e7779dd067fe549010a9d..4fc4b88d0b30ee3b40066ef8b3237f68d14340cc 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -109,7 +109,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())
@@ -1389,7 +1389,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;
« no previous file with comments | « third_party/WebKit/Source/core/dom/Element.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698