Title: [247592] branches/safari-608-branch/Source
Revision
247592
Author
kocsen_ch...@apple.com
Date
2019-07-18 13:23:50 -0700 (Thu, 18 Jul 2019)

Log Message

Cherry-pick r247483. rdar://problem/53229618

    [ContentChangeObserver] Cancel ongoing content observation when tap is failed/cancelled
    https://bugs.webkit.org/show_bug.cgi?id=199828
    <rdar://problem/53152696>

    Reviewed by Wenson Hsieh.

    Source/WebCore:

    This patch ensures that we stop the content observation (initiated by touch start) when the tap
    is cancelled/failed.

    Not testable.

    * page/ios/ContentChangeObserver.cpp:
    (WebCore::ContentChangeObserver::didCancelPotentialTap):
    * page/ios/ContentChangeObserver.h:

    Source/WebKit:

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

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

Modified Paths

Diff

Modified: branches/safari-608-branch/Source/WebCore/ChangeLog (247591 => 247592)


--- branches/safari-608-branch/Source/WebCore/ChangeLog	2019-07-18 20:23:47 UTC (rev 247591)
+++ branches/safari-608-branch/Source/WebCore/ChangeLog	2019-07-18 20:23:50 UTC (rev 247592)
@@ -1,5 +1,52 @@
 2019-07-17  Kocsen Chung  <kocsen_ch...@apple.com>
 
+        Cherry-pick r247483. rdar://problem/53229618
+
+    [ContentChangeObserver] Cancel ongoing content observation when tap is failed/cancelled
+    https://bugs.webkit.org/show_bug.cgi?id=199828
+    <rdar://problem/53152696>
+    
+    Reviewed by Wenson Hsieh.
+    
+    Source/WebCore:
+    
+    This patch ensures that we stop the content observation (initiated by touch start) when the tap
+    is cancelled/failed.
+    
+    Not testable.
+    
+    * page/ios/ContentChangeObserver.cpp:
+    (WebCore::ContentChangeObserver::didCancelPotentialTap):
+    * page/ios/ContentChangeObserver.h:
+    
+    Source/WebKit:
+    
+    * WebProcess/WebPage/ios/WebPageIOS.mm:
+    (WebKit::WebPage::commitPotentialTapFailed):
+    (WebKit::WebPage::cancelPotentialTap):
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247483 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2019-07-16  Zalan Bujtas  <za...@apple.com>
+
+            [ContentChangeObserver] Cancel ongoing content observation when tap is failed/cancelled
+            https://bugs.webkit.org/show_bug.cgi?id=199828
+            <rdar://problem/53152696>
+
+            Reviewed by Wenson Hsieh.
+
+            This patch ensures that we stop the content observation (initiated by touch start) when the tap
+            is cancelled/failed.
+
+            Not testable.
+
+            * page/ios/ContentChangeObserver.cpp:
+            (WebCore::ContentChangeObserver::didCancelPotentialTap):
+            * page/ios/ContentChangeObserver.h:
+
+2019-07-17  Kocsen Chung  <kocsen_ch...@apple.com>
+
         Cherry-pick r247480. rdar://problem/53229746
 
     Hop to main thread for release logging in RealtimeIncomingAudioSource

Modified: branches/safari-608-branch/Source/WebCore/page/ios/ContentChangeObserver.cpp (247591 => 247592)


--- branches/safari-608-branch/Source/WebCore/page/ios/ContentChangeObserver.cpp	2019-07-18 20:23:47 UTC (rev 247591)
+++ branches/safari-608-branch/Source/WebCore/page/ios/ContentChangeObserver.cpp	2019-07-18 20:23:50 UTC (rev 247592)
@@ -150,6 +150,12 @@
     }
 }
 
