Index: third_party/WebKit/Source/core/css/cssom/CSSPerspective.cpp |
diff --git a/third_party/WebKit/Source/core/css/cssom/CSSPerspective.cpp b/third_party/WebKit/Source/core/css/cssom/CSSPerspective.cpp |
index 7c688000482ee8e66dacc0fb4bf24775d15ac94a..2036c166d0d69d22e6c1515c147e4603c0ca93b4 100644 |
--- a/third_party/WebKit/Source/core/css/cssom/CSSPerspective.cpp |
+++ b/third_party/WebKit/Source/core/css/cssom/CSSPerspective.cpp |
@@ -23,15 +23,18 @@ CSSPerspective* CSSPerspective::FromCSSValue(const CSSFunctionValue& value) { |
DCHECK_EQ(value.length(), 1U); |
CSSNumericValue* length = |
CSSNumericValue::FromCSSValue(ToCSSPrimitiveValue(value.Item(0))); |
+ // TODO(meade): This shouldn't happen once CSSNumericValue is fully |
+ // implemented, so once that happens this check can be removed. |
+ if (!length) |
+ return nullptr; |
DCHECK(!length->ContainsPercent()); |
return new CSSPerspective(length); |
} |
CSSFunctionValue* CSSPerspective::ToCSSValue() const { |
- return nullptr; |
- // CSSFunctionValue* result = CSSFunctionValue::Create(CSSValuePerspective); |
- // result->Append(*length_->ToCSSValue()); |
- // return result; |
+ CSSFunctionValue* result = CSSFunctionValue::Create(CSSValuePerspective); |
+ result->Append(*length_->ToCSSValue()); |
+ return result; |
} |
} // namespace blink |