Title: [236774] trunk/Source/WebCore
- Revision
- 236774
- Author
- [email protected]
- Date
- 2018-10-02 16:55:42 -0700 (Tue, 02 Oct 2018)
Log Message
Web Automation: tab default key handler should always cycle focus when page is controlled by automation
https://bugs.webkit.org/show_bug.cgi?id=190221
<rdar://problem/44914534>
Reviewed by Joseph Pecoraro.
This change progresses WPT WebDriver test special_keys.py::test_webdriver_special_key_sends_keydown[TAB-expected24].
* page/FocusController.cpp:
(WebCore::FocusController::advanceFocusInDocumentOrder):
Always cycle focus if the page is controlled by automation. If the chrome takes
focus, then the first responder will be something other than the WebView, which
causes subsequent WebDriver commands to hang.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (236773 => 236774)
--- trunk/Source/WebCore/ChangeLog 2018-10-02 23:42:38 UTC (rev 236773)
+++ trunk/Source/WebCore/ChangeLog 2018-10-02 23:55:42 UTC (rev 236774)
@@ -1,3 +1,19 @@
+2018-10-02 Brian Burg <[email protected]>
+
+ Web Automation: tab default key handler should always cycle focus when page is controlled by automation
+ https://bugs.webkit.org/show_bug.cgi?id=190221
+ <rdar://problem/44914534>
+
+ Reviewed by Joseph Pecoraro.
+
+ This change progresses WPT WebDriver test special_keys.py::test_webdriver_special_key_sends_keydown[TAB-expected24].
+
+ * page/FocusController.cpp:
+ (WebCore::FocusController::advanceFocusInDocumentOrder):
+ Always cycle focus if the page is controlled by automation. If the chrome takes
+ focus, then the first responder will be something other than the WebView, which
+ causes subsequent WebDriver commands to hang.
+
2018-10-01 Dean Jackson <[email protected]>
[macOS] Switching to discrete GPU should be done in the UI process
Modified: trunk/Source/WebCore/page/FocusController.cpp (236773 => 236774)
--- trunk/Source/WebCore/page/FocusController.cpp 2018-10-02 23:42:38 UTC (rev 236773)
+++ trunk/Source/WebCore/page/FocusController.cpp 2018-10-02 23:55:42 UTC (rev 236774)
@@ -465,7 +465,7 @@
if (!element) {
// We didn't find a node to focus, so we should try to pass focus to Chrome.
- if (!initialFocus && m_page.chrome().canTakeFocus(direction)) {
+ if (!initialFocus && m_page.chrome().canTakeFocus(direction) && !m_page.isControlledByAutomation()) {
document->setFocusedElement(nullptr);
setFocusedFrame(nullptr);
m_page.chrome().takeFocus(direction);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes