Changeset 247483 in webkit


Ignore:
Timestamp:
Jul 16, 2019 9:43:27 AM (5 years ago)
Author:
Alan Bujtas
Message:

[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):

Location:
trunk/Source
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r247481 r247483  
     12019-07-16  Zalan Bujtas  <zalan@apple.com>
     2
     3        [ContentChangeObserver] Cancel ongoing content observation when tap is failed/cancelled
     4        https://bugs.webkit.org/show_bug.cgi?id=199828
     5        <rdar://problem/53152696>
     6
     7        Reviewed by Wenson Hsieh.
     8
     9        This patch ensures that we stop the content observation (initiated by touch start) when the tap
     10        is cancelled/failed.
     11
     12        Not testable.
     13
     14        * page/ios/ContentChangeObserver.cpp:
     15        (WebCore::ContentChangeObserver::didCancelPotentialTap):
     16        * page/ios/ContentChangeObserver.h:
     17
    1182019-07-16  Rob Buis  <rbuis@igalia.com>
    219
  • trunk/Source/WebCore/page/ios/ContentChangeObserver.cpp

    r247200 r247483  
    151151}
    152152
     153void ContentChangeObserver::didCancelPotentialTap(Frame& mainFrame)
     154{
     155    LOG(ContentObservation, "didCancelPotentialTap: cancel ongoing content change observing.");
     156    WebCore::willNotProceedWithClick(mainFrame);
     157}
     158
    153159void ContentChangeObserver::didRecognizeLongPress(Frame& mainFrame)
    154160{
  • trunk/Source/WebCore/page/ios/ContentChangeObserver.h

    r247200 r247483  
    6060    void didRemoveTransition(const Element&, CSSPropertyID);
    6161
    62     WEBCORE_EXPORT void willNotProceedWithClick();
    6362    WEBCORE_EXPORT static void didRecognizeLongPress(Frame& mainFrame);
    6463    WEBCORE_EXPORT static void didPreventDefaultForEvent(Frame& mainFrame);
     64    WEBCORE_EXPORT static void didCancelPotentialTap(Frame& mainFrame);
    6565
    6666    void didSuspendActiveDOMObjects();
     
    6868
    6969    void willDestroyRenderer(const Element&);
     70    void willNotProceedWithClick();
    7071
    7172    void setHiddenTouchTarget(Element& targetElement) { m_hiddenTouchTargetElement = makeWeakPtr(targetElement); }
  • trunk/Source/WebKit/ChangeLog

    r247476 r247483  
     12019-07-16  Zalan Bujtas  <zalan@apple.com>
     2
     3        [ContentChangeObserver] Cancel ongoing content observation when tap is failed/cancelled
     4        https://bugs.webkit.org/show_bug.cgi?id=199828
     5        <rdar://problem/53152696>
     6
     7        Reviewed by Wenson Hsieh.
     8
     9        * WebProcess/WebPage/ios/WebPageIOS.mm:
     10        (WebKit::WebPage::commitPotentialTapFailed):
     11        (WebKit::WebPage::cancelPotentialTap):
     12
    1132019-07-15  Alex Christensen  <achristensen@webkit.org>
    214
  • trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm

    r247472 r247483  
    11271127void WebPage::commitPotentialTapFailed()
    11281128{
     1129    ContentChangeObserver::didCancelPotentialTap(m_page->mainFrame());
    11291130    if (!m_page->focusController().focusedOrMainFrame().selection().selection().isContentEditable())
    11301131        clearSelection();
     
    11361137void WebPage::cancelPotentialTap()
    11371138{
    1138     if (m_potentialTapNode)
    1139         m_potentialTapNode->document().contentChangeObserver().willNotProceedWithClick();
     1139    ContentChangeObserver::didCancelPotentialTap(m_page->mainFrame());
    11401140    cancelPotentialTapInFrame(*m_mainFrame);
    11411141}
Note: See TracChangeset for help on using the changeset viewer.