Index: Source/core/css/parser/CSSPropertyParser.cpp |
diff --git a/Source/core/css/parser/CSSPropertyParser.cpp b/Source/core/css/parser/CSSPropertyParser.cpp |
index 99ee0e9af5a71072f43eb7b52fbf3c43167dab15..e8ca0856e70a6016bfa999351ddf7557a4857b63 100644 |
--- a/Source/core/css/parser/CSSPropertyParser.cpp |
+++ b/Source/core/css/parser/CSSPropertyParser.cpp |
@@ -1134,19 +1134,21 @@ bool CSSPropertyParser::parseValue(CSSPropertyID propId, bool important) |
} |
return false; |
} |
+ case CSSPropertyPerspective: |
+ if (id == CSSValueNone) { |
+ validPrimitive = true; |
+ } else if (validUnit(value, FLength | FNonNeg)) { |
+ addProperty(propId, createPrimitiveNumericValue(value), important); |
+ return true; |
+ } |
+ break; |
case CSSPropertyWebkitPerspective: |
- if (id == CSSValueNone) |
+ if (id == CSSValueNone) { |
validPrimitive = true; |
- else { |
+ } else if (validUnit(value, FNumber | FLength | FNonNeg)) { |
// Accepting valueless numbers is a quirk of the -webkit prefixed version of the property. |
- if (validUnit(value, FNumber | FLength | FNonNeg)) { |
- RefPtrWillBeRawPtr<CSSValue> val = createPrimitiveNumericValue(value); |
- if (val) { |
- addProperty(propId, val.release(), important); |
- return true; |
- } |
- return false; |
- } |
+ addProperty(propId, createPrimitiveNumericValue(value), important); |
+ return true; |
} |
break; |
case CSSPropertyWebkitPerspectiveOrigin: |
@@ -1615,7 +1617,6 @@ bool CSSPropertyParser::parseValue(CSSPropertyID propId, bool important) |
validPrimitive = false; |
break; |
// FIXME: crbug.com/154772 Unimplemented css-transforms properties |
- case CSSPropertyPerspective: |
case CSSPropertyPerspectiveOrigin: |
case CSSPropertyTransform: |
case CSSPropertyTransformOrigin: |