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

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

Issue 2532223003: Forces stacking context for computed value of transform-style:preserve-3d (Closed)
Patch Set: Switch to unit test & rephrase comment Created 4 years, 1 month 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 | « no previous file | third_party/WebKit/Source/core/style/ComputedStyleTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/style/ComputedStyle.cpp
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.cpp b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
index a88aa09eb673ebed99c822e09b94e6bea910bead..dcb825b3548ea96a104283ef331a8875307f1e51 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
@@ -1207,6 +1207,17 @@ void ComputedStyle::updateIsStackingContext(bool isDocumentElement,
if (isStackingContext())
return;
+ // Force a stacking context for transform-style: preserve-3d. This happens
+ // even if preserves-3d is ignored due to a 'grouping property' being present
+ // which requires flattening. See ComputedStyle::usedTransformStyle3D() and
+ // ComputedStyle::hasGroupingProperty().
+ // This is legacy behavior that is left ambiguous in the official specs.
+ // See crbug.com/663650 for more details."
+ if (transformStyle3D() == TransformStyle3DPreserve3D) {
+ setIsStackingContext(true);
+ return;
+ }
+
if (isDocumentElement || isInTopLayer || styleType() == PseudoIdBackdrop ||
hasOpacity() || hasTransformRelatedProperty() || hasMask() ||
clipPath() || boxReflect() || hasFilterInducingProperty() ||
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/style/ComputedStyleTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698