WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-195822-20190316085350.patch (text/plain), 7.36 KB, created by
Dean Jackson
on 2019-03-15 14:53:51 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Dean Jackson
Created:
2019-03-15 14:53:51 PDT
Size:
7.36 KB
patch
obsolete
>Subversion Revision: 242921 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 090ef9debceb612feb9247ddc4603e342a60350c..e251e0b1db24bc3438006b50e1af56d8e2409068 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,29 @@ >+2019-03-15 Dean Jackson <dino@apple.com> >+ >+ 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 NOBODY (OOPS!). >+ >+ 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 Dean Jackson <dino@apple.com> >+ >+ Provide an option for an always-on fast click mode in iOS >+ https://bugs.webkit.org/show_bug.cgi?id=195822 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Shared/WebPreferences.yaml: >+ * UIProcess/ios/WKContentViewInteraction.mm: >+ (-[WKContentView _handleSmartMagnificationInformationForPotentialTap:renderRect:fitEntireRect:viewportMinimumScale:viewportMaximumScale:]): >+ > 2019-03-13 Dean Jackson <dino@apple.com> > > Block all plugins smaller than 5x5px >diff --git a/Source/WebKit/Shared/WebPreferences.yaml b/Source/WebKit/Shared/WebPreferences.yaml >index 1245185f74a8397dd740d159d41a64145478e215..1689876b586325c3d2868296b0ccfa61e5a9c2ba 100644 >--- a/Source/WebKit/Shared/WebPreferences.yaml >+++ b/Source/WebKit/Shared/WebPreferences.yaml >@@ -1486,6 +1486,15 @@ FasterClicksEnabled: > 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 >diff --git a/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm b/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >index 7fc46a6f498d5b1411051248ae217a7f7ea771d1..0622ef77360e6d41ad33af9ffc162f0246725860 100644 >--- a/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >+++ b/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >@@ -1503,6 +1503,12 @@ static NSValue *nsSizeForTapHighlightBorderRadius(WebCore::IntSize borderRadius, > 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]; >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index b9858048443c5e974a49243ac363200c956f81a9..897b6e91463e0fa2f4e37d949aa2b2a3579b80d6 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,17 @@ >+2019-03-15 Dean Jackson <dino@apple.com> >+ >+ 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 NOBODY (OOPS!). >+ >+ 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-13 Dean Jackson <dino@apple.com> > > Block all plugins smaller than 5x5px >diff --git a/LayoutTests/fast/events/ios/ipad/fast-click-always-expected.txt b/LayoutTests/fast/events/ios/ipad/fast-click-always-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..5e17f44f32c1932886a14e64f586bf0903e25137 >--- /dev/null >+++ b/LayoutTests/fast/events/ios/ipad/fast-click-always-expected.txt >@@ -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. >diff --git a/LayoutTests/fast/events/ios/ipad/fast-click-always.html b/LayoutTests/fast/events/ios/ipad/fast-click-always.html >new file mode 100644 >index 0000000000000000000000000000000000000000..52e2819f8a7b3cf459c6892e5eeb61feb646502f >--- /dev/null >+++ b/LayoutTests/fast/events/ios/ipad/fast-click-always.html >@@ -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="../../../../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.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> >diff --git a/LayoutTests/fast/events/ios/ipad/fast-click-double-tap-sends-click-on-insignificant-zoom.html b/LayoutTests/fast/events/ios/ipad/fast-click-double-tap-sends-click-on-insignificant-zoom.html >index d34c22f5cc8701a07f9af8d912a91b155a73c2c6..f64251780079ea6305ada980427dc6e5b020b5a5 100644 >--- a/LayoutTests/fast/events/ios/ipad/fast-click-double-tap-sends-click-on-insignificant-zoom.html >+++ b/LayoutTests/fast/events/ios/ipad/fast-click-double-tap-sends-click-on-insignificant-zoom.html >@@ -12,7 +12,7 @@ > margin: 0; > } > </style> >- <script src="../../../resources/ui-helper.js"></script> >+ <script src="../../../../resources/ui-helper.js"></script> > <script> > if (window.testRunner) { > testRunner.dumpAsText();
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
Flags:
sam
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 195822
: 364849