WebKit Bugzilla
Attachment 371494 Details for
Bug 198610
: Restrict fast clicks everywhere to desktop content mode
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198610-20190606162108.patch (text/plain), 7.85 KB, created by
Antoine Quint
on 2019-06-06 07:21:09 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Antoine Quint
Created:
2019-06-06 07:21:09 PDT
Size:
7.85 KB
patch
obsolete
>Subversion Revision: 246143 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index eaf2258fe9012431a1835d547eabc7f0831df861..c98613f1eea51762d35b489267487d618c3533ab 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,18 @@ >+2019-06-06 Antoine Quint <graouts@apple.com> >+ >+ Restrict fast clicks everywhere to desktop content mode >+ https://bugs.webkit.org/show_bug.cgi?id=198610 >+ <rdar://problem/50114230> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * UIProcess/WebPageProxy.h: >+ (WebKit::WebPageProxy::allowsFastClicksEverywhere const): >+ * UIProcess/ios/WKContentViewInteraction.mm: >+ (-[WKContentView _handleSmartMagnificationInformationForPotentialTap:renderRect:fitEntireRect:viewportMinimumScale:viewportMaximumScale:]): >+ * UIProcess/ios/WebPageProxyIOS.mm: >+ (WebKit::WebPageProxy::effectiveContentModeAfterAdjustingPolicies): >+ > 2019-06-05 Said Abou-Hallawa <sabouhallawa@apple.com> > > [Cocoa] REGRESSION(r244182): Inspector thinks CA commits can be nested >diff --git a/Source/WebKit/UIProcess/WebPageProxy.h b/Source/WebKit/UIProcess/WebPageProxy.h >index 1cf8b6e892d1648755c59ddec636d082f576511e..caa0d19ce49537e0f143ccf0ca24e6ef3b771f27 100644 >--- a/Source/WebKit/UIProcess/WebPageProxy.h >+++ b/Source/WebKit/UIProcess/WebPageProxy.h >@@ -518,6 +518,8 @@ public: > > bool hasCommittedAnyProvisionalLoads() const { return m_hasCommittedAnyProvisionalLoads; } > >+ bool allowsFastClicksEverywhere() const { return m_allowsFastClicksEverywhere; } >+ > void setIsUsingHighPerformanceWebGL(bool value) { m_isUsingHighPerformanceWebGL = value; } > bool isUsingHighPerformanceWebGL() const { return m_isUsingHighPerformanceWebGL; } > >@@ -2478,6 +2480,7 @@ WEBPAGEPROXY_LOADOPTIMIZER_ADDITIONS_2 > bool m_isUsingHighPerformanceWebGL { false }; > bool m_openedByDOM { false }; > bool m_hasCommittedAnyProvisionalLoads { false }; >+ bool m_allowsFastClicksEverywhere { false }; > > HashMap<String, Ref<WebURLSchemeHandler>> m_urlSchemeHandlersByScheme; > HashMap<uint64_t, Ref<WebURLSchemeHandler>> m_urlSchemeHandlersByIdentifier; >diff --git a/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm b/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >index b68a1f54d733915c006ddfce1b126f099d078378..f32d7cc07f0e946fc5468e6cd26acd084f731e6f 100644 >--- a/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >+++ b/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >@@ -1588,7 +1588,7 @@ - (void)_handleSmartMagnificationInformationForPotentialTap:(uint64_t)requestID > if (!_potentialTapInProgress) > return; > >- if (_page->preferences().fastClicksEverywhere()) { >+ if (_page->preferences().fastClicksEverywhere() && _page->allowsFastClicksEverywhere()) { > RELEASE_LOG(ViewGestures, "Potential tap found an element and fast taps are forced on. Trigger click. (%p)", self); > [self _setDoubleTapGesturesEnabled:NO]; > return; >diff --git a/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm b/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm >index 3b46da2a60a763827a4c8a2a6e59554154b0626d..3b1800f8e32d4e27775e8568c9d5b88fc00de158 100644 >--- a/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm >+++ b/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm >@@ -1376,6 +1376,8 @@ WebContentMode WebPageProxy::effectiveContentModeAfterAdjustingPolicies(API::Web > break; > } > >+ m_allowsFastClicksEverywhere = false; >+ > if (!useDesktopBrowsingMode) > return WebContentMode::Mobile; > >@@ -1397,6 +1399,7 @@ WebContentMode WebPageProxy::effectiveContentModeAfterAdjustingPolicies(API::Web > policies.setMediaSourcePolicy(WebsiteMediaSourcePolicy::Enable); > policies.setSimulatedMouseEventsDispatchPolicy(WebsiteSimulatedMouseEventsDispatchPolicy::Allow); > policies.setLegacyOverflowScrollingTouchPolicy(WebsiteLegacyOverflowScrollingTouchPolicy::Disable); >+ m_allowsFastClicksEverywhere = true; > } > > return WebContentMode::Desktop; >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 6ddc6634e50b9bf394e445e69979ed48b142dcce..1251a2e6a6875641e8ed34a101f692f8be1cdcc9 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,16 @@ >+2019-06-06 Antoine Quint <graouts@apple.com> >+ >+ Restrict fast clicks everywhere to desktop content mode >+ https://bugs.webkit.org/show_bug.cgi?id=198610 >+ <rdar://problem/50114230> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add a new test that enables fast clicks but also sets a mobile content mode. >+ >+ * 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. >+ > 2019-06-05 Takashi Komori <Takashi.Komori@sony.com> > > [Curl] Report all request headers to web inspector. >diff --git a/LayoutTests/fast/events/ios/ipad/fast-click-always-mobile-content-mode-expected.txt b/LayoutTests/fast/events/ios/ipad/fast-click-always-mobile-content-mode-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..d79b6fc4bd7eca0340644981a51f6640bec64582 >--- /dev/null >+++ b/LayoutTests/fast/events/ios/ipad/fast-click-always-mobile-content-mode-expected.txt >@@ -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, although fast click everywhere is set to false, the content mode is also set to mobile which disables fast click everywhere, so double tapping on the rectangle above should zoom. >diff --git a/LayoutTests/fast/events/ios/ipad/fast-click-always-mobile-content-mode.html b/LayoutTests/fast/events/ios/ipad/fast-click-always-mobile-content-mode.html >new file mode 100644 >index 0000000000000000000000000000000000000000..c43b8e8d31fb76dd163fb4bcba9684fcf190ed09 >--- /dev/null >+++ b/LayoutTests/fast/events/ios/ipad/fast-click-always-mobile-content-mode.html >@@ -0,0 +1,59 @@ >+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true contentMode=mobile 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="../../../../resources/ui-helper.js"></script> >+ <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, although fast click >+ everywhere is set to false, the content mode is also set to mobile which disables >+ fast click everywhere, so double tapping on the rectangle above should zoom.</div> >+</body> >+</html>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198610
: 371494