Diff
Modified: trunk/LayoutTests/ChangeLog (243240 => 243241)
--- trunk/LayoutTests/ChangeLog 2019-03-20 21:26:01 UTC (rev 243240)
+++ trunk/LayoutTests/ChangeLog 2019-03-20 21:27:47 UTC (rev 243241)
@@ -1,3 +1,23 @@
+2019-03-20 Dean Jackson <[email protected]>
+
+ [iOS] Enable fast clicking everywhere
+ https://bugs.webkit.org/show_bug.cgi?id=196023
+ <rdar://problem/49073589>
+
+ Reviewed by Wenson Hsieh.
+
+ Add a new test for the case where "Fast Clicks Everywhere" is explicitly
+ set to false. This required implementing a humanSpeedZoomByDoubleTappingAt
+ variation.
+
+ * fast/events/ios/ipad/fast-click-always-expected.txt:
+ * fast/events/ios/ipad/fast-click-always.html:
+ * fast/events/ios/ipad/fast-click-not-always-expected.txt: Added.
+ * fast/events/ios/ipad/fast-click-not-always.html:
+ * resources/ui-helper.js:
+ (window.UIHelper.humanSpeedZoomByDoubleTappingAt): New helper function that pauses between
+ double taps, and resolves when the zoom finishes.
+
2019-03-19 Ryosuke Niwa <[email protected]>
[CSS OM] StyledElementInlineStylePropertyMap creates a Ref cycle with its owner element
Modified: trunk/LayoutTests/fast/events/ios/ipad/fast-click-always-expected.txt (243240 => 243241)
--- trunk/LayoutTests/fast/events/ios/ipad/fast-click-always-expected.txt 2019-03-20 21:26:01 UTC (rev 243240)
+++ trunk/LayoutTests/fast/events/ios/ipad/fast-click-always-expected.txt 2019-03-20 21:27:47 UTC (rev 243241)
@@ -1,2 +1,2 @@
PASS: Click fired on element with handler.
-This document doesn't have fast clicks because it sets a viewport width. It has a significant zoom since the viewport width is significantly bigger than the body width. However, it sets fast click everywhere to on, so double tapping on the rectangle above should send a click event.
+This document doesn't have fast clicks because it sets a viewport width. It has a significant zoom since the viewport width is significantly bigger than the body width. However, since fast click everywhere is set to true, double tapping on the rectangle above should send a click event.
Modified: trunk/LayoutTests/fast/events/ios/ipad/fast-click-always.html (243240 => 243241)
--- trunk/LayoutTests/fast/events/ios/ipad/fast-click-always.html 2019-03-20 21:26:01 UTC (rev 243240)
+++ trunk/LayoutTests/fast/events/ios/ipad/fast-click-always.html 2019-03-20 21:27:47 UTC (rev 243241)
@@ -1,4 +1,4 @@
-<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true internal:FastClicksEverywhere=true ] -->
+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
<html>
<meta name="viewport" content="width=800">
@@ -49,7 +49,7 @@
<div id="target"></div>
<div id="description">This document doesn't have fast clicks because
it sets a viewport width. It has a significant zoom since the viewport
- width is significantly bigger than the body width. However, it sets fast click everywhere to
- on, so double tapping on the rectangle above should send a click event.</div>
+ width is significantly bigger than the body width. However, since fast click everywhere
+ is set to true, double tapping on the rectangle above should send a click event.</div>
</body>
</html>
Copied: trunk/LayoutTests/fast/events/ios/ipad/fast-click-not-always-expected.txt (from rev 243240, trunk/LayoutTests/fast/events/ios/ipad/fast-click-always-expected.txt) (0 => 243241)
--- trunk/LayoutTests/fast/events/ios/ipad/fast-click-not-always-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/events/ios/ipad/fast-click-not-always-expected.txt 2019-03-20 21:27:47 UTC (rev 243241)
@@ -0,0 +1,2 @@
+PASS: Double tap caused zoom.
+This document doesn't have fast clicks because it sets a viewport width. It has a significant zoom since the viewport width is significantly bigger than the body width. However, it sets fast click everywhere to false, so double tapping on the rectangle above should zoom.
Copied: trunk/LayoutTests/fast/events/ios/ipad/fast-click-not-always.html (from rev 243240, trunk/LayoutTests/fast/events/ios/ipad/fast-click-always.html) (0 => 243241)
--- trunk/LayoutTests/fast/events/ios/ipad/fast-click-not-always.html (rev 0)
+++ trunk/LayoutTests/fast/events/ios/ipad/fast-click-not-always.html 2019-03-20 21:27:47 UTC (rev 243241)
@@ -0,0 +1,58 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true internal:FastClicksEverywhere=false ] -->
+
+<html>
+<meta name="viewport" content="width=800">
+<head>
+ <style>
+ body {
+ font-family: system-ui;
+ line-height: 1.4;
+ padding: 10px 10px;
+ width: 500px;
+ margin: 0;
+ }
+ </style>
+ <script src=""
+ <script>
+ if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+ }
+
+ async function runTest()
+ {
+ document.getElementById("target").addEventListener("click", handleClick, false);
+
+ if (!window.testRunner)
+ return;
+
+ await UIHelper.humanSpeedZoomByDoubleTappingAt(30, 30);
+ document.getElementById("target").textContent = "PASS: Double tap caused zoom.";
+ testRunner.notifyDone();
+ }
+
+ function handleClick(event)
+ {
+ document.getElementById("target").textContent = "FAIL: Click fired on element with handler.";
+ testRunner.notifyDone();
+ }
+ </script>
+ <style>
+ body {
+ margin: 0;
+ }
+ #target {
+ height: 100px;
+ width: 100px;
+ background-color: silver;
+ }
+ </style>
+</head>
+<body _onload_="runTest()">
+<div id="target"></div>
+<div id="description">This document doesn't have fast clicks because
+ it sets a viewport width. It has a significant zoom since the viewport
+ width is significantly bigger than the body width. However, it sets fast click everywhere to
+ false, so double tapping on the rectangle above should zoom.</div>
+</body>
+</html>
Modified: trunk/LayoutTests/resources/ui-helper.js (243240 => 243241)
--- trunk/LayoutTests/resources/ui-helper.js 2019-03-20 21:26:01 UTC (rev 243240)
+++ trunk/LayoutTests/resources/ui-helper.js 2019-03-20 21:27:47 UTC (rev 243241)
@@ -99,6 +99,38 @@
});
}
+ static humanSpeedZoomByDoubleTappingAt(x, y)
+ {
+ console.assert(this.isIOS());
+
+ if (!this.isWebKit2()) {
+ // FIXME: Add a sleep in here.
+ eventSender.addTouchPoint(x, y);
+ eventSender.touchStart();
+ eventSender.releaseTouchPoint(0);
+ eventSender.touchEnd();
+ eventSender.addTouchPoint(x, y);
+ eventSender.touchStart();
+ eventSender.releaseTouchPoint(0);
+ eventSender.touchEnd();
+ return Promise.resolve();
+ }
+
+ return new Promise(async (resolve) => {
+ await UIHelper.tapAt(x, y);
+ await new Promise(resolveAfterDelay => setTimeout(resolveAfterDelay, 120));
+ await new Promise((resolveAfterZoom) => {
+ testRunner.runUIScript(`
+ uiController.didEndZoomingCallback = () => {
+ uiController.didEndZoomingCallback = null;
+ uiController.uiScriptComplete(uiController.zoomScale);
+ };
+ uiController.singleTapAtPoint(${x}, ${y}, () => {});`, resolveAfterZoom);
+ });
+ resolve();
+ });
+ }
+
static zoomByDoubleTappingAt(x, y)
{
console.assert(this.isIOS());
Modified: trunk/Source/WebKit/ChangeLog (243240 => 243241)
--- trunk/Source/WebKit/ChangeLog 2019-03-20 21:26:01 UTC (rev 243240)
+++ trunk/Source/WebKit/ChangeLog 2019-03-20 21:27:47 UTC (rev 243241)
@@ -1,3 +1,16 @@
+2019-03-20 Dean Jackson <[email protected]>
+
+ [iOS] Enable fast clicking everywhere
+ https://bugs.webkit.org/show_bug.cgi?id=196023
+ <rdar://problem/49073589>
+
+ Reviewed by Wenson Hsieh.
+
+ Set FastClicksEverywhere to on by default for iPhone & iPad.
+
+ * Shared/WebPreferences.yaml:
+ * Shared/WebPreferencesDefaultValues.h:
+
2019-03-20 Chris Dumez <[email protected]>
Regression(PSON): ViewGestureController is not properly notified of process swaps on iOS
Modified: trunk/Source/WebKit/Shared/WebPreferences.yaml (243240 => 243241)
--- trunk/Source/WebKit/Shared/WebPreferences.yaml 2019-03-20 21:26:01 UTC (rev 243240)
+++ trunk/Source/WebKit/Shared/WebPreferences.yaml 2019-03-20 21:27:47 UTC (rev 243241)
@@ -1503,7 +1503,7 @@
FastClicksEverywhere:
type: bool
- defaultValue: false
+ defaultValue: DEFAULT_FAST_CLICKS_EVERYWHERE
condition: PLATFORM(IOS_FAMILY)
humanReadableName: "Fast clicks everywhere"
humanReadableDescription: "Force fast clicks on all pages"
Modified: trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h (243240 => 243241)
--- trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h 2019-03-20 21:26:01 UTC (rev 243240)
+++ trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h 2019-03-20 21:27:47 UTC (rev 243241)
@@ -251,3 +251,11 @@
#else
#define DEFAULT_DOM_PASTE_ACCESS_REQUESTS_ENABLED false
#endif
+
+#if PLATFORM(IOS_FAMILY)
+#if PLATFORM(WATCHOS)
+#define DEFAULT_FAST_CLICKS_EVERYWHERE false
+#else
+#define DEFAULT_FAST_CLICKS_EVERYWHERE true
+#endif
+#endif