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

Unified Diff: third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp

Issue 2439663002: Return "auto" for computed z-index on non-stacking-context element (Closed)
Patch Set: Created 4 years, 2 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 | « third_party/WebKit/LayoutTests/fast/css/getComputedStyle/getComputedStyle-zIndex-non-auto-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
diff --git a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
index b80fcb869d8d85f524fc2adb4951684aea6834b0..2d99858cd70a50d93294295a234d955d2b1dbba6 100644
--- a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
+++ b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
@@ -2833,7 +2833,7 @@ const CSSValue* ComputedStyleCSSValueMapping::get(
case CSSPropertyFontVariantNumeric:
return valueForFontVariantNumeric(style);
case CSSPropertyZIndex:
- if (style.hasAutoZIndex())
+ if (style.hasAutoZIndex() || !style.isStackingContext())
return CSSIdentifierValue::create(CSSValueAuto);
return CSSPrimitiveValue::create(style.zIndex(),
CSSPrimitiveValue::UnitType::Integer);
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/css/getComputedStyle/getComputedStyle-zIndex-non-auto-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698