Title: [230440] trunk/Source/WebKit
Revision
230440
Author
wenson_hs...@apple.com
Date
2018-04-09 09:10:52 -0700 (Mon, 09 Apr 2018)

Log Message

[Extra zoom mode] Disable fast clicking by default in extra zoom mode
https://bugs.webkit.org/show_bug.cgi?id=184411
<rdar://problem/38726867>

Reviewed by Andy Estes.

As it turns out, existing fast-clicking heuristics don't work so well in extra zoom mode. Even at device-width,
since the page is scaled to fit within the viewport, having single taps take precedence over double taps leads
to a confusing experience when trying to double tap to zoom further on content that contains links and other
click targets. Revert to legacy behavior here by disabling these heuristics.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (230439 => 230440)


--- trunk/Source/WebKit/ChangeLog	2018-04-09 15:50:47 UTC (rev 230439)
+++ trunk/Source/WebKit/ChangeLog	2018-04-09 16:10:52 UTC (rev 230440)
@@ -1,3 +1,19 @@
+2018-04-09  Wenson Hsieh  <wenson_hs...@apple.com>
+
+        [Extra zoom mode] Disable fast clicking by default in extra zoom mode
+        https://bugs.webkit.org/show_bug.cgi?id=184411
+        <rdar://problem/38726867>
+
+        Reviewed by Andy Estes.
+
+        As it turns out, existing fast-clicking heuristics don't work so well in extra zoom mode. Even at device-width,
+        since the page is scaled to fit within the viewport, having single taps take precedence over double taps leads
+        to a confusing experience when trying to double tap to zoom further on content that contains links and other
+        click targets. Revert to legacy behavior here by disabling these heuristics.
+
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView _initializeWithConfiguration:]):
+
 2018-04-06  Wenson Hsieh  <wenson_hs...@apple.com>
 
         [Extra zoom mode] Add an SPI hook for clients to opt in to focus overlay UI

Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (230439 => 230440)


--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm	2018-04-09 15:50:47 UTC (rev 230439)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm	2018-04-09 16:10:52 UTC (rev 230440)
@@ -656,8 +656,17 @@
 
     _viewportMetaTagWidth = WebCore::ViewportArguments::ValueAuto;
     _initialScaleFactor = 1;
-    _fastClickingIsDisabled = [[NSUserDefaults standardUserDefaults] boolForKey:@"WebKitFastClickingDisabled"];
 
+    if (NSNumber *enabledValue = [[NSUserDefaults standardUserDefaults] objectForKey:@"WebKitFastClickingDisabled"])
+        _fastClickingIsDisabled = enabledValue.boolValue;
+    else {
+#if ENABLE(EXTRA_ZOOM_MODE)
+        _fastClickingIsDisabled = YES;
+#else
+        _fastClickingIsDisabled = NO;
+#endif
+    }
+
     [self _frameOrBoundsChanged];
 
     NSNotificationCenter *center = [NSNotificationCenter defaultCenter];
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to