Title: [258411] trunk/LayoutTests/imported/w3c
Revision
258411
Author
[email protected]
Date
2020-03-13 10:56:28 -0700 (Fri, 13 Mar 2020)

Log Message

[iOS] 9 imported/w3c/web-platform-tests/pointerevents/pointerevent tests are failing since import in r253630
https://bugs.webkit.org/show_bug.cgi?id=209064
<rdar://problem/60330378>

Reviewed by Simon Fraser.

In r253630 we imported a host of new and updated WPT tests and these included changes to testdriver.js that our testdriver-vendor.js
implementation didn't know to handle. Specifically, pauses are now added after each pointer action to add a 16ms delay.

It was a mistake to use a stationary touch for pauses, instead we shuld just increase the time offset with the value set in the pause
and avoid changing any other state, so no resetting the last known x and y values, or adding a new touch into the event stream that
will be passed to UIScriptController.

And since there is now a built-in pause between pointer actions, there is also no need to set a harcoded value for a default
timeoffset, this is now provided directly by the action input.

* web-platform-tests/resources/testdriver-vendor.js:

Modified Paths

Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (258410 => 258411)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2020-03-13 17:51:50 UTC (rev 258410)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2020-03-13 17:56:28 UTC (rev 258411)
@@ -1,3 +1,23 @@
+2020-03-13  Antoine Quint  <[email protected]>
+
+        [iOS] 9 imported/w3c/web-platform-tests/pointerevents/pointerevent tests are failing since import in r253630
+        https://bugs.webkit.org/show_bug.cgi?id=209064
+        <rdar://problem/60330378>
+
+        Reviewed by Simon Fraser.
+
+        In r253630 we imported a host of new and updated WPT tests and these included changes to testdriver.js that our testdriver-vendor.js
+        implementation didn't know to handle. Specifically, pauses are now added after each pointer action to add a 16ms delay.
+
+        It was a mistake to use a stationary touch for pauses, instead we shuld just increase the time offset with the value set in the pause
+        and avoid changing any other state, so no resetting the last known x and y values, or adding a new touch into the event stream that
+        will be passed to UIScriptController.
+
+        And since there is now a built-in pause between pointer actions, there is also no need to set a harcoded value for a default
+        timeoffset, this is now provided directly by the action input.
+
+        * web-platform-tests/resources/testdriver-vendor.js:
+
 2020-03-12  Chris Dumez  <[email protected]>
 
         [ Mac ] fast/history/page-cache-webdatabase-pending-transaction.html is timing out

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/resources/testdriver-vendor.js (258410 => 258411)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/resources/testdriver-vendor.js	2020-03-13 17:51:50 UTC (rev 258410)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/resources/testdriver-vendor.js	2020-03-13 17:56:28 UTC (rev 258411)
@@ -77,7 +77,7 @@
             timeOffset
         };
 
-        let timeOffsetIncrease = 0.05;
+        let timeOffsetIncrease = 0;
 
         switch (action.type) {
         case "pointerMove":
@@ -108,16 +108,15 @@
             break;
         case "pause":
             timeOffsetIncrease = action.duration / 1000;
-            touch.phase = "stationary";
-            if (!pointerDown)
-                id++;
             break;
         default:
             return Promise.reject(new Error(`Unknown action type "${action.type}".`));
         }
 
-        x = touch.x;
-        y = touch.y;
+        if (action.type !== "pause") {
+            x = touch.x;
+            y = touch.y;
+        }
 
         if (!pointerDown && touch.phase == "moved")
             continue;
@@ -124,7 +123,8 @@
 
         timeOffset += timeOffsetIncrease;
 
-        events.push(command);
+        if (action.type !== "pause")
+            events.push(command);
     }
 
     const stream = JSON.stringify({ events });
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to