+void ContentChangeObserver::didCancelPotentialTap(Frame& mainFrame)
+{
+    LOG(ContentObservation, "didCancelPotentialTap: cancel ongoing content change observing.");
+    WebCore::willNotProceedWithClick(mainFrame);
+}
+
 void ContentChangeObserver::didRecognizeLongPress(Frame& mainFrame)
 {
     LOG(ContentObservation, "didRecognizeLongPress: cancel ongoing content change observing.");

Modified: branches/safari-608-branch/Source/WebCore/page/ios/ContentChangeObserver.h (247591 => 247592)


--- branches/safari-608-branch/Source/WebCore/page/ios/ContentChangeObserver.h	2019-07-18 20:23:47 UTC (rev 247591)
+++ branches/safari-608-branch/Source/WebCore/page/ios/ContentChangeObserver.h	2019-07-18 20:23:50 UTC (rev 247592)
@@ -59,14 +59,15 @@
     void didFinishTransition(const Element&, CSSPropertyID);
     void didRemoveTransition(const Element&, CSSPropertyID);
 
-    WEBCORE_EXPORT void willNotProceedWithClick();
     WEBCORE_EXPORT static void didRecognizeLongPress(Frame& mainFrame);
     WEBCORE_EXPORT static void didPreventDefaultForEvent(Frame& mainFrame);
+    WEBCORE_EXPORT static void didCancelPotentialTap(Frame& mainFrame);
 
     void didSuspendActiveDOMObjects();
     void willDetachPage();
 
     void willDestroyRenderer(const Element&);
+    void willNotProceedWithClick();
 
     void setHiddenTouchTarget(Element& targetElement) { m_hiddenTouchTargetElement = makeWeakPtr(targetElement); }
     void resetHiddenTouchTarget() { m_hiddenTouchTargetElement = { }; }

Modified: branches/safari-608-branch/Source/WebKit/ChangeLog (247591 => 247592)


--- branches/safari-608-branch/Source/WebKit/ChangeLog	2019-07-18 20:23:47 UTC (rev 247591)
+++ branches/safari-608-branch/Source/WebKit/ChangeLog	2019-07-18 20:23:50 UTC (rev 247592)
@@ -1,5 +1,47 @@
 2019-07-17  Kocsen Chung  <kocsen_ch...@apple.com>
 
+        Cherry-pick r247483. rdar://problem/53229618
+
+    [ContentChangeObserver] Cancel ongoing content observation when tap is failed/cancelled
+    https://bugs.webkit.org/show_bug.cgi?id=199828
+    <rdar://problem/53152696>
+    
+    Reviewed by Wenson Hsieh.
+    
+    Source/WebCore:
+    
+    This patch ensures that we stop the content observation (initiated by touch start) when the tap
+    is cancelled/failed.
+    
+    Not testable.
+    
+    * page/ios/ContentChangeObserver.cpp:
+    (WebCore::ContentChangeObserver::didCancelPotentialTap):
+    * page/ios/ContentChangeObserver.h:
+    
+    Source/WebKit:
+    
+    * WebProcess/WebPage/ios/WebPageIOS.mm:
+    (WebKit::WebPage::commitPotentialTapFailed):
+    (WebKit::WebPage::cancelPotentialTap):
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247483 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2019-07-16  Zalan Bujtas  <za...@apple.com>
+
+            [ContentChangeObserver] Cancel ongoing content observation when tap is failed/cancelled
+            https://bugs.webkit.org/show_bug.cgi?id=199828
+            <rdar://problem/53152696>
+
+            Reviewed by Wenson Hsieh.
+
+            * WebProcess/WebPage/ios/WebPageIOS.mm:
+            (WebKit::WebPage::commitPotentialTapFailed):
+            (WebKit::WebPage::cancelPotentialTap):
+
+2019-07-17  Kocsen Chung  <kocsen_ch...@apple.com>
+
         Cherry-pick r247470. rdar://problem/53229634
 
     outlook.live.com has odd viewport with edge gap

Modified: branches/safari-608-branch/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm (247591 => 247592)


--- branches/safari-608-branch/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm	2019-07-18 20:23:47 UTC (rev 247591)
+++ branches/safari-608-branch/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm	2019-07-18 20:23:50 UTC (rev 247592)
@@ -1126,6 +1126,7 @@
 
 void WebPage::commitPotentialTapFailed()
 {
+    ContentChangeObserver::didCancelPotentialTap(m_page->mainFrame());
     if (!m_page->focusController().focusedOrMainFrame().selection().selection().isContentEditable())
         clearSelection();
 
@@ -1135,8 +1136,7 @@
 
 void WebPage::cancelPotentialTap()
 {
-    if (m_potentialTapNode)
-        m_potentialTapNode->document().contentChangeObserver().willNotProceedWithClick();
+    ContentChangeObserver::didCancelPotentialTap(m_page->mainFrame());
     cancelPotentialTapInFrame(*m_mainFrame);
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to