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

Unified Diff: Source/core/css/parser/CSSPropertyParser.cpp

Issue 1193753002: Serialize zIndex as an integer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix regression and add test Created 5 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: Source/core/css/parser/CSSPropertyParser.cpp
diff --git a/Source/core/css/parser/CSSPropertyParser.cpp b/Source/core/css/parser/CSSPropertyParser.cpp
index e1f79d30d75d0cf1591f02e91a98c9279f57ece4..097a7c9a2507e84fdd7d463ea2528d3003d1cfe4 100644
--- a/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/Source/core/css/parser/CSSPropertyParser.cpp
@@ -860,10 +860,12 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import
break;
case CSSPropertyZIndex: // auto | <integer> | inherit
- if (id == CSSValueAuto)
+ if (id == CSSValueAuto) {
validPrimitive = true;
- else
- validPrimitive = validUnit(value, FInteger);
+ } else if (validUnit(value, FInteger)) {
+ addProperty(propId, cssValuePool().createValue(value->fValue, CSSPrimitiveValue::CSS_INTEGER), important);
+ return true;
+ }
break;
case CSSPropertyLineHeight:
« Source/core/css/CSSCalculationValue.cpp ('K') | « Source/core/css/ComputedStyleCSSValueMapping.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698