WebKit Bugzilla
Attachment 370224 Details for
Bug 198028
: [Pointer Events] The pointerup, pointerout and pointerleave events may be fired twice
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198028-20190519194439.patch (text/plain), 4.03 KB, created by
Antoine Quint
on 2019-05-19 11:44:41 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Antoine Quint
Created:
2019-05-19 11:44:41 PDT
Size:
4.03 KB
patch
obsolete
>Subversion Revision: 245483 >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index c1d7ed1c165fcdca04c3114b6f0b7166b4eb3e4f..2973692129b68d74acdb030bb745d868892b4f4a 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,22 @@ >+2019-05-19 Antoine Quint <graouts@apple.com> >+ >+ [Pointer Events] The pointerup, pointerout and pointerleave events may be fired twice >+ https://bugs.webkit.org/show_bug.cgi?id=198028 >+ <rdar://problem/50769425> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add a new test that checks that we're firing a "pointermove" event when the touch pressure >+ changes, even when the touch is stationary, and that a single "pointerup" event is fired >+ as the touch ends and the pressure changes. The relevant code change is done in WebKitAdditions. >+ >+ * pointerevents/ios/pressure-change-expected.txt: Added. >+ * pointerevents/ios/pressure-change.html: Added. >+ * pointerevents/utils.js: >+ (prototype._handlePointerEvent): >+ (prototype.stationary): >+ (prototype._action): >+ > 2019-05-17 Antoine Quint <graouts@apple.com> > > Add a website policy to disable the legacy -webkit-overflow-scrolling:touch behavior >diff --git a/LayoutTests/pointerevents/ios/pressure-change-expected.txt b/LayoutTests/pointerevents/ios/pressure-change-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..c0c3c987771a5ae2ee3fb5be1328c153861e9df9 >--- /dev/null >+++ b/LayoutTests/pointerevents/ios/pressure-change-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS Pointer events are fired as pressure changes. >+ >diff --git a/LayoutTests/pointerevents/ios/pressure-change.html b/LayoutTests/pointerevents/ios/pressure-change.html >new file mode 100644 >index 0000000000000000000000000000000000000000..c36ce1441ff22c887a954bb6e77ff83d455bda00 >--- /dev/null >+++ b/LayoutTests/pointerevents/ios/pressure-change.html >@@ -0,0 +1,36 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<meta charset=utf-8> >+<meta name="viewport" content="width=device-width, initial-scale=1"> >+</head> >+<body> >+<script src="../../resources/testharness.js"></script> >+<script src="../../resources/testharnessreport.js"></script> >+<script src="../utils.js"></script> >+<script> >+ >+'use strict'; >+ >+target_test((target, test) => { >+ target.style.touchAction = "none"; >+ const eventTracker = new EventTracker(target, ["pointerdown", "pointermove", "pointerup"]); >+ >+ const one = ui.finger(); >+ ui.sequence([ >+ one.begin({ x: 10, y: 10 }), >+ one.stationary({ pressure: 500 }), >+ one.end(), >+ ]).then(() => { >+ eventTracker.assertMatchesEvents([ >+ { id: 1, type: "pointerdown", x: 10, y: 10, pressure: 0 }, >+ { id: 1, type: "pointermove", x: 10, y: 10, pressure: 1 }, >+ { id: 1, type: "pointerup", x: 10, y: 10, pressure: 0 } >+ ]); >+ test.done(); >+ }); >+}, "Pointer events are fired as pressure changes."); >+ >+</script> >+</body> >+</html> >\ No newline at end of file >diff --git a/LayoutTests/pointerevents/utils.js b/LayoutTests/pointerevents/utils.js >index b144edcc829a43764e910d577d62270137eede81..31c271e939690cd852a55a1d4d41dbe79912df9a 100644 >--- a/LayoutTests/pointerevents/utils.js >+++ b/LayoutTests/pointerevents/utils.js >@@ -67,6 +67,7 @@ class EventTracker > type: event.type, > x: event.clientX, > y: event.clientY, >+ pressure: event.pressure, > isPrimary: event.isPrimary, > isTrusted: event.isTrusted > }); >@@ -237,14 +238,14 @@ class Finger > > stationary(options) > { >- return this._action("stationary", options.x || 0, options.y || 0); >+ return this._action("stationary", options.x || this._lastX, options.y || this._lastY, options.pressure || 0); > } > >- _action(phase, x, y) >+ _action(phase, x, y, pressure = 0) > { > this._lastX = x; > this._lastY = y; >- return { inputType: "finger", id: this.id, phase, x, y }; >+ return { inputType: "finger", id: this.id, phase, x, y, pressure }; > } > > }
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 198028
: 370224