Title: [252203] trunk/LayoutTests
Revision
252203
Author
[email protected]
Date
2019-11-07 13:07:42 -0800 (Thu, 07 Nov 2019)

Log Message

REGRESSION (r252161): 3 transitions/ tests time-out
https://bugs.webkit.org/show_bug.cgi?id=203966

Reviewed by Dean Jackson.

Fix the shadow parsing code to deal with non-integral values.

* legacy-animation-engine/transitions/resources/transition-test-helpers.js:
(isShadow):
* transitions/resources/transition-test-helpers.js:
(isShadow):

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (252202 => 252203)


--- trunk/LayoutTests/ChangeLog	2019-11-07 20:36:51 UTC (rev 252202)
+++ trunk/LayoutTests/ChangeLog	2019-11-07 21:07:42 UTC (rev 252203)
@@ -107,6 +107,20 @@
 
         * platform/ios/TestExpectations:
 
+2019-11-07  Simon Fraser  <[email protected]>
+
+        REGRESSION (r252161): 3 transitions/ tests time-out
+        https://bugs.webkit.org/show_bug.cgi?id=203966
+
+        Reviewed by Dean Jackson.
+
+        Fix the shadow parsing code to deal with non-integral values.
+
+        * legacy-animation-engine/transitions/resources/transition-test-helpers.js:
+        (isShadow):
+        * transitions/resources/transition-test-helpers.js:
+        (isShadow):
+
 2019-11-06  Nikita Vasilyev  <[email protected]>
 
         Web Inspector: Display color picker for p3 colors

Modified: trunk/LayoutTests/legacy-animation-engine/transitions/resources/transition-test-helpers.js (252202 => 252203)


--- trunk/LayoutTests/legacy-animation-engine/transitions/resources/transition-test-helpers.js	2019-11-07 20:36:51 UTC (rev 252202)
+++ trunk/LayoutTests/legacy-animation-engine/transitions/resources/transition-test-helpers.js	2019-11-07 21:07:42 UTC (rev 252203)
@@ -40,7 +40,7 @@
 
 function isShadow(property)
 {
-  return (property == '-webkit-box-shadow' || property == 'text-shadow');
+    return (property == '-webkit-box-shadow' || property == 'box-shadow' || property == 'text-shadow');
 }
 
 function getShadowXY(cssValue)
@@ -47,9 +47,10 @@
 {
     var text = cssValue.cssText;
     // Shadow cssText looks like "rgb(0, 0, 255) 0px -3px 10px 0px"
-    var shadowPositionRegExp = /\)\s*(-?\d+)px\s*(-?\d+)px/;
+    var shadowPositionRegExp = /\)\s*(-?\d+\.?\d*)px\s*(-?\d+\.?\d*)px/;
     var result = shadowPositionRegExp.exec(text);
-    return [parseInt(result[1]), parseInt(result[2])];
+    console.log(text, result);
+    return [parseFloat(result[1]), parseFloat(result[2])];
 }
 
 function compareRGB(rgb, expected, tolerance)

Modified: trunk/LayoutTests/legacy-animation-engine/transitions/transition-to-from-auto-expected.txt (252202 => 252203)


--- trunk/LayoutTests/legacy-animation-engine/transitions/transition-to-from-auto-expected.txt	2019-11-07 20:36:51 UTC (rev 252202)
+++ trunk/LayoutTests/legacy-animation-engine/transitions/transition-to-from-auto-expected.txt	2019-11-07 21:07:42 UTC (rev 252203)
@@ -1,5 +1,5 @@
-CONSOLE MESSAGE: line 371: Failed to pause 'left' transition on element 'test1'
-CONSOLE MESSAGE: line 371: Failed to pause 'left' transition on element 'test2'
+CONSOLE MESSAGE: line 372: Failed to pause 'left' transition on element 'test1'
+CONSOLE MESSAGE: line 372: Failed to pause 'left' transition on element 'test2'
 PASS - "left" property for "test1" element at 1s saw something close to: 0
 PASS - "left" property for "test2" element at 1s saw something close to: 100
 PASS - "left" property for "test3" element at 1s saw something close to: 50

Modified: trunk/LayoutTests/transitions/resources/transition-test-helpers.js (252202 => 252203)


--- trunk/LayoutTests/transitions/resources/transition-test-helpers.js	2019-11-07 20:36:51 UTC (rev 252202)
+++ trunk/LayoutTests/transitions/resources/transition-test-helpers.js	2019-11-07 21:07:42 UTC (rev 252203)
@@ -40,7 +40,7 @@
 
 function isShadow(property)
 {
-  return (property == '-webkit-box-shadow' || property == 'text-shadow');
+  return (property == '-webkit-box-shadow' || property == 'box-shadow' || property == 'text-shadow');
 }
 
 function getShadowXY(cssValue)
@@ -47,9 +47,10 @@
 {
     var text = cssValue.cssText;
     // Shadow cssText looks like "rgb(0, 0, 255) 0px -3px 10px 0px"
-    var shadowPositionRegExp = /\)\s*(-?\d+)px\s*(-?\d+)px/;
+    var shadowPositionRegExp = /\)\s*(-?\d+\.?\d*)px\s*(-?\d+\.?\d*)px/;
     var result = shadowPositionRegExp.exec(text);
-    return [parseInt(result[1]), parseInt(result[2])];
+    console.log(text, result);
+    return [parseFloat(result[1]), parseFloat(result[2])];
 }
 
 function compareRGB(rgb, expected, tolerance)
@@ -304,6 +305,7 @@
                     // arbitrarily pick shadow-x and shadow-y
                     if (isShadow) {
                       var shadowXY = getShadowXY(styleValue);
+                      console.log('shadowXY', shadowXY);
                       values.push(shadowXY[0]);
                       values.push(shadowXY[1]);
                     } else
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to