AX: Speak Selection does not work in an iframe
authorn_wang@apple.com <n_wang@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Jan 2017 20:44:38 +0000 (20:44 +0000)
committern_wang@apple.com <n_wang@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Jan 2017 20:44:38 +0000 (20:44 +0000)
commit91d7d0acfe16da9401ca06628b48772cb922200a
tree0526eb2b71180f5e5e00cf273e93743177805535
parente0a38fa2f4c303a3098030e4ff68eef4268348c1
AX: Speak Selection does not work in an iframe
https://bugs.webkit.org/show_bug.cgi?id=166794
<rdar://problem/29913013>

Reviewed by Chris Fleizach.

Source/WebKit2:

Making sure WebPage::getSelectionOrContentsAsString() is getting the
selection content in the right frame.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _accessibilityRetrieveSpeakSelectionContent]):
(-[WKWebView _accessibilityDidGetSpeakSelectionContent:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView accessibilityRetrieveSpeakSelectionContent]):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::getSelectionOrContentsAsString):

Tools:

* DumpRenderTree/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::retrieveSpeakSelectionContent):
(WTR::UIScriptController::accessibilitySpeakSelectionContent):
* TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
* TestRunnerShared/UIScriptContext/UIScriptController.cpp:
(WTR::UIScriptController::retrieveSpeakSelectionContent):
(WTR::UIScriptController::accessibilitySpeakSelectionContent):
* TestRunnerShared/UIScriptContext/UIScriptController.h:
* WebKitTestRunner/cocoa/TestRunnerWKWebView.h:
* WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:
(-[TestRunnerWKWebView dealloc]):
(-[TestRunnerWKWebView _accessibilityDidGetSpeakSelectionContent:]):
(-[TestRunnerWKWebView accessibilityRetrieveSpeakSelectionContentWithCompletionHandler:]):
* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::retrieveSpeakSelectionContent):
(WTR::UIScriptController::accessibilitySpeakSelectionContent):

LayoutTests:

* accessibility/ios-simulator/speak-selection-content-expected.txt: Added.
* accessibility/ios-simulator/speak-selection-content.html: Added.
* platform/ios-simulator-wk1/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@211095 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
LayoutTests/ChangeLog
LayoutTests/accessibility/ios-simulator/speak-selection-content-expected.txt [new file with mode: 0644]
LayoutTests/accessibility/ios-simulator/speak-selection-content.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator-wk1/TestExpectations
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h
Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h
Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Tools/ChangeLog
Tools/DumpRenderTree/ios/UIScriptControllerIOS.mm
Tools/TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl
Tools/TestRunnerShared/UIScriptContext/UIScriptController.cpp
Tools/TestRunnerShared/UIScriptContext/UIScriptController.h
Tools/WebKitTestRunner/cocoa/TestRunnerWKWebView.h
Tools/WebKitTestRunner/cocoa/TestRunnerWKWebView.mm
Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm