Diff
Modified: trunk/LayoutTests/ChangeLog (243014 => 243015)
--- trunk/LayoutTests/ChangeLog 2019-03-15 22:02:02 UTC (rev 243014)
+++ trunk/LayoutTests/ChangeLog 2019-03-15 22:06:42 UTC (rev 243015)
@@ -1,3 +1,17 @@
+2019-03-15 Dean Jackson <[email protected]>
+
+ Provide an option for an always-on fast click mode in iOS
+ https://bugs.webkit.org/show_bug.cgi?id=195822
+ <rdar://problem/48939357>
+
+ Reviewed by Sam Weinig.
+
+ New test for "always fast click" mode.
+
+ * fast/events/ios/ipad/fast-click-always-expected.txt: Added.
+ * fast/events/ios/ipad/fast-click-always.html: Copied from LayoutTests/fast/events/ios/ipad/fast-click-double-tap-sends-click-on-insignificant-zoom.html.
+ * fast/events/ios/ipad/fast-click-double-tap-sends-click-on-insignificant-zoom.html:
+
2019-03-15 Jer Noble <[email protected]>
Add a "supportedConfiguration" dictionary to MediaCapabilitiesDecodingInfo and MediaCapabilitiesEncodingInfo
Added: trunk/LayoutTests/fast/events/ios/ipad/fast-click-always-expected.txt (0 => 243015)
--- trunk/LayoutTests/fast/events/ios/ipad/fast-click-always-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/events/ios/ipad/fast-click-always-expected.txt 2019-03-15 22:06:42 UTC (rev 243015)
@@ -0,0 +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.
Property changes on: trunk/LayoutTests/fast/events/ios/ipad/fast-click-always-expected.txt
___________________________________________________________________
Added: svn:eol-style
+native
\ No newline at end of property
Added: svn:keywords
+Date Revision
\ No newline at end of property
Added: svn:mime-type
+text/plain
\ No newline at end of property
Copied: trunk/LayoutTests/fast/events/ios/ipad/fast-click-always.html (from rev 243014, trunk/LayoutTests/fast/events/ios/ipad/fast-click-double-tap-sends-click-on-insignificant-zoom.html) (0 => 243015)
--- trunk/LayoutTests/fast/events/ios/ipad/fast-click-always.html (rev 0)
+++ trunk/LayoutTests/fast/events/ios/ipad/fast-click-always.html 2019-03-15 22:06:42 UTC (rev 243015)
@@ -0,0 +1,55 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true internal:FastClicksEverywhere=true ] -->
+
+<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.humanSpeedDoubleTapAt(30, 30);
+ }
+
+ function handleClick(event)
+ {
+ document.getElementById("target").textContent = "PASS: 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
+ on, so double tapping on the rectangle above should send a click event.</div>
+</body>
+</html>
Modified: trunk/LayoutTests/fast/events/ios/ipad/fast-click-double-tap-sends-click-on-insignificant-zoom.html (243014 => 243015)
--- trunk/LayoutTests/fast/events/ios/ipad/fast-click-double-tap-sends-click-on-insignificant-zoom.html 2019-03-15 22:02:02 UTC (rev 243014)
+++ trunk/LayoutTests/fast/events/ios/ipad/fast-click-double-tap-sends-click-on-insignificant-zoom.html 2019-03-15 22:06:42 UTC (rev 243015)
@@ -12,7 +12,7 @@
margin: 0;
}
</style>
- <script src=""
+ <script src=""
<script>
if (window.testRunner) {
testRunner.dumpAsText();
Modified: trunk/Source/WebKit/ChangeLog (243014 => 243015)
--- trunk/Source/WebKit/ChangeLog 2019-03-15 22:02:02 UTC (rev 243014)
+++ trunk/Source/WebKit/ChangeLog 2019-03-15 22:06:42 UTC (rev 243015)
@@ -1,3 +1,18 @@
+2019-03-15 Dean Jackson <[email protected]>
+
+ Provide an option for an always-on fast click mode in iOS
+ https://bugs.webkit.org/show_bug.cgi?id=195822
+ <rdar://problem/48939357>
+
+ Reviewed by Sam Weinig.
+
+ Add an option that will always trigger a click and never
+ wait for a double tap to zoom. It is disabled by default.
+
+ * Shared/WebPreferences.yaml:
+ * UIProcess/ios/WKContentViewInteraction.mm:
+ (-[WKContentView _handleSmartMagnificationInformationForPotentialTap:renderRect:fitEntireRect:viewportMinimumScale:viewportMaximumScale:]):
+
2019-03-15 Timothy Hatcher <[email protected]>
Add support to WebPage for getting the contents as an attributed string.
Modified: trunk/Source/WebKit/Shared/WebPreferences.yaml (243014 => 243015)
--- trunk/Source/WebKit/Shared/WebPreferences.yaml 2019-03-15 22:02:02 UTC (rev 243014)
+++ trunk/Source/WebKit/Shared/WebPreferences.yaml 2019-03-15 22:06:42 UTC (rev 243015)
@@ -1486,6 +1486,15 @@
webcoreBinding: none
category: internal
+FastClicksEverywhere:
+ type: bool
+ defaultValue: false
+ condition: PLATFORM(IOS_FAMILY)
+ humanReadableName: "Fast clicks everywhere"
+ humanReadableDescription: "Force fast clicks on all pages"
+ webcoreBinding: none
+ category: internal
+
InputTypeColorEnabled:
type: bool
defaultValue: DEFAULT_INPUT_TYPE_COLOR_ENABLED
Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (243014 => 243015)
--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2019-03-15 22:02:02 UTC (rev 243014)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2019-03-15 22:06:42 UTC (rev 243015)
@@ -1505,6 +1505,12 @@
if (!_potentialTapInProgress)
return;
+ if (_page->preferences().fastClicksEverywhere()) {
+ RELEASE_LOG(ViewGestures, "Potential tap found an element and fast taps are forced on. Trigger click. (%p)", self);
+ [self _setDoubleTapGesturesEnabled:NO];
+ return;
+ }
+
auto targetScale = _smartMagnificationController->zoomFactorForTargetRect(renderRect, fitEntireRect, viewportMinimumScale, viewportMaximumScale);
auto initialScale = [self _initialScaleFactor];