[WK2] Action sheet should not dismiss when a DDAction with user interface is being...
authorwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Feb 2017 21:43:41 +0000 (21:43 +0000)
committerwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Feb 2017 21:43:41 +0000 (21:43 +0000)
commit410acc2d9fe6b7ab66bb9657fe0e7bd6fc374d2d
tree9eab87a5b04aa8a3e63bb718e02547a08cd4d9c2
parentbd593524dd5e4c7f9d2724a5fac501e92fbf2070
[WK2] Action sheet should not dismiss when a DDAction with user interface is being presented
https://bugs.webkit.org/show_bug.cgi?id=168528
<rdar://problem/30515324>

Reviewed by Beth Dakin.

After r211643, -[WKActionSheet doneWithSheet] now dismisses the presenting view controller. This is called when
interaction with the sheet is finished and is a reasonable thing to do in most cases. However, when using data
detectors, we don't want to dismiss the presenting view controller, since DataDetector handles dismissing on its
own and expects that its completion handler will be invoked.

To fix this, we add a parameter to doneWithSheet: to indicate whether or not we should additionally dismiss the
presenting view controller, and pass in NO in the case where we are handing control over to DataDetector.

* UIProcess/ios/WKActionSheet.h:
* UIProcess/ios/WKActionSheet.mm:
(-[WKActionSheet doneWithSheet:]):
(-[WKActionSheet doneWithSheet]): Deleted.
* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant showDataDetectorsSheet]):
(-[WKActionSheetAssistant cleanupSheet]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212574 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/ios/WKActionSheet.h
Source/WebKit2/UIProcess/ios/WKActionSheet.mm
Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm