⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 246251 in webkit


Ignore:
Timestamp:
Jun 9, 2019, 11:25:30 PM (7 years ago)
Author:
bshafiei@apple.com
Message:

Cherry-pick r246213. rdar://problem/50114230

Restrict fast clicks everywhere to desktop content mode
https://bugs.webkit.org/show_bug.cgi?id=198610
<rdar://problem/50114230>

Reviewed by Dean Jackson.

Source/WebKit:

We now set a new allowsFastClicksEverywhere property on the WebPageProxy when the content mode changes, set to true
when we're in desktop browsing mode. We now check on this property to opt into the fast clicks everywhere behavior.

This patch had been reverted once because it yielded some regressions in existing tests, notably under
fast/events/touch/ios/content-observation. This updated patch addresses this by ensuring the gesture recognizers
used for double-tap-to-zoom are disabled in -[WKContentViewInteraction _didStartProvisionalLoadForMainFrame]
to ensure that two tests dispatching a tap at the same location don't yield the recognition of a double-tap
rathern than the recognition of two single taps.

  • UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::allowsFastClicksEverywhere const):
  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _handleSmartMagnificationInformationForPotentialTap:renderRect:fitEntireRect:viewportMinimumScale:viewportMaximumScale:]): (_didStartProvisionalLoadForMainFrame):
  • UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::effectiveContentModeAfterAdjustingPolicies):

LayoutTests:

Add a new test that enables fast clicks but also sets a mobile content mode.

We also mark fast/visual-viewport/ios/min-scale-greater-than-one.html as non-flaky
since the flakiness was due to the fast clicks everywhere behavior being enabled on iPhone.

Finally, we can now remove the hack where ui.tap() in the Pointer Events utility returned
a promise with a one-second delay since the issue of double-taps being recognized instead of
two consecutive single taps across two tests has been resolved.

  • fast/events/ios/ipad/fast-click-always-mobile-content-mode-expected.txt: Added.
  • fast/events/ios/ipad/fast-click-always-mobile-content-mode.html: Added.
  • platform/ios-simulator-wk2/TestExpectations:
  • pointerevents/utils.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@246213 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Location:
