Diff
Modified: trunk/LayoutTests/ChangeLog (281278 => 281279)
--- trunk/LayoutTests/ChangeLog 2021-08-19 23:13:51 UTC (rev 281278)
+++ trunk/LayoutTests/ChangeLog 2021-08-19 23:17:35 UTC (rev 281279)
@@ -1,3 +1,24 @@
+2021-08-19 Wenson Hsieh <[email protected]>
+
+ [iOS] Remove support for the meaningful tap heuristic
+ https://bugs.webkit.org/show_bug.cgi?id=229298
+ rdar://82130066
+
+ Reviewed by Tim Horton.
+
+ Remove all layout tests that exercised the meaningful tap heuristic.
+
+ * fast/events/ios/did-not-handle-meaningful-click-expected.txt: Removed.
+ * fast/events/ios/did-not-handle-meaningful-click.html: Removed.
+ * fast/events/ios/meaningful-click-when-focusing-body-expected.txt: Removed.
+ * fast/events/ios/meaningful-click-when-focusing-body.html: Removed.
+ * fast/events/ios/meaningful-click-when-playing-media-expected.txt: Removed.
+ * fast/events/ios/meaningful-click-when-playing-media.html: Removed.
+ * fast/events/ios/meaningful-click-when-tapping-draggable-content-expected.txt: Removed.
+ * fast/events/ios/meaningful-click-when-tapping-draggable-content.html: Removed.
+ * fast/events/ios/non-meaningful-click-when-tapping-document-expected.txt: Removed.
+ * fast/events/ios/non-meaningful-click-when-tapping-document.html: Removed.
+
2021-08-19 Andres Gonzalez <[email protected]>
Rename AccessibilityUIElement::setSelectedVisibleTextRange to setSelectedTextMarkerRange for naming consistency and maintainability.
Deleted: trunk/LayoutTests/fast/events/ios/did-not-handle-meaningful-click-expected.txt (281278 => 281279)
--- trunk/LayoutTests/fast/events/ios/did-not-handle-meaningful-click-expected.txt 2021-08-19 23:13:51 UTC (rev 281278)
+++ trunk/LayoutTests/fast/events/ios/did-not-handle-meaningful-click-expected.txt 2021-08-19 23:17:35 UTC (rev 281279)
@@ -1,17 +0,0 @@
-This test is intended to exercise the 'meaningful click' heuristic, and requires WebKitTestRunner.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-PASS didHandleTap is true
-PASS didHandleTapAsMeaningfulClick is false
-PASS clicked on button
-PASS didHandleTap is true
-PASS didHandleTapAsMeaningfulClick is true
-PASS didHandleTap is true
-PASS didHandleTapAsMeaningfulClick is false
-PASS didHandleTap is true
-PASS didHandleTapAsMeaningfulClick is true
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
Deleted: trunk/LayoutTests/fast/events/ios/did-not-handle-meaningful-click.html (281278 => 281279)
--- trunk/LayoutTests/fast/events/ios/did-not-handle-meaningful-click.html 2021-08-19 23:13:51 UTC (rev 281278)
+++ trunk/LayoutTests/fast/events/ios/did-not-handle-meaningful-click.html 2021-08-19 23:17:35 UTC (rev 281279)
@@ -1,68 +0,0 @@
-<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
-<html>
-<head>
-<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
-<style>
-body, html {
- font-size: 18px;
- font-family: system-ui;
- width: 100%;
- height: 100%;
- margin: 0;
-}
-</style>
-<script src=""
-<script src=""
-<script>
-jsTestIsAsync = true;
-
-addEventListener("load", async () => {
- description("This test is intended to exercise the 'meaningful click' heuristic, and requires WebKitTestRunner.");
-
- let text = document.getElementById("text");
- let button = document.getElementById("target");
-
- async function simulateTapAndCheckDidHandleTapAsMeaningfulClick(element, expectation) {
- didHandleTap = false;
- didHandleTapAsMeaningfulClick = false;
- testRunner.installDidHandleTapCallback(wasMeaningful => {
- didHandleTap = true;
- didHandleTapAsMeaningfulClick = wasMeaningful;
- });
-
- await UIHelper.activateElement(element);
- await UIHelper.waitForDoubleTapDelay();
- shouldBeTrue("didHandleTap");
- if (expectation)
- shouldBeTrue("didHandleTapAsMeaningfulClick");
- else
- shouldBeFalse("didHandleTapAsMeaningfulClick");
-
- testRunner.clearTestRunnerCallbacks();
- }
-
- await simulateTapAndCheckDidHandleTapAsMeaningfulClick(text, false);
- await simulateTapAndCheckDidHandleTapAsMeaningfulClick(button, true);
-
- document.body.addEventListener("click", () => { });
- await simulateTapAndCheckDidHandleTapAsMeaningfulClick(text, false);
-
- document.body.addEventListener("mousedown", (event) => {
- event.preventDefault();
- });
- await simulateTapAndCheckDidHandleTapAsMeaningfulClick(text, true);
-
- text.remove();
- button.remove();
-
- finishJSTest();
-});
-</script>
-</head>
-<body>
- <button id="target" _onclick_="testPassed('clicked on button'); event.stopPropagation();">Hello world</button>
- <p id="text">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean laoreet nisi felis, eu scelerisque dolor imperdiet in. Sed at porttitor purus, in placerat justo. Mauris at augue ac purus viverra molestie. Fusce ultrices ante at pellentesque lobortis. Sed pellentesque, ipsum eu semper mollis, arcu lectus dignissim enim, in maximus tortor ligula id ipsum. Nulla dignissim diam a mi tempor porta. Etiam tempor ac augue non dapibus. Donec euismod vel turpis in ultrices. Ut accumsan ultrices arcu vitae venenatis. In urna velit, accumsan sit amet arcu vel, vestibulum pulvinar leo. Aliquam vulputate euismod ultrices. Sed congue vestibulum libero quis ornare.</p>
- <div id="description"></div>
- <div id="console"></div>
-</body>
-</html>
\ No newline at end of file
Deleted: trunk/LayoutTests/fast/events/ios/meaningful-click-when-focusing-body-expected.txt (281278 => 281279)
--- trunk/LayoutTests/fast/events/ios/meaningful-click-when-focusing-body-expected.txt 2021-08-19 23:13:51 UTC (rev 281278)
+++ trunk/LayoutTests/fast/events/ios/meaningful-click-when-focusing-body-expected.txt 2021-08-19 23:17:35 UTC (rev 281279)
@@ -1,13 +0,0 @@
-This test exercises the 'meaningful click' heuristic in an editable body element, and requires WebKitTestRunner.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-PASS Focused body element
-PASS didHandleTap is true
-PASS didHandleTapAsMeaningfulClick is true
-PASS Tapped inside body element
-PASS didHandleTapAsMeaningfulClick is true
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
Deleted: trunk/LayoutTests/fast/events/ios/meaningful-click-when-focusing-body.html (281278 => 281279)
--- trunk/LayoutTests/fast/events/ios/meaningful-click-when-focusing-body.html 2021-08-19 23:13:51 UTC (rev 281278)
+++ trunk/LayoutTests/fast/events/ios/meaningful-click-when-focusing-body.html 2021-08-19 23:17:35 UTC (rev 281279)
@@ -1,59 +0,0 @@
-<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
-<html>
-<head>
-<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
-<style>
-body, html {
- font-size: 18px;
- font-family: system-ui;
- width: 100%;
- height: 100%;
- margin: 0;
-}
-</style>
-<script src=""
-<script src=""
-<script>
-jsTestIsAsync = true;
-
-addEventListener("load", async () => {
- description("This test exercises the 'meaningful click' heuristic in an editable body element, and requires WebKitTestRunner.");
-
- didHandleTap = false;
- didHandleTapAsMeaningfulClick = false;
- testRunner.installDidHandleTapCallback(wasMeaningful => {
- didHandleTap = true;
- didHandleTapAsMeaningfulClick = wasMeaningful;
- });
-
- await UIHelper.activateElementAndWaitForInputSession(document.body);
- await UIHelper.waitForDoubleTapDelay();
- testPassed("Focused body element");
- shouldBeTrue("didHandleTap");
- shouldBeTrue("didHandleTapAsMeaningfulClick");
-
- testRunner.clearTestRunnerCallbacks();
- didHandleTap = false;
- didHandleTapAsMeaningfulClick = false;
- testRunner.installDidHandleTapCallback(wasMeaningful => {
- didHandleTap = true;
- didHandleTapAsMeaningfulClick = wasMeaningful;
- });
-
- await UIHelper.activateAt(100, 100);
- await UIHelper.waitForDoubleTapDelay();
- testPassed("Tapped inside body element");
- shouldBeTrue("didHandleTapAsMeaningfulClick");
-
- testRunner.clearTestRunnerCallbacks();
- document.getElementById("text").remove();
- finishJSTest();
-});
-</script>
-</head>
-<body contenteditable>
- <p id="text">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean laoreet nisi felis, eu scelerisque dolor imperdiet in. Sed at porttitor purus, in placerat justo. Mauris at augue ac purus viverra molestie. Fusce ultrices ante at pellentesque lobortis. Sed pellentesque, ipsum eu semper mollis, arcu lectus dignissim enim, in maximus tortor ligula id ipsum. Nulla dignissim diam a mi tempor porta. Etiam tempor ac augue non dapibus. Donec euismod vel turpis in ultrices. Ut accumsan ultrices arcu vitae venenatis. In urna velit, accumsan sit amet arcu vel, vestibulum pulvinar leo. Aliquam vulputate euismod ultrices. Sed congue vestibulum libero quis ornare.</p>
- <div id="description"></div>
- <div id="console"></div>
-</body>
-</html>
\ No newline at end of file
Deleted: trunk/LayoutTests/fast/events/ios/meaningful-click-when-playing-media-expected.txt (281278 => 281279)
--- trunk/LayoutTests/fast/events/ios/meaningful-click-when-playing-media-expected.txt 2021-08-19 23:13:51 UTC (rev 281278)
+++ trunk/LayoutTests/fast/events/ios/meaningful-click-when-playing-media-expected.txt 2021-08-19 23:17:35 UTC (rev 281279)
@@ -1,14 +0,0 @@
-This test exercises the 'meaningful click' heuristic when playing or pausing a video, and requires WebKitTestRunner.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-PASS didPlayVideo became true
-PASS didHandleTap is true
-PASS didHandleTapAsMeaningfulClick is true
-PASS didPauseVideo became true
-PASS didHandleTap is true
-PASS didHandleTapAsMeaningfulClick is true
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
Deleted: trunk/LayoutTests/fast/events/ios/meaningful-click-when-playing-media.html (281278 => 281279)
--- trunk/LayoutTests/fast/events/ios/meaningful-click-when-playing-media.html 2021-08-19 23:13:51 UTC (rev 281278)
+++ trunk/LayoutTests/fast/events/ios/meaningful-click-when-playing-media.html 2021-08-19 23:17:35 UTC (rev 281279)
@@ -1,64 +0,0 @@
-<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
-<html>
-<head>
-<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
-<style>
-body, html {
- font-size: 18px;
- font-family: system-ui;
- width: 100%;
- height: 100%;
- margin: 0;
-}
-</style>
-<script src=""
-<script src=""
-<script>
-jsTestIsAsync = true;
-didPauseVideo = false;
-didPlayVideo = false;
-
-addEventListener("load", async () => {
- description("This test exercises the 'meaningful click' heuristic when playing or pausing a video, and requires WebKitTestRunner.");
- document.body.addEventListener("click", async () => {
- const video = document.querySelector("video");
- if (video.paused) {
- await video.play();
- didPlayVideo = true;
- } else {
- await video.pause();
- didPauseVideo = true;
- }
- });
-
- if (!window.testRunner)
- return;
-
- async function simulateTap(shouldPlay) {
- didHandleTap = false;
- didHandleTapAsMeaningfulClick = false;
- testRunner.installDidHandleTapCallback(wasMeaningful => {
- didHandleTap = true;
- didHandleTapAsMeaningfulClick = wasMeaningful;
- });
-
- await UIHelper.activateElement(document.body);
- await UIHelper.waitForDoubleTapDelay();
- await new Promise(resolve => shouldBecomeEqual(shouldPlay ? "didPlayVideo" : "didPauseVideo", "true", resolve));
- shouldBeTrue("didHandleTap");
- shouldBeTrue("didHandleTapAsMeaningfulClick");
- testRunner.clearTestRunnerCallbacks();
- }
-
- await simulateTap(true);
- await simulateTap(false);
- finishJSTest();
-});
-</script>
-</head>
-<body>
- <div id="description"></div>
- <div id="console"></div>
- <video loop src=""
-</body>
-</html>
\ No newline at end of file
Deleted: trunk/LayoutTests/fast/events/ios/meaningful-click-when-tapping-draggable-content-expected.txt (281278 => 281279)
--- trunk/LayoutTests/fast/events/ios/meaningful-click-when-tapping-draggable-content-expected.txt 2021-08-19 23:13:51 UTC (rev 281278)
+++ trunk/LayoutTests/fast/events/ios/meaningful-click-when-tapping-draggable-content-expected.txt 2021-08-19 23:17:35 UTC (rev 281279)
@@ -1,12 +0,0 @@
-This test exercises the 'meaningful click' heuristic when tapping draggable content.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-PASS didHandleTap became true
-PASS didHandleTapAsMeaningfulClick is true
-PASS didHandleTap became true
-PASS didHandleTapAsMeaningfulClick is false
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
Deleted: trunk/LayoutTests/fast/events/ios/meaningful-click-when-tapping-draggable-content.html (281278 => 281279)
--- trunk/LayoutTests/fast/events/ios/meaningful-click-when-tapping-draggable-content.html 2021-08-19 23:13:51 UTC (rev 281278)
+++ trunk/LayoutTests/fast/events/ios/meaningful-click-when-tapping-draggable-content.html 2021-08-19 23:17:35 UTC (rev 281279)
@@ -1,66 +0,0 @@
-<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
-<html>
-<head>
-<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
-<style>
-body, html {
- font-size: 18px;
- font-family: system-ui;
- width: 100%;
- height: 100%;
- margin: 0;
-}
-
-#target {
- width: 100%;
- height: 100%;
- background-color: silver;
-}
-</style>
-<script src=""
-<script src=""
-<script>
-jsTestIsAsync = true;
-
-addEventListener("load", async () => {
- description("This test exercises the 'meaningful click' heuristic when tapping draggable content.");
-
- if (!window.testRunner)
- return;
-
- const target = document.getElementById("target");
- target.addEventListener("mousedown", () => { });
-
- async function simulateTap(expectMeaningfulClick) {
- didHandleTap = false;
- didHandleTapAsMeaningfulClick = false;
- testRunner.installDidHandleTapCallback(wasMeaningful => {
- didHandleTap = true;
- didHandleTapAsMeaningfulClick = wasMeaningful;
- });
-
- await UIHelper.activateElement(target);
- await shouldBecomeEqual("didHandleTap", "true");
- if (expectMeaningfulClick)
- shouldBeTrue("didHandleTapAsMeaningfulClick");
- else
- shouldBeFalse("didHandleTapAsMeaningfulClick");
- testRunner.clearTestRunnerCallbacks();
- await UIHelper.waitForDoubleTapDelay();
- }
-
- await simulateTap(true);
-
- target.removeAttribute("draggable");
- await simulateTap(false);
-
- finishJSTest();
-});
-</script>
-</head>
-<body>
- <div id="description"></div>
- <div id="console"></div>
- <div id="target" draggable="true"></div>
-</body>
-</html>
\ No newline at end of file
Deleted: trunk/LayoutTests/fast/events/ios/non-meaningful-click-when-tapping-document-expected.txt (281278 => 281279)
--- trunk/LayoutTests/fast/events/ios/non-meaningful-click-when-tapping-document-expected.txt 2021-08-19 23:13:51 UTC (rev 281278)
+++ trunk/LayoutTests/fast/events/ios/non-meaningful-click-when-tapping-document-expected.txt 2021-08-19 23:17:35 UTC (rev 281279)
@@ -1,11 +0,0 @@
-This test exercises the 'meaningful click' heuristic when dispatching clicks on the document node, and requires WebKitTestRunner.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-PASS didDispatchClick became true
-PASS didHandleTap became true
-PASS didHandleTapAsMeaningfulClick is false
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
Deleted: trunk/LayoutTests/fast/events/ios/non-meaningful-click-when-tapping-document.html (281278 => 281279)
--- trunk/LayoutTests/fast/events/ios/non-meaningful-click-when-tapping-document.html 2021-08-19 23:13:51 UTC (rev 281278)
+++ trunk/LayoutTests/fast/events/ios/non-meaningful-click-when-tapping-document.html 2021-08-19 23:17:35 UTC (rev 281279)
@@ -1,48 +0,0 @@
-<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
-<html>
-<head>
-<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
-<style>
-body, html {
- width: 100%;
- height: 100%;
-}
-</style>
-<script src=""
-<script src=""
-<script>
-jsTestIsAsync = true;
-
-addEventListener("load", async () => {
- description("This test exercises the 'meaningful click' heuristic when dispatching clicks on the document node, and requires WebKitTestRunner.");
- if (!window.testRunner)
- return;
-
- didHandleTap = false;
- didHandleTapAsMeaningfulClick = false;
- testRunner.installDidHandleTapCallback(wasMeaningful => {
- didHandleTap = true;
- didHandleTapAsMeaningfulClick = wasMeaningful;
- });
-
- didDispatchClick = false;
- document.addEventListener("click", () => {
- didDispatchClick = true;
- });
-
- await UIHelper.activateAt(100, 100);
- await UIHelper.waitForDoubleTapDelay();
- await new Promise(resolve => shouldBecomeEqual("didDispatchClick", "true", resolve));
- await new Promise(resolve => shouldBecomeEqual("didHandleTap", "true", resolve));
- shouldBeFalse("didHandleTapAsMeaningfulClick");
-
- testRunner.clearTestRunnerCallbacks();
- finishJSTest();
-});
-</script>
-</head>
-<body>
- <div id="description"></div>
- <div id="console"></div>
-</body>
-</html>
\ No newline at end of file
Modified: trunk/Source/WebCore/ChangeLog (281278 => 281279)
--- trunk/Source/WebCore/ChangeLog 2021-08-19 23:13:51 UTC (rev 281278)
+++ trunk/Source/WebCore/ChangeLog 2021-08-19 23:17:35 UTC (rev 281279)
@@ -1,3 +1,20 @@
+2021-08-19 Wenson Hsieh <[email protected]>
+
+ [iOS] Remove support for the meaningful tap heuristic
+ https://bugs.webkit.org/show_bug.cgi?id=229298
+ rdar://82130066
+
+ Reviewed by Tim Horton.
+
+ See WebKit ChangeLog for more details.
+
+ * page/ChromeClient.h:
+ (WebCore::ChromeClient::didHandleOrPreventMouseDownOrMouseUpEvent): Deleted.
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::handleMousePressEvent):
+ (WebCore::EventHandler::handleMouseDoubleClickEvent):
+ (WebCore::EventHandler::handleMouseReleaseEvent):
+
2021-08-19 Alan Bujtas <[email protected]>
[Line layout] "zero width space" (U+200B) is a breaking space
Modified: trunk/Source/WebCore/page/ChromeClient.h (281278 => 281279)
--- trunk/Source/WebCore/page/ChromeClient.h 2021-08-19 23:13:51 UTC (rev 281278)
+++ trunk/Source/WebCore/page/ChromeClient.h 2021-08-19 23:17:35 UTC (rev 281279)
@@ -271,8 +271,6 @@
virtual void didPreventDefaultForEvent() = 0;
#endif
- virtual void didHandleOrPreventMouseDownOrMouseUpEvent() { }
-
virtual Seconds eventThrottlingDelay() { return 0_s; };
#if PLATFORM(IOS_FAMILY)
Modified: trunk/Source/WebCore/page/EventHandler.cpp (281278 => 281279)
--- trunk/Source/WebCore/page/EventHandler.cpp 2021-08-19 23:13:51 UTC (rev 281278)
+++ trunk/Source/WebCore/page/EventHandler.cpp 2021-08-19 23:17:35 UTC (rev 281279)
@@ -1778,8 +1778,6 @@
m_frame.selection().setCaretBlinkingSuspended(true);
bool swallowEvent = !dispatchMouseEvent(eventNames().mousedownEvent, mouseEvent.targetNode(), m_clickCount, platformMouseEvent, FireMouseOverOut::Yes);
- if (auto page = m_frame.page(); page && swallowEvent)
- page->chrome().client().didHandleOrPreventMouseDownOrMouseUpEvent();
m_capturesDragging = !swallowEvent || mouseEvent.scrollbar();
// If the hit testing originally determined the event was in a scrollbar, refetch the MouseEventWithHitTestResults
@@ -1842,9 +1840,6 @@
m_clickCount = platformMouseEvent.clickCount();
bool swallowMouseUpEvent = !dispatchMouseEvent(eventNames().mouseupEvent, mouseEvent.targetNode(), m_clickCount, platformMouseEvent, FireMouseOverOut::No);
- if (auto page = m_frame.page(); page && swallowMouseUpEvent)
- page->chrome().client().didHandleOrPreventMouseDownOrMouseUpEvent();
-
bool swallowClickEvent = platformMouseEvent.button() != RightButton && mouseEvent.targetNode() == m_clickNode && !dispatchMouseEvent(eventNames().clickEvent, mouseEvent.targetNode(), m_clickCount, platformMouseEvent, FireMouseOverOut::Yes);
if (m_lastScrollbarUnderMouse)
@@ -2148,9 +2143,6 @@
return true;
bool swallowMouseUpEvent = !dispatchMouseEvent(eventNames().mouseupEvent, mouseEvent.targetNode(), m_clickCount, platformMouseEvent, FireMouseOverOut::No);
- if (auto page = m_frame.page(); page && swallowMouseUpEvent)
- page->chrome().client().didHandleOrPreventMouseDownOrMouseUpEvent();
-
bool contextMenuEvent = platformMouseEvent.button() == RightButton;
auto nodeToClick = targetNodeForClickEvent(m_clickNode.get(), mouseEvent.targetNode());
Modified: trunk/Source/WebKit/ChangeLog (281278 => 281279)
--- trunk/Source/WebKit/ChangeLog 2021-08-19 23:13:51 UTC (rev 281278)
+++ trunk/Source/WebKit/ChangeLog 2021-08-19 23:17:35 UTC (rev 281279)
@@ -1,3 +1,57 @@
+2021-08-19 Wenson Hsieh <[email protected]>
+
+ [iOS] Remove support for the meaningful tap heuristic
+ https://bugs.webkit.org/show_bug.cgi?id=229298
+ rdar://82130066
+
+ Reviewed by Tim Horton.
+
+ Remove all support for the meaningful tap heuristic, which was used to allow users to toggle tab pill visibility
+ in earlier versions of the Safari redesign. As of the latest iOS 15 beta, this heuristic is no longer necessary,
+ so we don't need this SPI support anymore.
+
+ * UIProcess/API/APIUIClient.h:
+ (API::UIClient::didNotHandleTapAsClick):
+ (API::UIClient::didTapAtPoint): Deleted.
+ * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
+ * UIProcess/API/ios/WKWebViewPrivateForTestingIOS.h:
+ * UIProcess/API/ios/WKWebViewTestingIOS.mm:
+ (-[WKWebView _didTapAtPoint:withResult:]): Deleted.
+ * UIProcess/Cocoa/UIDelegate.h:
+ * UIProcess/Cocoa/UIDelegate.mm:
+ (WebKit::UIDelegate::setDelegate):
+ (WebKit::UIDelegate::UIClient::didTapAtPoint): Deleted.
+ * UIProcess/PageClient.h:
+ * UIProcess/WebPageProxy.h:
+ * UIProcess/WebPageProxy.messages.in:
+ * UIProcess/ios/PageClientImplIOS.h:
+ * UIProcess/ios/PageClientImplIOS.mm:
+ (WebKit::PageClientImpl::didTapAtPoint): Deleted.
+ * UIProcess/ios/WebPageProxyIOS.mm:
+ (WebKit::WebPageProxy::didTapAtPoint): Deleted.
+ * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+ (WebKit::WebChromeClient::didHandleOrPreventMouseDownOrMouseUpEvent): Deleted.
+ * WebProcess/WebCoreSupport/WebChromeClient.h:
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::isPlayingMediaDidChange):
+ * WebProcess/WebPage/WebPage.h:
+
+ Drive-by fix: initialize `m_appHighlightsVisible` using the correct type.
+
+ (WebKit::WebPage::platformNeedsLayoutForEditorState const):
+ (WebKit::WebPage::prepareToRunModalJavaScriptDialog):
+ (WebKit::WebPage::didHandleOrPreventMouseDownOrMouseUpEvent): Deleted.
+ (WebKit::WebPage::platformIsPlayingMediaDidChange): Deleted.
+ * WebProcess/WebPage/ios/WebPageIOS.mm:
+ (WebKit::WebPage::completeSyntheticClick):
+ (WebKit::WebPage::attemptSyntheticClick):
+ (WebKit::WebPage::handleTwoFingerTapAtPoint):
+ (WebKit::WebPage::commitPotentialTapFailed):
+ (WebKit::WebPage::clearSelectionAfterTapIfNeeded):
+ (WebKit::isProbablyMeaningfulClick): Deleted.
+ (WebKit::WebPage::didHandleOrPreventMouseDownOrMouseUpEvent): Deleted.
+ (WebKit::WebPage::platformIsPlayingMediaDidChange): Deleted.
+
2021-08-19 Aditya Keerthi <[email protected]>
Remove __has_include guard for _UIDatePickerOverlayPresentation
Modified: trunk/Source/WebKit/UIProcess/API/APIUIClient.h (281278 => 281279)
--- trunk/Source/WebKit/UIProcess/API/APIUIClient.h 2021-08-19 23:13:51 UTC (rev 281278)
+++ trunk/Source/WebKit/UIProcess/API/APIUIClient.h 2021-08-19 23:17:35 UTC (rev 281279)
@@ -164,7 +164,6 @@
#endif
virtual RetainPtr<NSArray> actionsForElement(_WKActivatedElementInfo *, RetainPtr<NSArray> defaultActions) { return defaultActions; }
virtual void didNotHandleTapAsClick(const WebCore::IntPoint&) { }
- virtual void didTapAtPoint(const WebCore::IntPoint&, WebKit::TapHandlingResult) { }
virtual UIViewController *presentingViewController() { return nullptr; }
#endif
#if PLATFORM(COCOA)
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h (281278 => 281279)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h 2021-08-19 23:13:51 UTC (rev 281278)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h 2021-08-19 23:17:35 UTC (rev 281279)
@@ -165,7 +165,6 @@
- (BOOL)_webView:(WKWebView *)webView shouldIncludeAppLinkActionsForElement:(_WKActivatedElementInfo *)element WK_API_AVAILABLE(ios(9.0));
- (NSArray *)_webView:(WKWebView *)webView actionsForElement:(_WKActivatedElementInfo *)element defaultActions:(NSArray<_WKElementAction *> *)defaultActions;
- (void)_webView:(WKWebView *)webView didNotHandleTapAsClickAtPoint:(CGPoint)point;
-- (void)_webView:(WKWebView *)webView didTapAtPoint:(CGPoint)point withResult:(_WKTapHandlingResult)result WK_API_AVAILABLE(ios(15.0));
- (void)_webView:(WKWebView *)webView requestGeolocationAuthorizationForURL:(NSURL *)url frame:(WKFrameInfo *)frame decisionHandler:(void (^)(BOOL authorized))decisionHandler WK_API_AVAILABLE(ios(11.0));
- (BOOL)_webView:(WKWebView *)webView fileUploadPanelContentIsManagedWithInitiatingFrame:(WKFrameInfo *)frame;
Modified: trunk/Source/WebKit/UIProcess/API/ios/WKWebViewPrivateForTestingIOS.h (281278 => 281279)
--- trunk/Source/WebKit/UIProcess/API/ios/WKWebViewPrivateForTestingIOS.h 2021-08-19 23:13:51 UTC (rev 281278)
+++ trunk/Source/WebKit/UIProcess/API/ios/WKWebViewPrivateForTestingIOS.h 2021-08-19 23:17:35 UTC (rev 281279)
@@ -68,8 +68,6 @@
- (void)_didFinishTextInteractionInTextInputContext:(_WKTextInputContext *)context;
- (void)_requestDocumentContext:(UIWKDocumentRequest *)request completionHandler:(void (^)(UIWKDocumentContext *))completionHandler;
- (void)_adjustSelectionWithDelta:(NSRange)deltaRange completionHandler:(void (^)(void))completionHandler;
-- (void)_didTapAtPoint:(CGPoint)point withResult:(_WKTapHandlingResult)result;
-
- (void)setTimePickerValueToHour:(NSInteger)hour minute:(NSInteger)minute;
- (double)timePickerValueHour;
- (double)timePickerValueMinute;
Modified: trunk/Source/WebKit/UIProcess/API/ios/WKWebViewTestingIOS.mm (281278 => 281279)
--- trunk/Source/WebKit/UIProcess/API/ios/WKWebViewTestingIOS.mm 2021-08-19 23:13:51 UTC (rev 281278)
+++ trunk/Source/WebKit/UIProcess/API/ios/WKWebViewTestingIOS.mm 2021-08-19 23:17:35 UTC (rev 281279)
@@ -100,11 +100,6 @@
#endif
}
-- (void)_didTapAtPoint:(CGPoint)point withResult:(_WKTapHandlingResult)result
-{
- // For subclasses to override.
-}
-
- (BOOL)_mayContainEditableElementsInRect:(CGRect)rect
{
#if ENABLE(EDITABLE_REGION)
Modified: trunk/Source/WebKit/UIProcess/Cocoa/UIDelegate.h (281278 => 281279)
--- trunk/Source/WebKit/UIProcess/Cocoa/UIDelegate.h 2021-08-19 23:13:51 UTC (rev 281278)
+++ trunk/Source/WebKit/UIProcess/Cocoa/UIDelegate.h 2021-08-19 23:17:35 UTC (rev 281279)
@@ -149,7 +149,6 @@
#endif
RetainPtr<NSArray> actionsForElement(_WKActivatedElementInfo *, RetainPtr<NSArray> defaultActions) final;
void didNotHandleTapAsClick(const WebCore::IntPoint&) final;
- void didTapAtPoint(const WebCore::IntPoint&, WebKit::TapHandlingResult) final;
UIViewController *presentingViewController() final;
#endif // PLATFORM(IOS_FAMILY)
@@ -243,7 +242,6 @@
#endif
bool webViewActionsForElementDefaultActions : 1;
bool webViewDidNotHandleTapAsClickAtPoint : 1;
- bool webViewDidTapAtPointWithResult : 1;
bool presentingViewControllerForWebView : 1;
#endif
bool dataDetectionContextForWebView : 1;
Modified: trunk/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm (281278 => 281279)
--- trunk/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm 2021-08-19 23:13:51 UTC (rev 281278)
+++ trunk/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm 2021-08-19 23:17:35 UTC (rev 281279)
@@ -159,7 +159,6 @@
#endif
m_delegateMethods.webViewActionsForElementDefaultActions = [delegate respondsToSelector:@selector(_webView:actionsForElement:defaultActions:)];
m_delegateMethods.webViewDidNotHandleTapAsClickAtPoint = [delegate respondsToSelector:@selector(_webView:didNotHandleTapAsClickAtPoint:)];
- m_delegateMethods.webViewDidTapAtPointWithResult = [delegate respondsToSelector:@selector(_webView:didTapAtPoint:withResult:)];
m_delegateMethods.presentingViewControllerForWebView = [delegate respondsToSelector:@selector(_presentingViewControllerForWebView:)];
#endif
m_delegateMethods.webViewIsMediaCaptureAuthorizedForFrameDecisionHandler = [delegate respondsToSelector:@selector(_webView:checkUserMediaPermissionForURL:mainFrameURL:frameIdentifier:decisionHandler:)] || [delegate respondsToSelector:@selector(_webView:includeSensitiveMediaDeviceDetails:)];
@@ -1414,19 +1413,6 @@
[static_cast<id <WKUIDelegatePrivate>>(delegate) _webView:m_uiDelegate->m_webView.get().get() didNotHandleTapAsClickAtPoint:point];
}
-void UIDelegate::UIClient::didTapAtPoint(const WebCore::IntPoint& point, WebKit::TapHandlingResult result)
-{
- if (!m_uiDelegate)
- return;
-
- auto delegate = m_uiDelegate->m_delegate.get();
- if (!delegate)
- return;
-
- if (m_uiDelegate->m_delegateMethods.webViewDidTapAtPointWithResult)
- [static_cast<id <WKUIDelegatePrivate>>(delegate) _webView:m_uiDelegate->m_webView.get().get() didTapAtPoint:point withResult:wkTapHandlingResult(result)];
-}
-
UIViewController *UIDelegate::UIClient::presentingViewController()
{
if (!m_uiDelegate)
Modified: trunk/Source/WebKit/UIProcess/PageClient.h (281278 => 281279)
--- trunk/Source/WebKit/UIProcess/PageClient.h 2021-08-19 23:13:51 UTC (rev 281278)
+++ trunk/Source/WebKit/UIProcess/PageClient.h 2021-08-19 23:17:35 UTC (rev 281279)
@@ -339,7 +339,6 @@
#endif
#if PLATFORM(IOS_FAMILY)
virtual void didNotHandleTapAsClick(const WebCore::IntPoint&) = 0;
- virtual void didTapAtPoint(const WebCore::IntPoint&, TapHandlingResult) = 0;
virtual void didCompleteSyntheticClick() = 0;
#endif
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.h (281278 => 281279)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.h 2021-08-19 23:13:51 UTC (rev 281278)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.h 2021-08-19 23:17:35 UTC (rev 281279)
@@ -850,7 +850,6 @@
void applicationWillEnterForegroundForMedia();
void commitPotentialTapFailed();
void didNotHandleTapAsClick(const WebCore::IntPoint&);
- void didTapAtPoint(const WebCore::IntPoint&, TapHandlingResult);
void didCompleteSyntheticClick();
void disableDoubleTapGesturesDuringTapIfNecessary(WebKit::TapIdentifier);
void handleSmartMagnificationInformationForPotentialTap(WebKit::TapIdentifier, const WebCore::FloatRect& renderRect, bool fitEntireRect, double viewportMinimumScale, double viewportMaximumScale, bool nodeIsRootLevel);
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.messages.in (281278 => 281279)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.messages.in 2021-08-19 23:13:51 UTC (rev 281278)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.messages.in 2021-08-19 23:17:35 UTC (rev 281279)
@@ -170,7 +170,6 @@
ShowPlaybackTargetPicker(bool hasVideo, WebCore::IntRect elementRect, enum:uint8_t WebCore::RouteSharingPolicy policy, String routingContextUID)
CommitPotentialTapFailed()
DidNotHandleTapAsClick(WebCore::IntPoint point)
- DidTapAtPoint(WebCore::IntPoint point, enum:uint8_t WebKit::TapHandlingResult result)
DidCompleteSyntheticClick()
DisableDoubleTapGesturesDuringTapIfNecessary(WebKit::TapIdentifier requestID)
HandleSmartMagnificationInformationForPotentialTap(WebKit::TapIdentifier requestID, WebCore::FloatRect renderRect, bool fitEntireRect, double viewportMinimumScale, double viewportMaximumScale, bool nodeIsRootLevel)
Modified: trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.h (281278 => 281279)
--- trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.h 2021-08-19 23:13:51 UTC (rev 281278)
+++ trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.h 2021-08-19 23:17:35 UTC (rev 281279)
@@ -248,7 +248,6 @@
void didFailNavigation(API::Navigation*) override;
void didSameDocumentNavigationForMainFrame(SameDocumentNavigationType) override;
void didNotHandleTapAsClick(const WebCore::IntPoint&) override;
- void didTapAtPoint(const WebCore::IntPoint&, TapHandlingResult) final;
void didCompleteSyntheticClick() override;
void runModalJavaScriptDialog(CompletionHandler<void()>&& callback) final;
Modified: trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm (281278 => 281279)
--- trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm 2021-08-19 23:13:51 UTC (rev 281278)
+++ trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm 2021-08-19 23:17:35 UTC (rev 281279)
@@ -234,11 +234,6 @@
[m_contentView _didNotHandleTapAsClick:point];
}
-void PageClientImpl::didTapAtPoint(const WebCore::IntPoint& point, TapHandlingResult result)
-{
- [m_webView _didTapAtPoint:point withResult:wkTapHandlingResult(result)];
-}
-
void PageClientImpl::didCompleteSyntheticClick()
{
[m_contentView _didCompleteSyntheticClick];
Modified: trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm (281278 => 281279)
--- trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm 2021-08-19 23:13:51 UTC (rev 281278)
+++ trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm 2021-08-19 23:17:35 UTC (rev 281279)
@@ -1004,12 +1004,6 @@
m_uiClient->didNotHandleTapAsClick(point);
}
-void WebPageProxy::didTapAtPoint(const WebCore::IntPoint& point, TapHandlingResult result)
-{
- pageClient().didTapAtPoint(point, result);
- m_uiClient->didTapAtPoint(point, result);
-}
-
void WebPageProxy::didCompleteSyntheticClick()
{
pageClient().didCompleteSyntheticClick();
Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp (281278 => 281279)
--- trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp 2021-08-19 23:13:51 UTC (rev 281278)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp 2021-08-19 23:17:35 UTC (rev 281279)
@@ -1520,11 +1520,6 @@
}
#endif
-void WebChromeClient::didHandleOrPreventMouseDownOrMouseUpEvent()
-{
- m_page.didHandleOrPreventMouseDownOrMouseUpEvent();
-}
-
#if HAVE(ARKIT_INLINE_PREVIEW_IOS)
void WebChromeClient::takeModelElementFullscreen(WebCore::GraphicsLayer::PlatformLayerID contentLayerId) const
{
Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h (281278 => 281279)
--- trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h 2021-08-19 23:13:51 UTC (rev 281278)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h 2021-08-19 23:17:35 UTC (rev 281279)
@@ -166,8 +166,6 @@
void didPreventDefaultForEvent() final;
#endif
- void didHandleOrPreventMouseDownOrMouseUpEvent() final;
-
#if PLATFORM(IOS_FAMILY)
void didReceiveMobileDocType(bool) final;
void setNeedsScrollNotifications(WebCore::Frame&, bool) final;
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp (281278 => 281279)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2021-08-19 23:13:51 UTC (rev 281278)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2021-08-19 23:17:35 UTC (rev 281279)
@@ -7406,7 +7406,6 @@
void WebPage::isPlayingMediaDidChange(WebCore::MediaProducer::MediaStateFlags state)
{
- platformIsPlayingMediaDidChange();
send(Messages::WebPageProxy::IsPlayingMediaDidChange(state));
}
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.h (281278 => 281279)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.h 2021-08-19 23:13:51 UTC (rev 281278)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.h 2021-08-19 23:17:35 UTC (rev 281279)
@@ -72,6 +72,7 @@
#include <WebCore/FrameLoaderTypes.h>
#include <WebCore/HTMLMenuElement.h>
#include <WebCore/HTMLMenuItemElement.h>
+#include <WebCore/HighlightVisibility.h>
#include <WebCore/IntRect.h>
#include <WebCore/IntSizeHash.h>
#include <WebCore/MediaControlsContextMenuItem.h>
@@ -223,7 +224,6 @@
enum class DragHandlingMethod : uint8_t;
enum class EventMakesGamepadsVisible : bool;
enum class HighlightRequestOriginatedInApp : bool;
-enum class HighlightVisibility : bool;
enum class SelectionDirection : uint8_t;
enum class ShouldTreatAsContinuingLoad : bool;
enum class TextIndicatorPresentationTransition : uint8_t;
@@ -1479,7 +1479,6 @@
void modelElementPreviewDidObtainContextId(const WebCore::ElementContext&, const String&, uint32_t);
#endif
- void didHandleOrPreventMouseDownOrMouseUpEvent();
void prepareToRunModalJavaScriptDialog();
private:
@@ -1527,6 +1526,7 @@
RefPtr<ShareableBitmap> shareableBitmapSnapshotForNode(WebCore::Element&);
WebAutocorrectionContext autocorrectionContext();
bool applyAutocorrectionInternal(const String& correction, const String& originalText);
+ void clearSelectionAfterTapIfNeeded();
#endif
#if ENABLE(META_VIEWPORT)
@@ -1917,8 +1917,6 @@
void consumeNetworkExtensionSandboxExtensions(const Vector<SandboxExtension::Handle>&);
- void platformIsPlayingMediaDidChange();
-
bool hasPendingEditorStateUpdate() const;
WebCore::PageIdentifier m_identifier;
@@ -2216,7 +2214,6 @@
WebCore::FloatPoint m_potentialTapLocation;
RefPtr<WebCore::SecurityOrigin> m_potentialTapSecurityOrigin;
- bool m_currentSyntheticClickMayNotBeMeaningful { true };
bool m_hasReceivedVisibleContentRectsAfterDidCommitLoad { false };
bool m_hasRestoredExposedContentRectAfterDidCommitLoad { false };
bool m_scaleWasSetByUIProcess { false };
@@ -2379,7 +2376,7 @@
#endif
#if ENABLE(APP_HIGHLIGHTS)
- WebCore::HighlightVisibility m_appHighlightsVisible { false };
+ WebCore::HighlightVisibility m_appHighlightsVisible { WebCore::HighlightVisibility::Hidden };
#endif
bool m_needsSiteSpecificViewportQuirks { true };
@@ -2388,9 +2385,7 @@
#if !PLATFORM(IOS_FAMILY)
inline void WebPage::platformWillPerformEditingCommand() { }
inline bool WebPage::platformNeedsLayoutForEditorState(const WebCore::Frame&) const { return false; }
-inline void WebPage::didHandleOrPreventMouseDownOrMouseUpEvent() { }
inline void WebPage::prepareToRunModalJavaScriptDialog() { }
-inline void WebPage::platformIsPlayingMediaDidChange() { }
#endif
} // namespace WebKit
Modified: trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm (281278 => 281279)
--- trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm 2021-08-19 23:13:51 UTC (rev 281278)
+++ trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm 2021-08-19 23:17:35 UTC (rev 281279)
@@ -826,28 +826,6 @@
m_pendingSyntheticClickPointerId = 0;
}
-static bool isProbablyMeaningfulClick(Node& clickNode)
-{
- auto frame = makeRefPtr(clickNode.document().frame());
- if (!frame || !clickNode.isConnected())
- return true;
-
- if (is<HTMLBodyElement>(clickNode) || is<Document>(clickNode) || clickNode.document().documentElement() == &clickNode)
- return false;
-
- if (is<Element>(clickNode) && equalLettersIgnoringASCIICase(downcast<Element>(clickNode).attributeWithoutSynchronization(HTMLNames::draggableAttr), "true"))
- return true;
-
- if (auto view = makeRefPtr(frame->mainFrame().view())) {
- auto elementBounds = WebPage::rootViewInteractionBounds(clickNode);
- auto unobscuredRect = view->unobscuredContentRect();
- if (elementBounds.width() >= unobscuredRect.width() / 2 && elementBounds.height() >= unobscuredRect.height() / 2)
- return false;
- }
-
- return true;
-}
-
void WebPage::completeSyntheticClick(Node& nodeRespondingToClick, const WebCore::FloatPoint& location, OptionSet<WebEvent::Modifier> modifiers, SyntheticClickType syntheticClickType, WebCore::PointerID pointerId)
{
IntPoint roundedAdjustedPoint = roundedIntPoint(location);
@@ -867,8 +845,6 @@
bool altKey = modifiers.contains(WebEvent::Modifier::AltKey);
bool metaKey = modifiers.contains(WebEvent::Modifier::MetaKey);
- m_currentSyntheticClickMayNotBeMeaningful = true;
-
tapWasHandled |= mainframe.eventHandler().handleMousePressEvent(PlatformMouseEvent(roundedAdjustedPoint, roundedAdjustedPoint, LeftButton, PlatformEvent::MousePressed, 1, shiftKey, ctrlKey, altKey, metaKey, WallTime::now(), WebCore::ForceAtClick, syntheticClickType, pointerId));
if (m_isClosed)
return;
@@ -895,24 +871,6 @@
if (m_isClosed)
return;
- auto tapHandlingResult = ([&] {
- if (!m_currentSyntheticClickMayNotBeMeaningful)
- return TapHandlingResult::MeaningfulClick;
-
- if (oldFocusedElement != newFocusedElement)
- return TapHandlingResult::MeaningfulClick;
-
- if (is<HTMLTextFormControlElement>(nodeRespondingToClick) || nodeRespondingToClick.hasEditableStyle())
- return TapHandlingResult::MeaningfulClick;
-
- if (isProbablyMeaningfulClick(nodeRespondingToClick))
- return TapHandlingResult::MeaningfulClick;
-
- return TapHandlingResult::NonMeaningfulClick;
- })();
-
- send(Messages::WebPageProxy::DidTapAtPoint(roundedIntPoint(location), tapHandlingResult));
-
if (!tapWasHandled || !nodeRespondingToClick.isElementNode())
send(Messages::WebPageProxy::DidNotHandleTapAsClick(roundedIntPoint(location)));
@@ -926,20 +884,14 @@
Frame* frameRespondingToClick = nodeRespondingToClick ? nodeRespondingToClick->document().frame() : nullptr;
IntPoint adjustedIntPoint = roundedIntPoint(adjustedPoint);
- if (!frameRespondingToClick || lastLayerTreeTransactionId < WebFrame::fromCoreFrame(*frameRespondingToClick)->firstLayerTreeTransactionIDAfterDidCommitLoad()) {
- send(Messages::WebPageProxy::DidTapAtPoint(adjustedIntPoint, TapHandlingResult::DidNotHandleTapAsClick));
+ if (!frameRespondingToClick || lastLayerTreeTransactionId < WebFrame::fromCoreFrame(*frameRespondingToClick)->firstLayerTreeTransactionIDAfterDidCommitLoad())
send(Messages::WebPageProxy::DidNotHandleTapAsClick(adjustedIntPoint));
- } else if (m_interactionNode == nodeRespondingToClick)
+ else if (m_interactionNode == nodeRespondingToClick)
completeSyntheticClick(*nodeRespondingToClick, adjustedPoint, modifiers, WebCore::OneFingerTap);
else
handleSyntheticClick(*nodeRespondingToClick, adjustedPoint, modifiers);
}
-void WebPage::didHandleOrPreventMouseDownOrMouseUpEvent()
-{
- m_currentSyntheticClickMayNotBeMeaningful = false;
-}
-
void WebPage::handleDoubleTapForDoubleClickAtPoint(const IntPoint& point, OptionSet<WebEvent::Modifier> modifiers, TransactionID lastLayerTreeTransactionId)
{
FloatPoint adjustedPoint;
@@ -1134,9 +1086,7 @@
FloatPoint adjustedPoint;
Node* nodeRespondingToClick = m_page->mainFrame().nodeRespondingToClickEvents(point, adjustedPoint);
if (!nodeRespondingToClick || !nodeRespondingToClick->renderer()) {
- auto adjustedIntPoint = roundedIntPoint(adjustedPoint);
- send(Messages::WebPageProxy::DidTapAtPoint(adjustedIntPoint, TapHandlingResult::DidNotHandleTapAsClick));
- send(Messages::WebPageProxy::DidNotHandleTapAsClick(adjustedIntPoint));
+ send(Messages::WebPageProxy::DidNotHandleTapAsClick(roundedIntPoint(adjustedPoint)));
return;
}
sendTapHighlightForNodeIfNecessary(requestID, nodeRespondingToClick);
@@ -1207,14 +1157,18 @@
selectionChangedHandler();
ContentChangeObserver::didCancelPotentialTap(m_page->mainFrame());
- if (!m_page->focusController().focusedOrMainFrame().selection().selection().isContentEditable())
- clearSelection();
+ clearSelectionAfterTapIfNeeded();
send(Messages::WebPageProxy::CommitPotentialTapFailed());
+ send(Messages::WebPageProxy::DidNotHandleTapAsClick(roundedIntPoint(m_potentialTapLocation)));
+}
- auto adjustedIntPoint = roundedIntPoint(m_potentialTapLocation);
- send(Messages::WebPageProxy::DidTapAtPoint(adjustedIntPoint, TapHandlingResult::DidNotHandleTapAsClick));
- send(Messages::WebPageProxy::DidNotHandleTapAsClick(adjustedIntPoint));
+void WebPage::clearSelectionAfterTapIfNeeded()
+{
+ if (m_page->focusController().focusedOrMainFrame().selection().selection().isContentEditable())
+ return;
+
+ clearSelection();
}
void WebPage::cancelPotentialTap()
@@ -4691,11 +4645,6 @@
scheduleEditorStateUpdateForStartOrEndContainerNodeIfNeeded(endContainer.get());
}
-void WebPage::platformIsPlayingMediaDidChange()
-{
- m_currentSyntheticClickMayNotBeMeaningful = false;
-}
-
} // namespace WebKit
#undef WEBPAGE_RELEASE_LOG
Modified: trunk/Tools/ChangeLog (281278 => 281279)
--- trunk/Tools/ChangeLog 2021-08-19 23:13:51 UTC (rev 281278)
+++ trunk/Tools/ChangeLog 2021-08-19 23:17:35 UTC (rev 281279)
@@ -1,3 +1,29 @@
+2021-08-19 Wenson Hsieh <[email protected]>
+
+ [iOS] Remove support for the meaningful tap heuristic
+ https://bugs.webkit.org/show_bug.cgi?id=229298
+ rdar://82130066
+
+ Reviewed by Tim Horton.
+
+ Remove test runner support for testing the meaningful tap heuristic.
+
+ * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+ (WTR::InjectedBundle::didReceiveMessageToPage):
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+ (WTR::TestRunner::installDidHandleTapCallback): Deleted.
+ (WTR::TestRunner::callDidHandleTapCallback): Deleted.
+ * WebKitTestRunner/InjectedBundle/TestRunner.h:
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::didHandleTap): Deleted.
+ * WebKitTestRunner/TestController.h:
+ * WebKitTestRunner/TestInvocation.cpp:
+ (WTR::TestInvocation::didHandleTap): Deleted.
+ * WebKitTestRunner/TestInvocation.h:
+ * WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:
+ (-[TestRunnerWKWebView _didTapAtPoint:withResult:]): Deleted.
+
2021-08-19 Megan Gardner <[email protected]>
Turn on TestWebKitAPI.WKAttachmentTests.CopyAndPasteBetweenWebViews as it is now passing again.
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl (281278 => 281279)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl 2021-08-19 23:13:51 UTC (rev 281278)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl 2021-08-19 23:17:35 UTC (rev 281279)
@@ -260,9 +260,6 @@
object numberOfDFGCompiles(object function);
object neverInlineFunction(object function);
- // UI delegate hooks.
- undefined installDidHandleTapCallback(object callback);
-
// Swipe gestures
undefined installDidBeginSwipeCallback(object callback);
undefined installWillEndSwipeCallback(object callback);
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp (281278 => 281279)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp 2021-08-19 23:13:51 UTC (rev 281278)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp 2021-08-19 23:17:35 UTC (rev 281279)
@@ -283,13 +283,6 @@
return;
}
- if (WKStringIsEqualToUTF8CString(messageName, "CallDidHandleTapCallback")) {
- ASSERT(messageBody);
- ASSERT(WKGetTypeID(messageBody) == WKBooleanGetTypeID());
- m_testRunner->callDidHandleTapCallback(WKBooleanGetValue(static_cast<WKBooleanRef>(messageBody)));
- return;
- }
-
if (WKStringIsEqualToUTF8CString(messageName, "CallDidBeginSwipeCallback")) {
m_testRunner->callDidBeginSwipeCallback();
return;
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp (281278 => 281279)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp 2021-08-19 23:13:51 UTC (rev 281278)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp 2021-08-19 23:17:35 UTC (rev 281279)
@@ -649,7 +649,6 @@
EnterFullscreenForElementCallbackID,
ExitFullscreenForElementCallbackID,
AppBoundRequestContextDataForDomainCallbackID,
- DidHandleTapCallbackID,
FirstUIScriptCallbackID = 100
};
@@ -1144,17 +1143,6 @@
}));
}
-void TestRunner::installDidHandleTapCallback(JSValueRef callback)
-{
- cacheTestRunnerCallback(DidHandleTapCallbackID, callback);
-}
-
-void TestRunner::callDidHandleTapCallback(bool wasMeaningful)
-{
- auto result = JSValueMakeBoolean(mainFrameJSContext(), wasMeaningful);
- callTestRunnerCallback(DidHandleTapCallbackID, 1, &result);
-}
-
void TestRunner::installDidBeginSwipeCallback(JSValueRef callback)
{
cacheTestRunnerCallback(DidBeginSwipeCallbackID, callback);
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h (281278 => 281279)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h 2021-08-19 23:13:51 UTC (rev 281278)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h 2021-08-19 23:17:35 UTC (rev 281279)
@@ -354,9 +354,6 @@
void installCustomMenuAction(JSStringRef name, bool dismissesAutomatically, JSValueRef callback);
void performCustomMenuAction();
- void installDidHandleTapCallback(JSValueRef);
- void callDidHandleTapCallback(bool wasMeaningful);
-
void installDidBeginSwipeCallback(JSValueRef);
void installWillEndSwipeCallback(JSValueRef);
void installDidEndSwipeCallback(JSValueRef);
Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (281278 => 281279)
--- trunk/Tools/WebKitTestRunner/TestController.cpp 2021-08-19 23:13:51 UTC (rev 281278)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp 2021-08-19 23:17:35 UTC (rev 281279)
@@ -2234,11 +2234,6 @@
exit(1);
}
-void TestController::didHandleTap(bool wasMeaningful)
-{
- m_currentInvocation->didHandleTap(wasMeaningful);
-}
-
void TestController::didBeginNavigationGesture(WKPageRef)
{
m_currentInvocation->didBeginSwipe();
Modified: trunk/Tools/WebKitTestRunner/TestController.h (281278 => 281279)
--- trunk/Tools/WebKitTestRunner/TestController.h 2021-08-19 23:13:51 UTC (rev 281278)
+++ trunk/Tools/WebKitTestRunner/TestController.h 2021-08-19 23:17:35 UTC (rev 281279)
@@ -362,8 +362,6 @@
void completeMediaKeySystemPermissionCheck(WKMediaKeySystemPermissionCallbackRef);
void setIsMediaKeySystemPermissionGranted(bool);
- void didHandleTap(bool wasMeaningful);
-
private:
WKRetainPtr<WKPageConfigurationRef> generatePageConfiguration(const TestOptions&);
WKRetainPtr<WKContextConfigurationRef> generateContextConfiguration(const TestOptions&) const;
Modified: trunk/Tools/WebKitTestRunner/TestInvocation.cpp (281278 => 281279)
--- trunk/Tools/WebKitTestRunner/TestInvocation.cpp 2021-08-19 23:13:51 UTC (rev 281278)
+++ trunk/Tools/WebKitTestRunner/TestInvocation.cpp 2021-08-19 23:17:35 UTC (rev 281279)
@@ -1458,12 +1458,6 @@
m_textOutput.append(text);
}
-void TestInvocation::didHandleTap(bool wasMeaningful)
-{
- auto messageBody = adoptWK(WKBooleanCreate(wasMeaningful));
- postPageMessage("CallDidHandleTapCallback", messageBody);
-}
-
void TestInvocation::didBeginSwipe()
{
postPageMessage("CallDidBeginSwipeCallback");
Modified: trunk/Tools/WebKitTestRunner/TestInvocation.h (281278 => 281279)
--- trunk/Tools/WebKitTestRunner/TestInvocation.h 2021-08-19 23:13:51 UTC (rev 281278)
+++ trunk/Tools/WebKitTestRunner/TestInvocation.h 2021-08-19 23:17:35 UTC (rev 281279)
@@ -64,8 +64,6 @@
static void dumpWebProcessUnresponsiveness(const char* errorMessage);
void outputText(const String&);
- void didHandleTap(bool wasMeaningful);
-
void didBeginSwipe();
void willEndSwipe();
void didEndSwipe();
Modified: trunk/Tools/WebKitTestRunner/cocoa/TestRunnerWKWebView.mm (281278 => 281279)
--- trunk/Tools/WebKitTestRunner/cocoa/TestRunnerWKWebView.mm 2021-08-19 23:13:51 UTC (rev 281278)
+++ trunk/Tools/WebKitTestRunner/cocoa/TestRunnerWKWebView.mm 2021-08-19 23:17:35 UTC (rev 281279)
@@ -405,11 +405,6 @@
self.didDismissPopoverCallback();
}
-- (void)_didTapAtPoint:(CGPoint)point withResult:(_WKTapHandlingResult)result
-{
- WTR::TestController::singleton().didHandleTap(result == _WKTapHandlingResultMeaningfulClick);
-}
-
- (void)scrollViewWillBeginZooming:(UIScrollView *)scrollView withView:(UIView *)view
{
[super scrollViewWillBeginZooming:scrollView withView:view];