Diff
Modified: trunk/LayoutTests/ChangeLog (228856 => 228857)
--- trunk/LayoutTests/ChangeLog 2018-02-21 04:13:42 UTC (rev 228856)
+++ trunk/LayoutTests/ChangeLog 2018-02-21 04:17:20 UTC (rev 228857)
@@ -1,3 +1,15 @@
+2018-02-20 Nan Wang <n_w...@apple.com>
+
+ AX: Keyboard focus not following VoiceOver cursor into web content or within web content.
+ https://bugs.webkit.org/show_bug.cgi?id=182752
+ <rdar://problem/37518233>
+
+ Reviewed by Ryosuke Niwa.
+
+ * accessibility/mac/accessibility-make-first-responder-expected.txt: Added.
+ * accessibility/mac/accessibility-make-first-responder.html: Added.
+ * platform/mac-wk1/TestExpectations:
+
2018-02-20 Chris Dumez <cdu...@apple.com>
Crash under JSC::JSCell::toNumber(JSC::ExecState*)
Added: trunk/LayoutTests/accessibility/mac/accessibility-make-first-responder-expected.txt (0 => 228857)
--- trunk/LayoutTests/accessibility/mac/accessibility-make-first-responder-expected.txt (rev 0)
+++ trunk/LayoutTests/accessibility/mac/accessibility-make-first-responder-expected.txt 2018-02-21 04:17:20 UTC (rev 228857)
@@ -0,0 +1,13 @@
+Test that assistiveTechnologyMakeFirstResponder works correctly.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+DOM focus
+Window is still the first responder: true
+Accessibility focus
+Window is still the first responder: false
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/accessibility/mac/accessibility-make-first-responder.html (0 => 228857)
--- trunk/LayoutTests/accessibility/mac/accessibility-make-first-responder.html (rev 0)
+++ trunk/LayoutTests/accessibility/mac/accessibility-make-first-responder.html 2018-02-21 04:17:20 UTC (rev 228857)
@@ -0,0 +1,77 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+<script src=""
+<script>
+ description("Test that assistiveTechnologyMakeFirstResponder works correctly.");
+ window.jsTestIsAsync = true;
+
+ function makeWindowFirstResponderUIScript() {
+ return `(function() {
+ uiController.makeWindowContentViewFirstResponder();
+ })();`;
+ }
+
+ function isWindowFirstResponderScript() {
+ return `(function() {
+ return uiController.isWindowContentViewFirstResponder;
+ })();`;
+ }
+
+ function setfirstResponderSuppressionUIScript(x) {
+ return `(function() {
+ return uiController.firstResponderSuppressionForWebView(${x});
+ })();`;
+ }
+
+ function doTest() {
+ // 1. Make window first responder and suppress the first responder change for web content
+ if (window.testRunner) {
+ testRunner.runUIScript(makeWindowFirstResponderUIScript(), function() {
+ testRunner.runUIScript(setfirstResponderSuppressionUIScript(true), function() {
+ testSuppressFirstResponderChange();
+ });
+ });
+ }
+ }
+
+ function testSuppressFirstResponderChange() {
+ var input = document.getElementById("input");
+ debug("DOM focus");
+ input.focus();
+ testRunner.runUIScript(isWindowFirstResponderScript(), function(result) {
+ debug("Window is still the first responder: " + result);
+ input.blur();
+ // 2. Now make sure accessibility focus will make web content the first responder.
+ testAccessibilityMakeFirstResonder();
+ });
+ }
+
+ function testAccessibilityMakeFirstResonder() {
+ if (window.accessibilityController) {
+ var inputObj = accessibilityController.accessibleElementById("input");
+ debug("Accessibility focus")
+ inputObj.takeFocus();
+ testRunner.runUIScript(isWindowFirstResponderScript(), function(result) {
+ debug("Window is still the first responder: " + result);
+ finishTest();
+ });
+ }
+ }
+
+ function finishTest() {
+ // Reset _setShouldSuppressFirstResponderChanges
+ testRunner.runUIScript(setfirstResponderSuppressionUIScript(false), function() {
+ finishJSTest();
+ });
+ }
+
+ window.addEventListener('load', doTest, false);
+ </script>
+</head>
+<body>
+ <input id="input" type="text">
+ <script src=""
+</body>
+</html>
Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (228856 => 228857)
--- trunk/LayoutTests/platform/mac-wk1/TestExpectations 2018-02-21 04:13:42 UTC (rev 228856)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations 2018-02-21 04:17:20 UTC (rev 228857)
@@ -488,6 +488,8 @@
webkit.org/b/180898 accessibility/mac/AOM-events.html [ Skip ]
+webkit.org/b/182752 accessibility/mac/accessibility-make-first-responder.html [ Skip ]
+
# User-installed fonts test infrastructure is not present in WK1
webkit.org/b/180062 fast/text/user-installed-fonts [ ImageOnlyFailure ]
Modified: trunk/Source/WebCore/ChangeLog (228856 => 228857)
--- trunk/Source/WebCore/ChangeLog 2018-02-21 04:13:42 UTC (rev 228856)
+++ trunk/Source/WebCore/ChangeLog 2018-02-21 04:17:20 UTC (rev 228857)
@@ -1,3 +1,19 @@
+2018-02-20 Nan Wang <n_w...@apple.com>
+
+ AX: Keyboard focus not following VoiceOver cursor into web content or within web content.
+ https://bugs.webkit.org/show_bug.cgi?id=182752
+ <rdar://problem/37518233>
+
+ Reviewed by Ryosuke Niwa.
+
+ Call the assistive technology specific method for becoming first responder.
+
+ Test: accessibility/mac/accessibility-make-first-responder.html
+
+ * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+ (-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]):
+ * page/ChromeClient.h:
+
2018-02-20 Tim Horton <timothy_hor...@apple.com>
Introduce HAVE(IOSURFACE_ACCELERATOR)
Modified: trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm (228856 => 228857)
--- trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm 2018-02-21 04:13:42 UTC (rev 228856)
+++ trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm 2018-02-21 04:17:20 UTC (rev 228857)
@@ -3645,16 +3645,18 @@
bool focus = [number boolValue];
// If focus is just set without making the view the first responder, then keyboard focus won't move to the right place.
- if (focus && m_object->isWebArea() && !m_object->document()->frame()->selection().isFocusedAndActive()) {
+ if (focus && !m_object->document()->frame()->selection().isFocusedAndActive()) {
FrameView* frameView = m_object->documentFrameView();
Page* page = m_object->page();
if (page && frameView) {
ChromeClient& chromeClient = page->chrome().client();
chromeClient.focus();
+
+ // Legacy WebKit1 case.
if (frameView->platformWidget())
chromeClient.makeFirstResponder(frameView->platformWidget());
else
- chromeClient.makeFirstResponder();
+ chromeClient.assistiveTechnologyMakeFirstResponder();
}
}
Modified: trunk/Source/WebCore/page/ChromeClient.h (228856 => 228857)
--- trunk/Source/WebCore/page/ChromeClient.h 2018-02-21 04:13:42 UTC (rev 228856)
+++ trunk/Source/WebCore/page/ChromeClient.h 2018-02-21 04:17:20 UTC (rev 228857)
@@ -362,6 +362,7 @@
virtual void makeFirstResponder(NSResponder *) { }
// Focuses on the containing view associated with this page.
virtual void makeFirstResponder() { }
+ virtual void assistiveTechnologyMakeFirstResponder() { }
#endif
#if PLATFORM(IOS)
Modified: trunk/Source/WebKit/ChangeLog (228856 => 228857)
--- trunk/Source/WebKit/ChangeLog 2018-02-21 04:13:42 UTC (rev 228856)
+++ trunk/Source/WebKit/ChangeLog 2018-02-21 04:17:20 UTC (rev 228857)
@@ -1,3 +1,28 @@
+2018-02-20 Nan Wang <n_w...@apple.com>
+
+ AX: Keyboard focus not following VoiceOver cursor into web content or within web content.
+ https://bugs.webkit.org/show_bug.cgi?id=182752
+ <rdar://problem/37518233>
+
+ Reviewed by Ryosuke Niwa.
+
+ * UIProcess/PageClient.h:
+ * UIProcess/WebPageProxy.h:
+ * UIProcess/WebPageProxy.messages.in:
+ * UIProcess/ios/PageClientImplIOS.h:
+ * UIProcess/ios/PageClientImplIOS.mm:
+ (WebKit::PageClientImpl::assistiveTechnologyMakeFirstResponder):
+ * UIProcess/ios/WebPageProxyIOS.mm:
+ (WebKit::WebPageProxy::assistiveTechnologyMakeFirstResponder):
+ * UIProcess/mac/PageClientImplMac.h:
+ * UIProcess/mac/PageClientImplMac.mm:
+ (WebKit::PageClientImpl::assistiveTechnologyMakeFirstResponder):
+ * UIProcess/mac/WebPageProxyMac.mm:
+ (WebKit::WebPageProxy::assistiveTechnologyMakeFirstResponder):
+ * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+ (WebKit::WebChromeClient::assistiveTechnologyMakeFirstResponder):
+ * WebProcess/WebCoreSupport/WebChromeClient.h:
+
2018-02-14 Brian Burg <bb...@apple.com>
Web Automation: combine session commands to resize and move top-level browsing contexts
Modified: trunk/Source/WebKit/UIProcess/PageClient.h (228856 => 228857)
--- trunk/Source/WebKit/UIProcess/PageClient.h 2018-02-21 04:13:42 UTC (rev 228856)
+++ trunk/Source/WebKit/UIProcess/PageClient.h 2018-02-21 04:17:20 UTC (rev 228857)
@@ -177,6 +177,7 @@
virtual void resetSecureInputState() = 0;
virtual void notifyInputContextAboutDiscardedComposition() = 0;
virtual void makeFirstResponder() = 0;
+ virtual void assistiveTechnologyMakeFirstResponder() = 0;
virtual void setAcceleratedCompositingRootLayer(LayerOrView *) = 0;
virtual LayerOrView *acceleratedCompositingRootLayer() const = 0;
virtual RefPtr<ViewSnapshot> takeViewSnapshot() = 0;
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.h (228856 => 228857)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.h 2018-02-21 04:13:42 UTC (rev 228856)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.h 2018-02-21 04:17:20 UTC (rev 228857)
@@ -808,6 +808,7 @@
String stringSelectionForPasteboard();
RefPtr<WebCore::SharedBuffer> dataSelectionForPasteboard(const String& pasteboardType);
void makeFirstResponder();
+ void assistiveTechnologyMakeFirstResponder();
ColorSpaceData colorSpace();
#endif
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.messages.in (228856 => 228857)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.messages.in 2018-02-21 04:13:42 UTC (rev 228856)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.messages.in 2018-02-21 04:17:20 UTC (rev 228857)
@@ -343,6 +343,7 @@
StopSpeaking()
MakeFirstResponder()
+ AssistiveTechnologyMakeFirstResponder()
# Spotlight
SearchWithSpotlight(String string)
Modified: trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.h (228856 => 228857)
--- trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.h 2018-02-21 04:13:42 UTC (rev 228856)
+++ trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.h 2018-02-21 04:17:20 UTC (rev 228857)
@@ -86,6 +86,7 @@
void resetSecureInputState() override;
void notifyInputContextAboutDiscardedComposition() override;
void makeFirstResponder() override;
+ void assistiveTechnologyMakeFirstResponder() override;
WebCore::FloatRect convertToDeviceSpace(const WebCore::FloatRect&) override;
WebCore::FloatRect convertToUserSpace(const WebCore::FloatRect&) override;
WebCore::IntPoint screenToRootView(const WebCore::IntPoint&) override;
Modified: trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm (228856 => 228857)
--- trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm 2018-02-21 04:13:42 UTC (rev 228856)
+++ trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm 2018-02-21 04:17:20 UTC (rev 228857)
@@ -383,6 +383,11 @@
notImplemented();
}
+void PageClientImpl::assistiveTechnologyMakeFirstResponder()
+{
+ notImplemented();
+}
+
void PageClientImpl::makeFirstResponder()
{
notImplemented();
Modified: trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm (228856 => 228857)
--- trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm 2018-02-21 04:13:42 UTC (rev 228856)
+++ trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm 2018-02-21 04:17:20 UTC (rev 228857)
@@ -798,6 +798,11 @@
m_pageClient.accessibilityWebProcessTokenReceived(data);
}
+void WebPageProxy::assistiveTechnologyMakeFirstResponder()
+{
+ notImplemented();
+}
+
void WebPageProxy::makeFirstResponder()
{
notImplemented();
Modified: trunk/Source/WebKit/UIProcess/mac/PageClientImplMac.h (228856 => 228857)
--- trunk/Source/WebKit/UIProcess/mac/PageClientImplMac.h 2018-02-21 04:13:42 UTC (rev 228856)
+++ trunk/Source/WebKit/UIProcess/mac/PageClientImplMac.h 2018-02-21 04:17:20 UTC (rev 228857)
@@ -154,6 +154,7 @@
void setPluginComplexTextInputState(uint64_t pluginComplexTextInputIdentifier, PluginComplexTextInputState) override;
void makeFirstResponder() override;
+ void assistiveTechnologyMakeFirstResponder() override;
void setShouldSuppressFirstResponderChanges(bool shouldSuppress) override { m_shouldSuppressFirstResponderChanges = shouldSuppress; }
void didPerformDictionaryLookup(const WebCore::DictionaryPopupInfo&) override;
Modified: trunk/Source/WebKit/UIProcess/mac/PageClientImplMac.mm (228856 => 228857)
--- trunk/Source/WebKit/UIProcess/mac/PageClientImplMac.mm 2018-02-21 04:13:42 UTC (rev 228856)
+++ trunk/Source/WebKit/UIProcess/mac/PageClientImplMac.mm 2018-02-21 04:17:20 UTC (rev 228857)
@@ -174,6 +174,11 @@
return m_impl->isFocused();
}
+void PageClientImpl::assistiveTechnologyMakeFirstResponder()
+{
+ [[m_view window] makeFirstResponder:m_view];
+}
+
void PageClientImpl::makeFirstResponder()
{
if (m_shouldSuppressFirstResponderChanges)
Modified: trunk/Source/WebKit/UIProcess/mac/WebPageProxyMac.mm (228856 => 228857)
--- trunk/Source/WebKit/UIProcess/mac/WebPageProxyMac.mm 2018-02-21 04:13:42 UTC (rev 228856)
+++ trunk/Source/WebKit/UIProcess/mac/WebPageProxyMac.mm 2018-02-21 04:17:20 UTC (rev 228857)
@@ -353,6 +353,11 @@
m_pageClient.makeFirstResponder();
}
+void WebPageProxy::assistiveTechnologyMakeFirstResponder()
+{
+ m_pageClient.assistiveTechnologyMakeFirstResponder();
+}
+
ColorSpaceData WebPageProxy::colorSpace()
{
return m_pageClient.colorSpace();
Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp (228856 => 228857)
--- trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp 2018-02-21 04:13:42 UTC (rev 228856)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp 2018-02-21 04:17:20 UTC (rev 228857)
@@ -212,6 +212,11 @@
m_page.send(Messages::WebPageProxy::MakeFirstResponder());
}
+void WebChromeClient::assistiveTechnologyMakeFirstResponder()
+{
+ m_page.send(Messages::WebPageProxy::AssistiveTechnologyMakeFirstResponder());
+}
+
#endif
bool WebChromeClient::canTakeFocus(FocusDirection)
Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h (228856 => 228857)
--- trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h 2018-02-21 04:13:42 UTC (rev 228856)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h 2018-02-21 04:17:20 UTC (rev 228857)
@@ -271,6 +271,7 @@
void elementDidBlur(WebCore::Element&) final;
void makeFirstResponder() final;
+ void assistiveTechnologyMakeFirstResponder() final;
#endif
void enableSuddenTermination() final;
Modified: trunk/Tools/ChangeLog (228856 => 228857)
--- trunk/Tools/ChangeLog 2018-02-21 04:13:42 UTC (rev 228856)
+++ trunk/Tools/ChangeLog 2018-02-21 04:17:20 UTC (rev 228857)
@@ -1,3 +1,26 @@
+2018-02-20 Nan Wang <n_w...@apple.com>
+
+ AX: Keyboard focus not following VoiceOver cursor into web content or within web content.
+ https://bugs.webkit.org/show_bug.cgi?id=182752
+ <rdar://problem/37518233>
+
+ Reviewed by Ryosuke Niwa.
+
+ * DumpRenderTree/mac/UIScriptControllerMac.mm:
+ (WTR::UIScriptController::firstResponderSuppressionForWebView):
+ (WTR::UIScriptController::makeWindowContentViewFirstResponder):
+ (WTR::UIScriptController::isWindowContentViewFirstResponder const):
+ * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
+ * TestRunnerShared/UIScriptContext/UIScriptController.cpp:
+ (WTR::UIScriptController::firstResponderSuppressionForWebView):
+ (WTR::UIScriptController::makeWindowContentViewFirstResponder):
+ (WTR::UIScriptController::isWindowContentViewFirstResponder const):
+ * TestRunnerShared/UIScriptContext/UIScriptController.h:
+ * WebKitTestRunner/mac/UIScriptControllerMac.mm:
+ (WTR::UIScriptController::firstResponderSuppressionForWebView):
+ (WTR::UIScriptController::makeWindowContentViewFirstResponder):
+ (WTR::UIScriptController::isWindowContentViewFirstResponder const):
+
2018-02-20 Fujii Hironori <hironori.fu...@sony.com>
[GTK] jhbuild: Remove gtk-doc
Modified: trunk/Tools/DumpRenderTree/mac/UIScriptControllerMac.mm (228856 => 228857)
--- trunk/Tools/DumpRenderTree/mac/UIScriptControllerMac.mm 2018-02-21 04:13:42 UTC (rev 228856)
+++ trunk/Tools/DumpRenderTree/mac/UIScriptControllerMac.mm 2018-02-21 04:17:20 UTC (rev 228857)
@@ -167,6 +167,19 @@
{
}
+void UIScriptController::firstResponderSuppressionForWebView(bool)
+{
}
+void UIScriptController::makeWindowContentViewFirstResponder()
+{
+}
+
+bool UIScriptController::isWindowContentViewFirstResponder() const
+{
+ return false;
+}
+
+}
+
#endif // PLATFORM(MAC)
Modified: trunk/Tools/TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl (228856 => 228857)
--- trunk/Tools/TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl 2018-02-21 04:13:42 UTC (rev 228856)
+++ trunk/Tools/TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl 2018-02-21 04:17:20 UTC (rev 228857)
@@ -248,4 +248,8 @@
void overridePreference(DOMString preference, DOMString value);
void setSafeAreaInsets(double top, double right, double bottom, double left);
+
+ void firstResponderSuppressionForWebView(boolean shouldSuppress);
+ void makeWindowContentViewFirstResponder();
+ readonly attribute boolean isWindowContentViewFirstResponder;
};
Modified: trunk/Tools/TestRunnerShared/UIScriptContext/UIScriptController.cpp (228856 => 228857)
--- trunk/Tools/TestRunnerShared/UIScriptContext/UIScriptController.cpp 2018-02-21 04:13:42 UTC (rev 228856)
+++ trunk/Tools/TestRunnerShared/UIScriptContext/UIScriptController.cpp 2018-02-21 04:17:20 UTC (rev 228857)
@@ -481,6 +481,19 @@
{
}
+void UIScriptController::firstResponderSuppressionForWebView(bool)
+{
+}
+
+void UIScriptController::makeWindowContentViewFirstResponder()
+{
+}
+
+bool UIScriptController::isWindowContentViewFirstResponder() const
+{
+ return false;
+}
+
#endif
void UIScriptController::uiScriptComplete(JSStringRef result)
Modified: trunk/Tools/TestRunnerShared/UIScriptContext/UIScriptController.h (228856 => 228857)
--- trunk/Tools/TestRunnerShared/UIScriptContext/UIScriptController.h 2018-02-21 04:13:42 UTC (rev 228856)
+++ trunk/Tools/TestRunnerShared/UIScriptContext/UIScriptController.h 2018-02-21 04:17:20 UTC (rev 228857)
@@ -174,6 +174,10 @@
void setSafeAreaInsets(double top, double right, double bottom, double left);
+ void firstResponderSuppressionForWebView(bool);
+ void makeWindowContentViewFirstResponder();
+ bool isWindowContentViewFirstResponder() const;
+
private:
UIScriptController(UIScriptContext&);
Modified: trunk/Tools/WebKitTestRunner/mac/UIScriptControllerMac.mm (228856 => 228857)
--- trunk/Tools/WebKitTestRunner/mac/UIScriptControllerMac.mm 2018-02-21 04:13:42 UTC (rev 228856)
+++ trunk/Tools/WebKitTestRunner/mac/UIScriptControllerMac.mm 2018-02-21 04:17:20 UTC (rev 228857)
@@ -239,4 +239,22 @@
playBackEvents(m_context, (NSString *)stream.get(), callback);
}
+void UIScriptController::firstResponderSuppressionForWebView(bool shouldSuppress)
+{
+ auto* webView = TestController::singleton().mainWebView()->platformView();
+ [webView _setShouldSuppressFirstResponderChanges:shouldSuppress];
+}
+
+void UIScriptController::makeWindowContentViewFirstResponder()
+{
+ NSWindow *window = [TestController::singleton().mainWebView()->platformView() window];
+ [window makeFirstResponder:[window contentView]];
+}
+
+bool UIScriptController::isWindowContentViewFirstResponder() const
+{
+ NSWindow *window = [TestController::singleton().mainWebView()->platformView() window];
+ return [window firstResponder] == [window contentView];
+}
+
} // namespace WTR