[ContentChangeObserver] Stop content change observation when the touch event turns...
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Mar 2019 16:40:31 +0000 (16:40 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Mar 2019 16:40:31 +0000 (16:40 +0000)
commitaabfc19bbee5f2676ec2b69a8acc2f2a8779fd1d
tree17640121c6efc02ee0c7ff6b0092ee1571538270
parent144cdcc2192f94b8cc1d8dbb4a98f440b14b3792
[ContentChangeObserver] Stop content change observation when the touch event turns into long press
https://bugs.webkit.org/show_bug.cgi?id=195601
<rdar://problem/48796324>

Reviewed by Wenson Hsieh.

Source/WebCore:

Cancel the ongoing content observation (started at touchStart) when the touch event does not turn into a tap gesture.

Not testable because any subsequent tap would reset the state anyway (though it might be measurable through some code triggering heavy content change).

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

Source/WebKit:

Add didRecognizeLongPress() message to be able to cancel content observation (started at touchStart).

* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _longPressRecognized:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::didRecognizeLongPress):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::didRecognizeLongPress):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242796 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/page/ios/ContentChangeObserver.cpp
Source/WebCore/page/ios/ContentChangeObserver.h
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/WebPageProxy.h
Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm
Source/WebKit/WebProcess/WebPage/WebPage.h
Source/WebKit/WebProcess/WebPage/WebPage.messages.in
Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm