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..8a985bb2254b95f34d0862beef5470d77306e080 100644 |
--- a/third_party/WebKit/Source/core/css/resolver/TransformBuilder.cpp |
+++ b/third_party/WebKit/Source/core/css/resolver/TransformBuilder.cpp |
@@ -102,6 +102,23 @@ static TransformOperation::OperationType getTransformOperationType( |
} |
} |
+bool TransformBuilder::hasRelativeLengths(const CSSValueList& inValueList) { |
+ for (auto& value : inValueList) { |
+ const CSSFunctionValue* transformValue = toCSSFunctionValue(value.get()); |
+ |
+ for (size_t i = 0; i < transformValue->length(); i++) { |
Timothy Loh
2016/10/19 02:59:08
This can probably be a for ( : ) loop too.
Hwanseung Lee
2016/10/22 14:44:56
Done.
|
+ const CSSPrimitiveValue& primitiveValue = |
+ toCSSPrimitiveValue(transformValue->item(i)); |
+ |
+ if (CSSPrimitiveValue::isRelativeUnit( |
Timothy Loh
2016/10/19 02:59:08
I think this isn't sufficient and won't handle cas
Hwanseung Lee
2016/10/22 14:44:56
i add some code to prevent calc() function. i will
|
+ primitiveValue.typeWithCalcResolved())) { |
+ return true; |
+ } |
+ } |
+ } |
+ return false; |
+} |
+ |
void TransformBuilder::createTransformOperations( |
const CSSValue& inValue, |
const CSSToLengthConversionData& conversionData, |