Keyboard input suppression should extend to subframes
authoraestes@apple.com <aestes@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 10 May 2017 18:30:57 +0000 (18:30 +0000)
committeraestes@apple.com <aestes@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 10 May 2017 18:30:57 +0000 (18:30 +0000)
commit65e20155db1816e28182020d54c17185b23a9b49
tree4588897e2516e81378d88727191078e4a97cb3cf
parent7c9c020c2fa0d631948baa4919ec7ce6b23b093b
Keyboard input suppression should extend to subframes
https://bugs.webkit.org/show_bug.cgi?id=171880
<rdar://problem/31201793>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Test: http/tests/navigation/keyboard-events-during-provisional-subframe-navigation.html

* dom/EventDispatcher.cpp:
(WebCore::shouldSuppressEventDispatchInDOM): Changed to call shouldSuppressKeyboardInput()
on the main frame's loader.
* editing/Editor.cpp:
(WebCore::Editor::shouldInsertText): Ditto.

LayoutTests:

* http/tests/navigation/keyboard-events-during-provisional-navigation-expected.txt:
* http/tests/navigation/keyboard-events-during-provisional-navigation.html:
* http/tests/navigation/keyboard-events-during-provisional-subframe-navigation-expected.txt: Copied from LayoutTests/http/tests/navigation/keyboard-events-during-provisional-navigation-expected.txt.
* http/tests/navigation/keyboard-events-during-provisional-subframe-navigation.html: Copied from LayoutTests/http/tests/navigation/keyboard-events-during-provisional-navigation.html.
* http/tests/navigation/resources/keyboard-events-after-navigation.html:
* http/tests/navigation/resources/keyboard-events-test.js:
(runTest):
(waitForProvisionalNavigation.xhr.onreadystatechange):
(waitForProvisionalNavigation):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@216599 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/http/tests/navigation/keyboard-events-during-provisional-navigation-expected.txt
LayoutTests/http/tests/navigation/keyboard-events-during-provisional-navigation.html
LayoutTests/http/tests/navigation/keyboard-events-during-provisional-subframe-navigation-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/navigation/keyboard-events-during-provisional-subframe-navigation.html [new file with mode: 0644]
LayoutTests/http/tests/navigation/resources/keyboard-events-after-navigation.html
LayoutTests/http/tests/navigation/resources/keyboard-events-test.js
Source/WebCore/ChangeLog
Source/WebCore/dom/EventDispatcher.cpp
Source/WebCore/editing/Editor.cpp