Chromium Code Reviews| Index: third_party/WebKit/Source/core/css/resolver/TransformBuilder.cpp |
| diff --git a/third_party/WebKit/Source/core/css/resolver/TransformBuilder.cpp b/third_party/WebKit/Source/core/css/resolver/TransformBuilder.cpp |
| index dcbe627cf82f7e51a6a49fbc5e601c35b4fb6574..e816dc6af4ad1cf29af83e946fb34e54d623df62 100644 |
| --- a/third_party/WebKit/Source/core/css/resolver/TransformBuilder.cpp |
| +++ b/third_party/WebKit/Source/core/css/resolver/TransformBuilder.cpp |
| @@ -102,6 +102,28 @@ static TransformOperation::OperationType getTransformOperationType( |
| } |
| } |
| +bool TransformBuilder::checkHavingRelativeLengthUnit(const CSSValue& inValue) { |
|
meade_UTC10
2016/10/17 03:22:28
Perhaps this should take a CSSValueList? Then you
meade_UTC10
2016/10/17 03:22:28
In other places we've used "hasRelativeLengths". P
Hwanseung Lee
2016/10/18 16:37:52
Done.
Hwanseung Lee
2016/10/18 16:37:52
Done.
|
| + if (!inValue.isValueList()) { |
| + DCHECK_EQ(toCSSIdentifierValue(inValue).getValueID(), CSSValueNone); |
|
meade_UTC10
2016/10/17 03:22:28
I don't understand what this DCHECK is for... Do y
Hwanseung Lee
2016/10/18 16:37:52
i did remove this it when change to CSSVauleList.
Hwanseung Lee
2016/10/18 16:37:52
i did remove this code because parameter was chang
|
| + return false; |
| + } |
| + |
| + for (auto& value : toCSSValueList(inValue)) { |
| + const CSSFunctionValue* transformValue = toCSSFunctionValue(value.get()); |
| + |
| + for (size_t i = 0; i < transformValue->length(); i++) { |
| + const CSSPrimitiveValue& primitiveValue = |
| + toCSSPrimitiveValue(transformValue->item(i)); |
| + |
| + if (CSSPrimitiveValue::isRelativeUnit( |
| + primitiveValue.typeWithCalcResolved())) { |
| + return true; |
| + } |
| + } |
| + } |
| + return false; |
| +} |
| + |
| void TransformBuilder::createTransformOperations( |
| const CSSValue& inValue, |
| const CSSToLengthConversionData& conversionData, |