| 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 0cfda4436e14cb27569f8cad4bfa26b9600473f9..d32ad93aeca241ca2fca041782645952701ae1d6 100644
|
| --- a/third_party/WebKit/Source/core/css/cssom/CSSPerspective.cpp
|
| +++ b/third_party/WebKit/Source/core/css/cssom/CSSPerspective.cpp
|
| @@ -11,7 +11,7 @@ namespace blink {
|
| CSSPerspective* CSSPerspective::Create(CSSNumericValue* length,
|
| ExceptionState& exception_state) {
|
| if (length->GetType() != CSSStyleValue::StyleValueType::kLengthType) {
|
| - exception_state.ThrowTypeError("Must pass length to CSSNumericValue");
|
| + exception_state.ThrowTypeError("Must pass length to CSSPerspective");
|
| return nullptr;
|
| }
|
| if (length->ContainsPercent()) {
|
| @@ -22,6 +22,20 @@ CSSPerspective* CSSPerspective::Create(CSSNumericValue* length,
|
| return new CSSPerspective(length);
|
| }
|
|
|
| +void CSSPerspective::setLength(CSSNumericValue* length,
|
| + ExceptionState& exception_state) {
|
| + if (length->GetType() != CSSStyleValue::StyleValueType::kLengthType) {
|
| + exception_state.ThrowTypeError("Must pass length to CSSPerspective");
|
| + return;
|
| + }
|
| + if (length->ContainsPercent()) {
|
| + exception_state.ThrowTypeError(
|
| + "CSSPerspective does not support CSSNumericValues with percent units");
|
| + return;
|
| + }
|
| + length_ = length;
|
| +}
|
| +
|
| CSSPerspective* CSSPerspective::FromCSSValue(const CSSFunctionValue& value) {
|
| DCHECK_EQ(value.FunctionType(), CSSValuePerspective);
|
| DCHECK_EQ(value.length(), 1U);
|
|
|