branches/safari-608.1.27-branch
Files:
2 added
7 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-608.1.27-branch/LayoutTests/ChangeLog

    r246250 r246251  
     12019-06-09  Babak Shafiei  <bshafiei@apple.com>
     2
     3        Cherry-pick r246213. rdar://problem/50114230
     4
     5    Restrict fast clicks everywhere to desktop content mode
     6    https://bugs.webkit.org/show_bug.cgi?id=198610
     7    <rdar://problem/50114230>
     8   
     9    Reviewed by Dean Jackson.
     10   
     11    Source/WebKit:
     12   
     13    We now set a new allowsFastClicksEverywhere property on the WebPageProxy when the content mode changes, set to true
     14    when we're in desktop browsing mode. We now check on this property to opt into the fast clicks everywhere behavior.
     15   
     16    This patch had been reverted once because it yielded some regressions in existing tests, notably under
     17    fast/events/touch/ios/content-observation. This updated patch addresses this by ensuring the gesture recognizers
     18    used for double-tap-to-zoom are disabled in -[WKContentViewInteraction _didStartProvisionalLoadForMainFrame]
     19    to ensure that two tests dispatching a tap at the same location don't yield the recognition of a double-tap
     20    rathern than the recognition of two single taps.
     21   
     22    * UIProcess/WebPageProxy.h:
     23    (WebKit::WebPageProxy::allowsFastClicksEverywhere const):
     24    * UIProcess/ios/WKContentViewInteraction.mm:
     25    (-[WKContentView _handleSmartMagnificationInformationForPotentialTap:renderRect:fitEntireRect:viewportMinimumScale:viewportMaximumScale:]):
     26    (_didStartProvisionalLoadForMainFrame):
     27    * UIProcess/ios/WebPageProxyIOS.mm:
     28    (WebKit::WebPageProxy::effectiveContentModeAfterAdjustingPolicies):
     29   
     30    LayoutTests:
     31   
     32    Add a new test that enables fast clicks but also sets a mobile content mode.
     33   
     34    We also mark fast/visual-viewport/ios/min-scale-greater-than-one.html as non-flaky
     35    since the flakiness was due to the fast clicks everywhere behavior being enabled on iPhone.
     36   
     37    Finally, we can now remove the hack where ui.tap() in the Pointer Events utility returned
     38    a promise with a one-second delay since the issue of double-taps being recognized instead of
     39    two consecutive single taps across two tests has been resolved.
     40   
     41    * fast/events/ios/ipad/fast-click-always-mobile-content-mode-expected.txt: Added.
     42    * fast/events/ios/ipad/fast-click-always-mobile-content-mode.html: Added.
     43    * platform/ios-simulator-wk2/TestExpectations:
     44    * pointerevents/utils.js:
     45   
     46    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@246213 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     47
     48    2019-06-07  Antoine Quint  <graouts@apple.com>
     49
     50            Restrict fast clicks everywhere to desktop content mode
     51            https://bugs.webkit.org/show_bug.cgi?id=198610
     52            <rdar://problem/50114230>
     53
     54            Reviewed by Dean Jackson.
     55
     56            Add a new test that enables fast clicks but also sets a mobile content mode.
     57
     58            We also mark fast/visual-viewport/ios/min-scale-greater-than-one.html as non-flaky
     59            since the flakiness was due to the fast clicks everywhere behavior being enabled on iPhone.
     60
     61            Finally, we can now remove the hack where ui.tap() in the Pointer Events utility returned
     62            a promise with a one-second delay since the issue of double-taps being recognized instead of
     63            two consecutive single taps across two tests has been resolved.
     64
     65            * fast/events/ios/ipad/fast-click-always-mobile-content-mode-expected.txt: Added.
     66            * fast/events/ios/ipad/fast-click-always-mobile-content-mode.html: Added.
     67            * platform/ios-simulator-wk2/TestExpectations:
     68            * pointerevents/utils.js:
     69
    1702019-06-09  Babak Shafiei  <bshafiei@apple.com>
    271
  • branches/safari-608.1.27-branch/LayoutTests/platform/ios-simulator-wk2/TestExpectations

    r245517 r246251  
    5353webkit.org/b/196233 fast/viewport/ios/initial-scale-after-changing-view-scale.html [ Pass Timeout ]
    5454
    55 webkit.org/b/196236 [ Debug ] fast/visual-viewport/ios/min-scale-greater-than-one.html [ Pass Failure ]
    56 
    5755webkit.org/b/196269 http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-with-link-fragment-from-prevalent-resource.html [ Pass Timeout ]
    5856webkit.org/b/196269 http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-with-link-query-and-fragment-from-prevalent-resource.html [ Pass Timeout ]
     
    6361webkit.org/b/191709 editing/deleting/delete-emoji-9.html [ Pass Failure ]
    6462webkit.org/b/191709 editing/deleting/delete-emoji.html [ Pass Failure ]
    65 
    66 webkit.org/b/196300 fast/visual-viewport/ios/min-scale-greater-than-one.html [ Pass Failure ]
    6763
    6864webkit.org/b/196298 fast/viewport/ios/use-minimum-device-width-for-page-without-viewport-meta.html [ Pass Failure ]
  • branches/safari-608.1.27-branch/LayoutTests/pointerevents/utils.js

    r245506 r246251  
    119119    tap(options)
    120120    {
    121         // Add a delay to ensure sequence of tap() calls don't yield double taps.
    122         const delay = 1000;
    123         return this._run(`uiController.singleTapAtPoint(${options.x}, ${options.y})`).then(() => {
    124             return new Promise(resolve => setTimeout(resolve, delay));
    125         });
     121        return this._run(`uiController.singleTapAtPoint(${options.x}, ${options.y})`);
    126122    }
    127123
  • branches/safari-608.1.27-branch/Source/WebKit/ChangeLog

    r246250 r246251  
     12019-06-09  Babak Shafiei  <bshafiei@apple.com>
     2
     3        Cherry-pick r246213. rdar://problem/50114230
     4
     5    Restrict fast clicks everywhere to desktop content mode
     6    https://bugs.webkit.org/show_bug.cgi?id=198610
     7    <rdar://problem/50114230>
     8   
     9    Reviewed by Dean Jackson.
     10   
     11    Source/WebKit:
     12   
     13    We now set a new allowsFastClicksEverywhere property on the WebPageProxy when the content mode changes, set to true
     14    when we're in desktop browsing mode. We now check on this property to opt into the fast clicks everywhere behavior.
     15   
     16    This patch had been reverted once because it yielded some regressions in existing tests, notably under
     17    fast/events/touch/ios/content-observation. This updated patch addresses this by ensuring the gesture recognizers
     18    used for double-tap-to-zoom are disabled in -[WKContentViewInteraction _didStartProvisionalLoadForMainFrame]
     19    to ensure that two tests dispatching a tap at the same location don't yield the recognition of a double-tap
     20    rathern than the recognition of two single taps.
     21   
     22    * UIProcess/WebPageProxy.h:
     23    (WebKit::WebPageProxy::allowsFastClicksEverywhere const):
     24    * UIProcess/ios/WKContentViewInteraction.mm:
     25    (-[WKContentView _handleSmartMagnificationInformationForPotentialTap:renderRect:fitEntireRect:viewportMinimumScale:viewportMaximumScale:]):
     26    (_didStartProvisionalLoadForMainFrame):
     27    * UIProcess/ios/WebPageProxyIOS.mm:
     28    (WebKit::WebPageProxy::effectiveContentModeAfterAdjustingPolicies):
     29   
     30    LayoutTests:
     31   
     32    Add a new test that enables fast clicks but also sets a mobile content mode.
     33   
     34    We also mark fast/visual-viewport/ios/min-scale-greater-than-one.html as non-flaky
     35    since the flakiness was due to the fast clicks everywhere behavior being enabled on iPhone.
     36   
     37    Finally, we can now remove the hack where ui.tap() in the Pointer Events utility returned
     38    a promise with a one-second delay since the issue of double-taps being recognized instead of
     39    two consecutive single taps across two tests has been resolved.
     40   
     41    * fast/events/ios/ipad/fast-click-always-mobile-content-mode-expected.txt: Added.
     42    * fast/events/ios/ipad/fast-click-always-mobile-content-mode.html: Added.
     43    * platform/ios-simulator-wk2/TestExpectations:
     44    * pointerevents/utils.js:
     45   
     46    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@246213 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     47
     48    2019-06-07  Antoine Quint  <graouts@apple.com>
     49
     50            Restrict fast clicks everywhere to desktop content mode
     51            https://bugs.webkit.org/show_bug.cgi?id=198610
     52            <rdar://problem/50114230>
     53
     54            Reviewed by Dean Jackson.
     55
     56            We now set a new allowsFastClicksEverywhere property on the WebPageProxy when the content mode changes, set to true
     57            when we're in desktop browsing mode. We now check on this property to opt into the fast clicks everywhere behavior.
     58
     59            This patch had been reverted once because it yielded some regressions in existing tests, notably under
     60            fast/events/touch/ios/content-observation. This updated patch addresses this by ensuring the gesture recognizers
     61            used for double-tap-to-zoom are disabled in -[WKContentViewInteraction _didStartProvisionalLoadForMainFrame]
     62            to ensure that two tests dispatching a tap at the same location don't yield the recognition of a double-tap
     63            rathern than the recognition of two single taps.
     64
     65            * UIProcess/WebPageProxy.h:
     66            (WebKit::WebPageProxy::allowsFastClicksEverywhere const):
     67            * UIProcess/ios/WKContentViewInteraction.mm:
     68            (-[WKContentView _handleSmartMagnificationInformationForPotentialTap:renderRect:fitEntireRect:viewportMinimumScale:viewportMaximumScale:]):
     69            (_didStartProvisionalLoadForMainFrame):
     70            * UIProcess/ios/WebPageProxyIOS.mm:
     71            (WebKit::WebPageProxy::effectiveContentModeAfterAdjustingPolicies):
     72
    1732019-06-09  Babak Shafiei  <bshafiei@apple.com>
    274
  • branches/safari-608.1.27-branch/Source/WebKit/UIProcess/WebPageProxy.h

    r246250 r246251  
    518518    bool hasCommittedAnyProvisionalLoads() const { return m_hasCommittedAnyProvisionalLoads; }
    519519
     520    bool allowsFastClicksEverywhere() const { return m_allowsFastClicksEverywhere; }
     521
    520522    void setIsUsingHighPerformanceWebGL(bool value) { m_isUsingHighPerformanceWebGL = value; }
    521523    bool isUsingHighPerformanceWebGL() const { return m_isUsingHighPerformanceWebGL; }
     
    24792481    bool m_openedByDOM { false };
    24802482    bool m_hasCommittedAnyProvisionalLoads { false };
     2483    bool m_allowsFastClicksEverywhere { false };
    24812484
    24822485    HashMap<String, Ref<WebURLSchemeHandler>> m_urlSchemeHandlersByScheme;
  • branches/safari-608.1.27-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm

    r245902 r246251  
    15871587        return;
    15881588
    1589     if (_page->preferences().fastClicksEverywhere()) {
     1589    if (_page->preferences().fastClicksEverywhere() && _page->allowsFastClicksEverywhere()) {
    15901590        RELEASE_LOG(ViewGestures, "Potential tap found an element and fast taps are forced on. Trigger click. (%p)", self);
    15911591        [self _setDoubleTapGesturesEnabled:NO];
     
    37933793    [_doubleTapGestureRecognizerForDoubleClick setEnabled:NO];
    37943794    [_doubleTapGestureRecognizerForDoubleClick setEnabled:YES];
     3795    // We also need to disable the double-tap gesture recognizers that are enabled for double-tap-to-zoom and which
     3796    // are enabled when a single tap is first recognized. This avoids tests running in sequence and simulating taps
     3797    // in the same location to trigger double-tap recognition.
     3798    [self _setDoubleTapGesturesEnabled:NO];
    37953799}
    37963800
  • branches/safari-608.1.27-branch/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm

    r246250 r246251  
    14001400    }
    14011401
     1402    m_allowsFastClicksEverywhere = false;
     1403
    14021404    if (!useDesktopBrowsingMode)
    14031405        return WebContentMode::Mobile;
     
    14211423        policies.setSimulatedMouseEventsDispatchPolicy(WebsiteSimulatedMouseEventsDispatchPolicy::Allow);
    14221424        policies.setLegacyOverflowScrollingTouchPolicy(WebsiteLegacyOverflowScrollingTouchPolicy::Disable);
     1425        m_allowsFastClicksEverywhere = true;
    14231426    }
    14241427
Note: See TracChangeset for help on using the changeset viewer.