Log Message
Cherry-pick r245505. rdar://problem/50801608
[Pointer Events] A pointer should be marked as primary for all of its events
https://bugs.webkit.org/show_bug.cgi?id=197909
<rdar://problem/50801608>
Reviewed by Dean Jackson.
Source/WebCore:
Add an ivar for EventHandler which we'll use in WebKitAdditions code to track the touch identifier
of the very first touch to start in a given sequence.
* page/EventHandler.h:
LayoutTests:
Update tests to match expectations that only the first touch of a sequence is the primary pointer,
which applies to all of its events, even after the even is no longer touching the digitizer.
* pointerevents/ios/over-enter-out-leave.html:
* pointerevents/ios/pointer-event-order.html:
* pointerevents/ios/pointer-events-implicit-capture.html:
* pointerevents/ios/pointer-events-is-primary-expected.txt:
* pointerevents/ios/pointer-events-is-primary.html:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245505 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
- branches/safari-608.1.24.20-branch/LayoutTests/ChangeLog
- branches/safari-608.1.24.20-branch/LayoutTests/pointerevents/ios/over-enter-out-leave.html
- branches/safari-608.1.24.20-branch/LayoutTests/pointerevents/ios/pointer-event-order.html
- branches/safari-608.1.24.20-branch/LayoutTests/pointerevents/ios/pointer-events-implicit-capture.html
- branches/safari-608.1.24.20-branch/LayoutTests/pointerevents/ios/pointer-events-is-primary-expected.txt
- branches/safari-608.1.24.20-branch/LayoutTests/pointerevents/ios/pointer-events-is-primary.html
- branches/safari-608.1.24.20-branch/Source/WebCore/ChangeLog
- branches/safari-608.1.24.20-branch/Source/WebCore/page/EventHandler.h
Diff
Modified: branches/safari-608.1.24.20-branch/LayoutTests/ChangeLog (245556 => 245557)
--- branches/safari-608.1.24.20-branch/LayoutTests/ChangeLog 2019-05-21 03:21:30 UTC (rev 245556)
+++ branches/safari-608.1.24.20-branch/LayoutTests/ChangeLog 2019-05-21 03:21:34 UTC (rev 245557)
@@ -1,5 +1,52 @@
2019-05-20 Kocsen Chung <[email protected]>
+ Cherry-pick r245505. rdar://problem/50801608
+
+ [Pointer Events] A pointer should be marked as primary for all of its events
+ https://bugs.webkit.org/show_bug.cgi?id=197909
+ <rdar://problem/50801608>
+
+ Reviewed by Dean Jackson.
+
+ Source/WebCore:
+
+ Add an ivar for EventHandler which we'll use in WebKitAdditions code to track the touch identifier
+ of the very first touch to start in a given sequence.
+
+ * page/EventHandler.h:
+
+ LayoutTests:
+
+ Update tests to match expectations that only the first touch of a sequence is the primary pointer,
+ which applies to all of its events, even after the even is no longer touching the digitizer.
+
+ * pointerevents/ios/over-enter-out-leave.html:
+ * pointerevents/ios/pointer-event-order.html:
+ * pointerevents/ios/pointer-events-implicit-capture.html:
+ * pointerevents/ios/pointer-events-is-primary-expected.txt:
+ * pointerevents/ios/pointer-events-is-primary.html:
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245505 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2019-05-19 Antoine Quint <[email protected]>
+
+ [Pointer Events] A pointer should be marked as primary for all of its events
+ https://bugs.webkit.org/show_bug.cgi?id=197909
+ <rdar://problem/50801608>
+
+ Reviewed by Dean Jackson.
+
+ Update tests to match expectations that only the first touch of a sequence is the primary pointer,
+ which applies to all of its events, even after the even is no longer touching the digitizer.
+
+ * pointerevents/ios/over-enter-out-leave.html:
+ * pointerevents/ios/pointer-event-order.html:
+ * pointerevents/ios/pointer-events-implicit-capture.html:
+ * pointerevents/ios/pointer-events-is-primary-expected.txt:
+ * pointerevents/ios/pointer-events-is-primary.html:
+
+2019-05-20 Kocsen Chung <[email protected]>
+
Cherry-pick r245483. rdar://problem/49078202
Add a website policy to disable the legacy -webkit-overflow-scrolling:touch behavior
Modified: branches/safari-608.1.24.20-branch/LayoutTests/pointerevents/ios/over-enter-out-leave.html (245556 => 245557)
--- branches/safari-608.1.24.20-branch/LayoutTests/pointerevents/ios/over-enter-out-leave.html 2019-05-21 03:21:30 UTC (rev 245556)
+++ branches/safari-608.1.24.20-branch/LayoutTests/pointerevents/ios/over-enter-out-leave.html 2019-05-21 03:21:34 UTC (rev 245557)
@@ -23,9 +23,9 @@
{ type: "pointerover", x: 100, y: 100, isPrimary: true },
{ type: "pointerenter", x: 100, y: 100, isPrimary: true },
{ type: "pointerdown", x: 100, y: 100, isPrimary: true },
- { type: "pointerup", x: 100, y: 100, isPrimary: false },
- { type: "pointerout", x: 100, y: 100, isPrimary: false },
- { type: "pointerleave", x: 100, y: 100, isPrimary: false },
+ { type: "pointerup", x: 100, y: 100, isPrimary: true },
+ { type: "pointerout", x: 100, y: 100, isPrimary: true },
+ { type: "pointerleave", x: 100, y: 100, isPrimary: true },
]);
test.done();
});
Modified: branches/safari-608.1.24.20-branch/LayoutTests/pointerevents/ios/pointer-event-order.html (245556 => 245557)
--- branches/safari-608.1.24.20-branch/LayoutTests/pointerevents/ios/pointer-event-order.html 2019-05-21 03:21:30 UTC (rev 245556)
+++ branches/safari-608.1.24.20-branch/LayoutTests/pointerevents/ios/pointer-event-order.html 2019-05-21 03:21:34 UTC (rev 245557)
@@ -20,9 +20,9 @@
{ type: "pointerover", x: 100, y: 100, isPrimary: true },
{ type: "pointerenter", x: 100, y: 100, isPrimary: true },
{ type: "pointerdown", x: 100, y: 100, isPrimary: true },
- { type: "pointerup", x: 100, y: 100, isPrimary: false },
- { type: "pointerout", x: 100, y: 100, isPrimary: false },
- { type: "pointerleave", x: 100, y: 100, isPrimary: false },
+ { type: "pointerup", x: 100, y: 100, isPrimary: true },
+ { type: "pointerout", x: 100, y: 100, isPrimary: true },
+ { type: "pointerleave", x: 100, y: 100, isPrimary: true },
{ type: "click", x: 100, y: 100 },
]);
test.done();
Modified: branches/safari-608.1.24.20-branch/LayoutTests/pointerevents/ios/pointer-events-implicit-capture.html (245556 => 245557)
--- branches/safari-608.1.24.20-branch/LayoutTests/pointerevents/ios/pointer-events-implicit-capture.html 2019-05-21 03:21:30 UTC (rev 245556)
+++ branches/safari-608.1.24.20-branch/LayoutTests/pointerevents/ios/pointer-events-implicit-capture.html 2019-05-21 03:21:34 UTC (rev 245557)
@@ -34,7 +34,7 @@
{ id: 1, type: "pointermove" },
{ id: 2, type: "pointermove" },
{ id: 1, type: "pointerup" },
- { id: 1, type: "lostpointercapture", isPrimary: false },
+ { id: 1, type: "lostpointercapture", isPrimary: true },
{ id: 2, type: "pointerup" },
{ id: 2, type: "lostpointercapture", isPrimary: false }
]);
Modified: branches/safari-608.1.24.20-branch/LayoutTests/pointerevents/ios/pointer-events-is-primary-expected.txt (245556 => 245557)
--- branches/safari-608.1.24.20-branch/LayoutTests/pointerevents/ios/pointer-events-is-primary-expected.txt 2019-05-21 03:21:30 UTC (rev 245556)
+++ branches/safari-608.1.24.20-branch/LayoutTests/pointerevents/ios/pointer-events-is-primary-expected.txt 2019-05-21 03:21:34 UTC (rev 245557)
@@ -1,3 +1,3 @@
-PASS Oldest active touch has isPrimary = true.
+PASS The first touch of a touch sequence has isPrimary = true.
Modified: branches/safari-608.1.24.20-branch/LayoutTests/pointerevents/ios/pointer-events-is-primary.html (245556 => 245557)
--- branches/safari-608.1.24.20-branch/LayoutTests/pointerevents/ios/pointer-events-is-primary.html 2019-05-21 03:21:30 UTC (rev 245556)
+++ branches/safari-608.1.24.20-branch/LayoutTests/pointerevents/ios/pointer-events-is-primary.html 2019-05-21 03:21:34 UTC (rev 245557)
@@ -14,10 +14,11 @@
target_test((target, test) => {
target.style.touchAction = "none";
- const eventTracker = new EventTracker(target, ["pointerdown", "pointermove"]);
+ const eventTracker = new EventTracker(target, ["pointerover", "pointerenter", "pointerdown", "pointermove", "pointerup", "pointerout", "pointerleave"]);
const _one_ = ui.finger();
const two = ui.finger();
+ const three = ui.finger();
ui.sequence([
one.begin({ x: 10, y: 10 }),
two.begin({ x: 50, y: 50 }),
@@ -25,18 +26,45 @@
one.move({ x: 30, y: 30 }),
one.end(),
two.move({ x: 50, y: 50 }),
- two.end()
+ two.end(),
+ three.begin({ x: 10, y: 10 }),
+ three.end(),
]).then(() => {
eventTracker.assertMatchesEvents([
+ // Yielded by one.begin({ x: 10, y: 10 }).
+ { id: 1, type: "pointerover", x: 10, y: 10, isPrimary: true },
+ { id: 1, type: "pointerenter", x: 10, y: 10, isPrimary: true },
{ id: 1, type: "pointerdown", x: 10, y: 10, isPrimary: true },
+ // Yielded by two.begin({ x: 50, y: 50 }).
+ { id: 2, type: "pointerover", x: 50, y: 50, isPrimary: false },
+ { id: 2, type: "pointerenter", x: 50, y: 50, isPrimary: false },
{ id: 2, type: "pointerdown", x: 50, y: 50, isPrimary: false },
+ // Yielded by two.move({ x: 70, y: 70 }).
{ id: 2, type: "pointermove", x: 70, y: 70, isPrimary: false },
+ // Yielded by one.move({ x: 30, y: 30 }).
{ id: 1, type: "pointermove", x: 30, y: 30, isPrimary: true },
- { id: 2, type: "pointermove", x: 50, y: 50, isPrimary: true }
+ // Yielded by one.end().
+ { id: 1, type: "pointerup", x: 30, y: 30, isPrimary: true },
+ { id: 1, type: "pointerout", x: 30, y: 30, isPrimary: true },
+ { id: 1, type: "pointerleave", x: 30, y: 30, isPrimary: true },
+ // Yielded by two.move({ x: 50, y: 50 }).
+ { id: 2, type: "pointermove", x: 50, y: 50, isPrimary: false },
+ // Yielded by two.end().
+ { id: 2, type: "pointerup", x: 50, y: 50, isPrimary: false },
+ { id: 2, type: "pointerout", x: 50, y: 50, isPrimary: false },
+ { id: 2, type: "pointerleave", x: 50, y: 50, isPrimary: false },
+ // Yielded by three.begin({ x: 10, y: 10 }).
+ { id: 3, type: "pointerover", x: 10, y: 10, isPrimary: true },
+ { id: 3, type: "pointerenter", x: 10, y: 10, isPrimary: true },
+ { id: 3, type: "pointerdown", x: 10, y: 10, isPrimary: true },
+ // Yielded by three.end().
+ { id: 3, type: "pointerup", x: 10, y: 10, isPrimary: true },
+ { id: 3, type: "pointerout", x: 10, y: 10, isPrimary: true },
+ { id: 3, type: "pointerleave", x: 10, y: 10, isPrimary: true },
]);
test.done();
});
-}, "Oldest active touch has isPrimary = true.");
+}, "The first touch of a touch sequence has isPrimary = true.");
</script>
</body>
Modified: branches/safari-608.1.24.20-branch/Source/WebCore/ChangeLog (245556 => 245557)
--- branches/safari-608.1.24.20-branch/Source/WebCore/ChangeLog 2019-05-21 03:21:30 UTC (rev 245556)
+++ branches/safari-608.1.24.20-branch/Source/WebCore/ChangeLog 2019-05-21 03:21:34 UTC (rev 245557)
@@ -1,5 +1,48 @@
2019-05-20 Kocsen Chung <[email protected]>
+ Cherry-pick r245505. rdar://problem/50801608
+
+ [Pointer Events] A pointer should be marked as primary for all of its events
+ https://bugs.webkit.org/show_bug.cgi?id=197909
+ <rdar://problem/50801608>
+
+ Reviewed by Dean Jackson.
+
+ Source/WebCore:
+
+ Add an ivar for EventHandler which we'll use in WebKitAdditions code to track the touch identifier
+ of the very first touch to start in a given sequence.
+
+ * page/EventHandler.h:
+
+ LayoutTests:
+
+ Update tests to match expectations that only the first touch of a sequence is the primary pointer,
+ which applies to all of its events, even after the even is no longer touching the digitizer.
+
+ * pointerevents/ios/over-enter-out-leave.html:
+ * pointerevents/ios/pointer-event-order.html:
+ * pointerevents/ios/pointer-events-implicit-capture.html:
+ * pointerevents/ios/pointer-events-is-primary-expected.txt:
+ * pointerevents/ios/pointer-events-is-primary.html:
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245505 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2019-05-19 Antoine Quint <[email protected]>
+
+ [Pointer Events] A pointer should be marked as primary for all of its events
+ https://bugs.webkit.org/show_bug.cgi?id=197909
+ <rdar://problem/50801608>
+
+ Reviewed by Dean Jackson.
+
+ Add an ivar for EventHandler which we'll use in WebKitAdditions code to track the touch identifier
+ of the very first touch to start in a given sequence.
+
+ * page/EventHandler.h:
+
+2019-05-20 Kocsen Chung <[email protected]>
+
Cherry-pick r245483. rdar://problem/49078202
Add a website policy to disable the legacy -webkit-overflow-scrolling:touch behavior
Modified: branches/safari-608.1.24.20-branch/Source/WebCore/page/EventHandler.h (245556 => 245557)
--- branches/safari-608.1.24.20-branch/Source/WebCore/page/EventHandler.h 2019-05-21 03:21:30 UTC (rev 245556)
+++ branches/safari-608.1.24.20-branch/Source/WebCore/page/EventHandler.h 2019-05-21 03:21:34 UTC (rev 245557)
@@ -614,6 +614,10 @@
unsigned touchIdentifierForMouseEvents { 0 };
#endif
+#if ENABLE(POINTER_EVENTS) && ENABLE(IOS_TOUCH_EVENTS)
+ unsigned m_touchIdentifierForPrimaryTouch { 0 };
+#endif
+
double m_maxMouseMovedDuration { 0 };
bool m_didStartDrag { false };
bool m_isHandlingWheelEvent { false };
_______________________________________________ webkit-changes mailing list [email protected] https://lists.webkit.org/mailman/listinfo/webkit-changes
