Diff
Modified: trunk/LayoutTests/ChangeLog (196739 => 196740)
--- trunk/LayoutTests/ChangeLog 2016-02-18 03:57:23 UTC (rev 196739)
+++ trunk/LayoutTests/ChangeLog 2016-02-18 05:16:54 UTC (rev 196740)
@@ -1,3 +1,18 @@
+2016-02-17 Commit Queue <[email protected]>
+
+ Unreviewed, rolling out r196738.
+ https://bugs.webkit.org/show_bug.cgi?id=154380
+
+ broke css3/calc/transforms-translate.html (Requested by
+ alexchristensen on #webkit).
+
+ Reverted changeset:
+
+ "WebKitCSSMatrix transformList with calculated relative length
+ crashes Safari."
+ https://bugs.webkit.org/show_bug.cgi?id=153333
+ http://trac.webkit.org/changeset/196738
+
2016-02-17 Dean Jackson <[email protected]>
WebKitCSSMatrix transformList with calculated relative length crashes Safari.
Modified: trunk/LayoutTests/transforms/cssmatrix-2d-interface-expected.txt (196739 => 196740)
--- trunk/LayoutTests/transforms/cssmatrix-2d-interface-expected.txt 2016-02-18 03:57:23 UTC (rev 196739)
+++ trunk/LayoutTests/transforms/cssmatrix-2d-interface-expected.txt 2016-02-18 05:16:54 UTC (rev 196740)
@@ -22,17 +22,8 @@
PASS parseFloat(a3[0]) is 0
PASS a3[1] is ""
-Test bad input to constructor
+Test bad input to string constructor
PASS new WebKitCSSMatrix("banana") threw exception Error: SyntaxError: DOM Exception 12.
-PASS new WebKitCSSMatrix("translate(1em)") threw exception Error: SyntaxError: DOM Exception 12.
-PASS new WebKitCSSMatrix("translate(10px, 1em)") threw exception Error: SyntaxError: DOM Exception 12.
-PASS new WebKitCSSMatrix("translate(10px, calc(10px))") threw exception Error: SyntaxError: DOM Exception 12.
-PASS new WebKitCSSMatrix("translate(1ex)") threw exception Error: SyntaxError: DOM Exception 12.
-PASS new WebKitCSSMatrix("translate(1%)") threw exception Error: SyntaxError: DOM Exception 12.
-PASS new WebKitCSSMatrix("translatex(1em)") threw exception Error: SyntaxError: DOM Exception 12.
-PASS new WebKitCSSMatrix("translatex(calc(10px))") threw exception Error: SyntaxError: DOM Exception 12.
-PASS new WebKitCSSMatrix("translatey(1em)") threw exception Error: SyntaxError: DOM Exception 12.
-PASS new WebKitCSSMatrix("translatey(calc(10px))") threw exception Error: SyntaxError: DOM Exception 12.
Test attributes on default matrix
PASS m.a is 1
Modified: trunk/LayoutTests/transforms/cssmatrix-2d-interface.xhtml (196739 => 196740)
--- trunk/LayoutTests/transforms/cssmatrix-2d-interface.xhtml 2016-02-18 03:57:23 UTC (rev 196739)
+++ trunk/LayoutTests/transforms/cssmatrix-2d-interface.xhtml 2016-02-18 05:16:54 UTC (rev 196740)
@@ -40,17 +40,8 @@
shouldBe('a3[1]', '""');
debug("");
-debug("Test bad input to constructor");
+debug("Test bad input to string constructor");
shouldThrow('new WebKitCSSMatrix("banana")');
-shouldThrow('new WebKitCSSMatrix("translate(1em)")');
-shouldThrow('new WebKitCSSMatrix("translate(10px, 1em)")');
-shouldThrow('new WebKitCSSMatrix("translate(10px, calc(10px))")');
-shouldThrow('new WebKitCSSMatrix("translate(1ex)")');
-shouldThrow('new WebKitCSSMatrix("translate(1%)")');
-shouldThrow('new WebKitCSSMatrix("translatex(1em)")');
-shouldThrow('new WebKitCSSMatrix("translatex(calc(10px))")');
-shouldThrow('new WebKitCSSMatrix("translatey(1em)")');
-shouldThrow('new WebKitCSSMatrix("translatey(calc(10px))")');
debug("");
debug("Test attributes on default matrix");
Modified: trunk/LayoutTests/transforms/cssmatrix-3d-interface-expected.txt (196739 => 196740)
--- trunk/LayoutTests/transforms/cssmatrix-3d-interface-expected.txt 2016-02-18 03:57:23 UTC (rev 196739)
+++ trunk/LayoutTests/transforms/cssmatrix-3d-interface-expected.txt 2016-02-18 05:16:54 UTC (rev 196740)
@@ -28,21 +28,8 @@
PASS parseFloat(a3[0]) is 1
PASS a3[1] is ""
-Test bad input to constructor
+Test bad input to string constructor
PASS new WebKitCSSMatrix("banana") threw exception Error: SyntaxError: DOM Exception 12.
-PASS new WebKitCSSMatrix("translate3d(1em, 0, 0)") threw exception Error: SyntaxError: DOM Exception 12.
-PASS new WebKitCSSMatrix("translate3d(10px, 1em, 0)") threw exception Error: SyntaxError: DOM Exception 12.
-PASS new WebKitCSSMatrix("translate3d(10px, 10px, calc(10px))") threw exception Error: SyntaxError: DOM Exception 12.
-PASS new WebKitCSSMatrix("translate3d(calc(10px), 10px, 10px)") threw exception Error: SyntaxError: DOM Exception 12.
-PASS new WebKitCSSMatrix("translate3d(10px, calc(10px), 10px)") threw exception Error: SyntaxError: DOM Exception 12.
-PASS new WebKitCSSMatrix("translate3d(1ex, 0, 0)") threw exception Error: SyntaxError: DOM Exception 12.
-PASS new WebKitCSSMatrix("translatez(1em)") threw exception Error: SyntaxError: DOM Exception 12.
-PASS new WebKitCSSMatrix("translatez(calc(10px))") threw exception Error: SyntaxError: DOM Exception 12.
-PASS new WebKitCSSMatrix("translate(1%, 0, 0)") threw exception Error: SyntaxError: DOM Exception 12.
-PASS new WebKitCSSMatrix("perspective(1em)") threw exception Error: SyntaxError: DOM Exception 12.
-PASS new WebKitCSSMatrix("perspective(calc(10px))") threw exception Error: SyntaxError: DOM Exception 12.
-PASS new WebKitCSSMatrix("perspective(1ex)") threw exception Error: SyntaxError: DOM Exception 12.
-PASS new WebKitCSSMatrix("perspective(1%)") threw exception Error: SyntaxError: DOM Exception 12.
Test attributes on default matrix
PASS m.m11 is 1
Modified: trunk/LayoutTests/transforms/cssmatrix-3d-interface.xhtml (196739 => 196740)
--- trunk/LayoutTests/transforms/cssmatrix-3d-interface.xhtml 2016-02-18 03:57:23 UTC (rev 196739)
+++ trunk/LayoutTests/transforms/cssmatrix-3d-interface.xhtml 2016-02-18 05:16:54 UTC (rev 196740)
@@ -59,21 +59,8 @@
shouldBe('a3[1]', '""');
debug("");
-debug("Test bad input to constructor");
+debug("Test bad input to string constructor");
shouldThrow('new WebKitCSSMatrix("banana")');
-shouldThrow('new WebKitCSSMatrix("translate3d(1em, 0, 0)")');
-shouldThrow('new WebKitCSSMatrix("translate3d(10px, 1em, 0)")');
-shouldThrow('new WebKitCSSMatrix("translate3d(10px, 10px, calc(10px))")');
-shouldThrow('new WebKitCSSMatrix("translate3d(calc(10px), 10px, 10px)")');
-shouldThrow('new WebKitCSSMatrix("translate3d(10px, calc(10px), 10px)")');
-shouldThrow('new WebKitCSSMatrix("translate3d(1ex, 0, 0)")');
-shouldThrow('new WebKitCSSMatrix("translatez(1em)")');
-shouldThrow('new WebKitCSSMatrix("translatez(calc(10px))")');
-shouldThrow('new WebKitCSSMatrix("translate(1%, 0, 0)")');
-shouldThrow('new WebKitCSSMatrix("perspective(1em)")');
-shouldThrow('new WebKitCSSMatrix("perspective(calc(10px))")');
-shouldThrow('new WebKitCSSMatrix("perspective(1ex)")');
-shouldThrow('new WebKitCSSMatrix("perspective(1%)")');
debug("");
debug("Test attributes on default matrix");
Modified: trunk/Source/WebCore/ChangeLog (196739 => 196740)
--- trunk/Source/WebCore/ChangeLog 2016-02-18 03:57:23 UTC (rev 196739)
+++ trunk/Source/WebCore/ChangeLog 2016-02-18 05:16:54 UTC (rev 196740)
@@ -1,3 +1,18 @@
+2016-02-17 Commit Queue <[email protected]>
+
+ Unreviewed, rolling out r196738.
+ https://bugs.webkit.org/show_bug.cgi?id=154380
+
+ broke css3/calc/transforms-translate.html (Requested by
+ alexchristensen on #webkit).
+
+ Reverted changeset:
+
+ "WebKitCSSMatrix transformList with calculated relative length
+ crashes Safari."
+ https://bugs.webkit.org/show_bug.cgi?id=153333
+ http://trac.webkit.org/changeset/196738
+
2016-02-17 Dean Jackson <[email protected]>
WebKitCSSMatrix transformList with calculated relative length crashes Safari.
Modified: trunk/Source/WebCore/css/StyleBuilderConverter.h (196739 => 196740)
--- trunk/Source/WebCore/css/StyleBuilderConverter.h 2016-02-18 03:57:23 UTC (rev 196739)
+++ trunk/Source/WebCore/css/StyleBuilderConverter.h 2016-02-18 05:16:54 UTC (rev 196740)
@@ -355,7 +355,7 @@
inline TransformOperations StyleBuilderConverter::convertTransform(StyleResolver& styleResolver, CSSValue& value)
{
TransformOperations operations;
- transformsForValue(value, styleResolver.state().cssToLengthConversionData(), TransformConversion::Auto, operations);
+ transformsForValue(value, styleResolver.state().cssToLengthConversionData(), operations);
return operations;
}
Modified: trunk/Source/WebCore/css/TransformFunctions.cpp (196739 => 196740)
--- trunk/Source/WebCore/css/TransformFunctions.cpp 2016-02-18 03:57:23 UTC (rev 196739)
+++ trunk/Source/WebCore/css/TransformFunctions.cpp 2016-02-18 05:16:54 UTC (rev 196740)
@@ -76,14 +76,12 @@
return TransformOperation::NONE;
}
-Length convertToFloatLength(const CSSPrimitiveValue* primitiveValue, const CSSToLengthConversionData& conversionData, TransformConversion transformConversion)
+Length convertToFloatLength(const CSSPrimitiveValue* primitiveValue, const CSSToLengthConversionData& conversionData)
{
- if (transformConversion == TransformConversion::RequiresAbsoluteLength && !primitiveValue->isFontIndependentLength())
- return Length(Undefined);
- return primitiveValue ? primitiveValue->convertToLength<FixedFloatConversion | PercentConversion>(conversionData) : Length(Undefined);
+ return primitiveValue ? primitiveValue->convertToLength<FixedFloatConversion | PercentConversion | CalculatedConversion>(conversionData) : Length(Undefined);
}
-bool transformsForValue(CSSValue& value, const CSSToLengthConversionData& conversionData, TransformConversion transformConversion, TransformOperations& outOperations)
+bool transformsForValue(CSSValue& value, const CSSToLengthConversionData& conversionData, TransformOperations& outOperations)
{
if (!is<CSSValueList>(value)) {
outOperations.clear();
@@ -164,13 +162,13 @@
Length tx = Length(0, Fixed);
Length ty = Length(0, Fixed);
if (transformValue.operationType() == WebKitCSSTransformValue::TranslateYTransformOperation)
- ty = convertToFloatLength(&firstValue, conversionData, transformConversion);
+ ty = convertToFloatLength(&firstValue, conversionData);
else {
- tx = convertToFloatLength(&firstValue, conversionData, transformConversion);
+ tx = convertToFloatLength(&firstValue, conversionData);
if (transformValue.operationType() != WebKitCSSTransformValue::TranslateXTransformOperation) {
if (transformValue.length() > 1) {
CSSPrimitiveValue& secondValue = downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(1));
- ty = convertToFloatLength(&secondValue, conversionData, transformConversion);
+ ty = convertToFloatLength(&secondValue, conversionData);
}
}
}
@@ -187,19 +185,19 @@
Length ty = Length(0, Fixed);
Length tz = Length(0, Fixed);
if (transformValue.operationType() == WebKitCSSTransformValue::TranslateZTransformOperation)
- tz = convertToFloatLength(&firstValue, conversionData, transformConversion);
+ tz = convertToFloatLength(&firstValue, conversionData);
else if (transformValue.operationType() == WebKitCSSTransformValue::TranslateYTransformOperation)
- ty = convertToFloatLength(&firstValue, conversionData, transformConversion);
+ ty = convertToFloatLength(&firstValue, conversionData);
else {
- tx = convertToFloatLength(&firstValue, conversionData, transformConversion);
+ tx = convertToFloatLength(&firstValue, conversionData);
if (transformValue.operationType() != WebKitCSSTransformValue::TranslateXTransformOperation) {
if (transformValue.length() > 2) {
CSSPrimitiveValue& thirdValue = downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(2));
- tz = convertToFloatLength(&thirdValue, conversionData, transformConversion);
+ tz = convertToFloatLength(&thirdValue, conversionData);
}
if (transformValue.length() > 1) {
CSSPrimitiveValue& secondValue = downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(1));
- ty = convertToFloatLength(&secondValue, conversionData, transformConversion);
+ ty = convertToFloatLength(&secondValue, conversionData);
}
}
}
@@ -302,7 +300,7 @@
case WebKitCSSTransformValue::PerspectiveTransformOperation: {
Length p = Length(0, Fixed);
if (firstValue.isLength())
- p = convertToFloatLength(&firstValue, conversionData, transformConversion);
+ p = convertToFloatLength(&firstValue, conversionData);
else {
// This is a quirk that should go away when 3d transforms are finalized.
double val = firstValue.getDoubleValue();
Modified: trunk/Source/WebCore/css/TransformFunctions.h (196739 => 196740)
--- trunk/Source/WebCore/css/TransformFunctions.h 2016-02-18 03:57:23 UTC (rev 196739)
+++ trunk/Source/WebCore/css/TransformFunctions.h 2016-02-18 05:16:54 UTC (rev 196740)
@@ -42,13 +42,8 @@
struct Length;
-enum class TransformConversion {
- Auto,
- RequiresAbsoluteLength
-};
+bool transformsForValue(CSSValue&, const CSSToLengthConversionData&, TransformOperations&);
+Length convertToFloatLength(const CSSPrimitiveValue*, const CSSToLengthConversionData&);
-bool transformsForValue(CSSValue&, const CSSToLengthConversionData&, TransformConversion transformConversion, TransformOperations&);
-Length convertToFloatLength(const CSSPrimitiveValue*, const CSSToLengthConversionData&, TransformConversion transformConversion = TransformConversion::Auto);
-
}
#endif
Modified: trunk/Source/WebCore/css/WebKitCSSMatrix.cpp (196739 => 196740)
--- trunk/Source/WebCore/css/WebKitCSSMatrix.cpp 2016-02-18 03:57:23 UTC (rev 196739)
+++ trunk/Source/WebCore/css/WebKitCSSMatrix.cpp 2016-02-18 05:16:54 UTC (rev 196740)
@@ -67,7 +67,7 @@
return;
TransformOperations operations;
- if (!transformsForValue(*value, CSSToLengthConversionData(), TransformConversion::RequiresAbsoluteLength, operations)) {
+ if (!transformsForValue(*value, CSSToLengthConversionData(), operations)) {
ec = SYNTAX_ERR;
return;
}