WebKit Bugzilla
Attachment 370315 Details for
Bug 198071
: [Pointer Events] Do not dispatch pointermove events when the pointer is not down in WPT testdriver
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198071-20190521151405.patch (text/plain), 8.69 KB, created by
Antoine Quint
on 2019-05-21 06:14:07 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Antoine Quint
Created:
2019-05-21 06:14:07 PDT
Size:
8.69 KB
patch
obsolete
>Subversion Revision: 245564 >diff --git a/LayoutTests/imported/w3c/ChangeLog b/LayoutTests/imported/w3c/ChangeLog >index b9152e70ec7431af4639ac248704d180f93bffd1..3d29c4d82604d7ea151799b1f25c8803d5aeaed3 100644 >--- a/LayoutTests/imported/w3c/ChangeLog >+++ b/LayoutTests/imported/w3c/ChangeLog >@@ -1,3 +1,22 @@ >+2019-05-21 Antoine Quint <graouts@apple.com> >+ >+ [Pointer Events] Do not dispatch pointermove events when the pointer is not down in WPT testdriver >+ https://bugs.webkit.org/show_bug.cgi?id=198071 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ WPT actions sequences may move the pointer prior to pressing it down. In this case, we need to make sure we don't >+ end up queuing a "moved" touch and instead save the pointer position for when the pointer is pressed. It's important >+ to also generate a different touch id for each time we pause or end a touch sequence. This allows a few more WPT >+ touch tests to pass without any source change in our Pointer Events implementation. >+ >+ * web-platform-tests/pointerevents/pointerevent_pointerleave_after_pointercancel_touch-expected.txt: >+ * web-platform-tests/pointerevents/pointerevent_pointerout_after_pointercancel_touch-expected.txt: >+ * web-platform-tests/pointerevents/pointerevent_touch-action-auto-css_touch-expected.txt: >+ * web-platform-tests/pointerevents/pointerevent_touch-action-inherit_highest-parent-none_touch-expected.txt: >+ * web-platform-tests/pointerevents/pointerevent_touch-action-pan-x-pan-y_touch-expected.txt: >+ * web-platform-tests/resources/testdriver-vendor.js: >+ > 2019-05-17 Rob Buis <rbuis@igalia.com> > > Implement imagesrcset and imagesizes attributes on link rel=preload >diff --git a/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_pointerleave_after_pointercancel_touch-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_pointerleave_after_pointercancel_touch-expected.txt >index 07389837585029a24ae57ea3e54580da995bb532..3c36272a9c761bdd3e36bc57c557491b10078096 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_pointerleave_after_pointercancel_touch-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_pointerleave_after_pointercancel_touch-expected.txt >@@ -6,7 +6,7 @@ Note: this test is for touch devices only > > Pointer Events pointerleave tests > >-The following pointer types were detected: (none). >+The following pointer types were detected: touch. > > > FAIL pointerleave event received assert_true: pointerleave should be received before the test finishes expected true got false >diff --git a/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_pointerout_after_pointercancel_touch-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_pointerout_after_pointercancel_touch-expected.txt >index ba524c0787690b8a5a912801f73ed37a6d6bfc8b..1b457e0c4bc17ca31f81edd1816302c56a06f334 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_pointerout_after_pointercancel_touch-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_pointerout_after_pointercancel_touch-expected.txt >@@ -6,7 +6,7 @@ Note: this test is for touch devices only > > Pointer Events pointerout tests > >-The following pointer types were detected: (none). >+The following pointer types were detected: touch. > > > FAIL pointerout event received assert_true: pointerout should be received before the test finishes expected true got false >diff --git a/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_touch-action-auto-css_touch-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_touch-action-auto-css_touch-expected.txt >index 01aac38a99ba84b82041daa6b3bd69548eb30488..dcf3277315694c4e7703f9cd1149fa245973ddb4 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_touch-action-auto-css_touch-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_touch-action-auto-css_touch-expected.txt >@@ -1,6 +1,6 @@ > Pointer Events touch-action attribute support > >-Test Description: Try to scroll text RIGHT. >+Test Description: Test complete > > Note: this test is for touch-devices only > >@@ -73,5 +73,5 @@ touch-action: auto > The following pointer types were detected: touch. > > >-FAIL touch-action attribute test assert_true: x-scroll and y-scroll should be received before the test finishes expected true got false >+PASS touch-action attribute test > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_touch-action-inherit_highest-parent-none_touch-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_touch-action-inherit_highest-parent-none_touch-expected.txt >index 2b9bf7d1e03cbcda13de9acec6fc827492b3fa6c..adf7a2aabc53ef33c1f2724d664b6eabd92e6611 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_touch-action-inherit_highest-parent-none_touch-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_touch-action-inherit_highest-parent-none_touch-expected.txt >@@ -1,6 +1,6 @@ > Pointer Events touch-action attribute support > >-Test Description: Try to scroll text RIGHT. >+Test Description: Test complete > > Note: this test is for touch-devices only > >@@ -73,5 +73,5 @@ behaviour: auto > The following pointer types were detected: touch. > > >-FAIL touch-action attribute test assert_true: x-scroll and y-scroll should be received before the test finishes expected true got false >+PASS touch-action attribute test > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_touch-action-pan-x-pan-y_touch-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_touch-action-pan-x-pan-y_touch-expected.txt >index ceef2b0dc9d1fc24d49f2370d4576441252a353d..72c1d48a2b481a6d1470f08bfe44682ed25ce49c 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_touch-action-pan-x-pan-y_touch-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_touch-action-pan-x-pan-y_touch-expected.txt >@@ -1,6 +1,6 @@ > Pointer Events touch-action attribute support > >-Test Description: Try to scroll text RIGHT. >+Test Description: Test complete > > Note: this test is for touch-devices only > >@@ -73,5 +73,5 @@ touch-action: pan-x pan-y > The following pointer types were detected: touch. > > >-FAIL touch-action attribute test assert_true: x-scroll and y-scroll should be received before the test finishes expected true got false >+PASS touch-action attribute test > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resources/testdriver-vendor.js b/LayoutTests/imported/w3c/web-platform-tests/resources/testdriver-vendor.js >index 8c65ebb8ab11079841f80aff310a33dfc5060395..312b48edcc5ce105c2186fcac42479316a5c26b2 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resources/testdriver-vendor.js >+++ b/LayoutTests/imported/w3c/web-platform-tests/resources/testdriver-vendor.js >@@ -54,11 +54,14 @@ function dispatchTouchActions(actions) > let x = 0; > let y = 0; > let timeOffset = 0; >+ let pointerDown = false; >+ let id = 1; > >- const events = actions.map(action => { >+ const events = []; >+ for (let action of actions) { > const touch = { > inputType : "finger", >- id : 1, >+ id, > x : action.x, > y : action.y, > pressure : 0 >@@ -83,16 +86,25 @@ function dispatchTouchActions(actions) > } > break; > case "pointerDown": >+ pointerDown = true; > touch.phase = "began"; >+ if (action.x === undefined) >+ touch.x = x; >+ if (action.y === undefined) >+ touch.y = y; > break; > case "pointerUp": >+ pointerDown = false; > touch.phase = "ended"; > touch.x = x; > touch.y = y; >+ id++; > 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}".`)); >@@ -100,10 +112,14 @@ function dispatchTouchActions(actions) > > x = touch.x; > y = touch.y; >+ >+ if (!pointerDown && touch.phase == "moved") >+ continue; >+ > timeOffset += timeOffsetIncrease; > >- return command; >- }); >+ events.push(command); >+ } > > const stream = JSON.stringify({ events }); > logDebug(() => stream);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
dino
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198071
: 370315