| Index: third_party/WebKit/Source/core/css/cssom/CSSTranslation.cpp
|
| diff --git a/third_party/WebKit/Source/core/css/cssom/CSSTranslation.cpp b/third_party/WebKit/Source/core/css/cssom/CSSTranslation.cpp
|
| index 1d64903e34a52be52fbbb1daedf40a1ada27fbea..1f40792af34d24fa7cb60865d67c2fb58222ecda 100644
|
| --- a/third_party/WebKit/Source/core/css/cssom/CSSTranslation.cpp
|
| +++ b/third_party/WebKit/Source/core/css/cssom/CSSTranslation.cpp
|
| @@ -14,7 +14,19 @@ CSSTranslation* CSSTranslation::Create(CSSNumericValue* x,
|
| CSSNumericValue* y,
|
| CSSNumericValue* z,
|
| ExceptionState& exception_state) {
|
| - if (z->ContainsPercent()) {
|
| + if ((x->GetType() != CSSStyleValue::StyleValueType::kLengthType &&
|
| + x->GetType() != CSSStyleValue::StyleValueType::kPercentType) ||
|
| + (y->GetType() != CSSStyleValue::StyleValueType::kLengthType &&
|
| + y->GetType() != CSSStyleValue::StyleValueType::kPercentType)) {
|
| + exception_state.ThrowTypeError(
|
| + "Must pass length or percentage to X and Y of CSSTranslation");
|
| + return nullptr;
|
| + }
|
| + if (z && z->GetType() != CSSStyleValue::StyleValueType::kLengthType) {
|
| + exception_state.ThrowTypeError("Must pass length to Z of CSSTranslation");
|
| + return nullptr;
|
| + }
|
| + if (z && z->ContainsPercent()) {
|
| exception_state.ThrowTypeError(
|
| "CSSTranslation does not support z CSSNumericValue with percent units");
|
| return nullptr;
|
|
|