Changeset 243015 in webkit


Ignore:
Timestamp:
Mar 15, 2019 3:06:42 PM (5 years ago)
Author:
dino@apple.com
Message:

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.

Source/WebKit:

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:]):

LayoutTests:

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:
Location:
trunk
Files:
1 added
5 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r243014 r243015  
     12019-03-15  Dean Jackson  <dino@apple.com>
     2
     3        Provide an option for an always-on fast click mode in iOS
     4        https://bugs.webkit.org/show_bug.cgi?id=195822
     5        <rdar://problem/48939357>
     6
     7        Reviewed by Sam Weinig.
     8
     9        New test for "always fast click" mode.
     10
     11        * fast/events/ios/ipad/fast-click-always-expected.txt: Added.
     12        * 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.
     13        * fast/events/ios/ipad/fast-click-double-tap-sends-click-on-insignificant-zoom.html:
     14
    1152019-03-15  Jer Noble  <jer.noble@apple.com>
    216
  • trunk/LayoutTests/fast/events/ios/ipad/fast-click-always.html

    r243014 r243015  
    1 <!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
     1<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true internal:FastClicksEverywhere=true ] -->
    22
    33<html>
    4 <meta name="viewport" content="width=500">
     4<meta name="viewport" content="width=800">
    55<head>
    66    <style>
     
    1313        }
    1414    </style>
    15     <script src="../../../resources/ui-helper.js"></script>
     15    <script src="../../../../resources/ui-helper.js"></script>
    1616    <script>
    1717        if (window.testRunner) {
     
    4949<div id="target"></div>
    5050<div id="description">This document doesn't have fast clicks because
    51     it sets a viewport width. However, it doesn't have a large amount of
    52     zoom on double tap, so double tapping on the rectangle
    53     above should send a click event.</div>
     51    it sets a viewport width. It has a significant zoom since the viewport
     52    width is significantly bigger than the body width. However, it sets fast click everywhere to
     53    on, so double tapping on the rectangle above should send a click event.</div>
    5454</body>
    5555</html>
  • trunk/LayoutTests/fast/events/ios/ipad/fast-click-double-tap-sends-click-on-insignificant-zoom.html

    r242757 r243015  
    1313        }
    1414    </style>
    15     <script src="../../../resources/ui-helper.js"></script>
     15    <script src="../../../../resources/ui-helper.js"></script>
    1616    <script>
    1717        if (window.testRunner) {
  • trunk/Source/WebKit/ChangeLog

    r243012 r243015  
     12019-03-15  Dean Jackson  <dino@apple.com>
     2
     3        Provide an option for an always-on fast click mode in iOS
     4        https://bugs.webkit.org/show_bug.cgi?id=195822
     5        <rdar://problem/48939357>
     6
     7        Reviewed by Sam Weinig.
     8
     9        Add an option that will always trigger a click and never
     10        wait for a double tap to zoom. It is disabled by default.
     11
     12        * Shared/WebPreferences.yaml:
     13        * UIProcess/ios/WKContentViewInteraction.mm:
     14        (-[WKContentView _handleSmartMagnificationInformationForPotentialTap:renderRect:fitEntireRect:viewportMinimumScale:viewportMaximumScale:]):
     15
    1162019-03-15  Timothy Hatcher  <timothy@apple.com>
    217
  • trunk/Source/WebKit/Shared/WebPreferences.yaml

    r242920 r243015  
    14871487  category: internal
    14881488
     1489FastClicksEverywhere:
     1490  type: bool
     1491  defaultValue: false
     1492  condition: PLATFORM(IOS_FAMILY)
     1493  humanReadableName: "Fast clicks everywhere"
     1494  humanReadableDescription: "Force fast clicks on all pages"
     1495  webcoreBinding: none
     1496  category: internal
     1497
    14891498InputTypeColorEnabled:
    14901499  type: bool
  • trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm

    r242968 r243015  
    15051505    if (!_potentialTapInProgress)
    15061506        return;
     1507
     1508    if (_page->preferences().fastClicksEverywhere()) {
     1509        RELEASE_LOG(ViewGestures, "Potential tap found an element and fast taps are forced on. Trigger click. (%p)", self);
     1510        [self _setDoubleTapGesturesEnabled:NO];
     1511        return;
     1512    }
    15071513
    15081514    auto targetScale = _smartMagnificationController->zoomFactorForTargetRect(renderRect, fitEntireRect, viewportMinimumScale, viewportMaximumScale);
Note: See TracChangeset for help on using the changeset viewer.