REGRESSION(r243557)[ContentChangeObserver] Need to double tap text formatting element...
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 16 Apr 2019 20:39:34 +0000 (20:39 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 16 Apr 2019 20:39:34 +0000 (20:39 +0000)
https://bugs.webkit.org/show_bug.cgi?id=196975
<rdar://problem/49489849>

Reviewed by Simon Fraser.

This patch ensures that we always proceed with synthetic click on form elements.

Covered by existing tests.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::handleSyntheticClick):

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

Source/WebKit/ChangeLog
Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm

index f31786d..2949e3a 100644 (file)
@@ -1,3 +1,18 @@
+2019-04-16  Zalan Bujtas  <zalan@apple.com>
+
+        REGRESSION(r243557)[ContentChangeObserver] Need to double tap text formatting elements in MS Word web app
+        https://bugs.webkit.org/show_bug.cgi?id=196975
+        <rdar://problem/49489849>
+
+        Reviewed by Simon Fraser.
+
+        This patch ensures that we always proceed with synthetic click on form elements.
+
+        Covered by existing tests.
+
+        * WebProcess/WebPage/ios/WebPageIOS.mm:
+        (WebKit::WebPage::handleSyntheticClick):
+
 2019-04-16  Timothy Hatcher  <timothy@apple.com>
 
         FrameView base background color always starts white.
index 0684718..90d7b73 100644 (file)
@@ -604,7 +604,8 @@ void WebPage::handleSyntheticClick(Node& nodeRespondingToClick, const WebCore::F
         if (protectedThis->m_isClosed || !protectedThis->corePage())
             return;
 
-        if (observedContentChange == WKContentVisibilityChange) {
+        auto shouldStayAtHoverState = observedContentChange == WKContentVisibilityChange && !is<HTMLFormControlElement>(targetNode);
+        if (shouldStayAtHoverState) {
             // The move event caused new contents to appear. Don't send synthetic click event, but just ensure that the mouse is on the most recent content.
             dispatchSyntheticMouseMove(protectedThis->corePage()->mainFrame(), location, modifiers);
             LOG(ContentObservation, "handleSyntheticClick: Observed meaningful visible change -> hover.");