Pressing the Escape key should not be a valid user gesture to enter fullscreen
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 26 Jul 2017 17:15:31 +0000 (17:15 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 26 Jul 2017 17:15:31 +0000 (17:15 +0000)
https://bugs.webkit.org/show_bug.cgi?id=174864
<rdar://problem/33009088>

Reviewed by Geoffrey Garen.

Source/WebCore:

Pressing the Escape key should not be a valid user gesture to enter fullscreen since this
is the gesture to exit fullscreen already.

Test: fullscreen/requestFullscreen-escape-key.html

* dom/Document.cpp:
(WebCore::Document::requestFullScreenForElement):
* dom/UserGestureIndicator.cpp:
(WebCore::UserGestureIndicator::UserGestureIndicator):
* dom/UserGestureIndicator.h:
(WebCore::UserGestureToken::create):
(WebCore::UserGestureToken::gestureType):
(WebCore::UserGestureToken::UserGestureToken):
* page/EventHandler.cpp:
(WebCore::EventHandler::internalKeyEvent):

Tools:

Add support for eventSender.keyDown('escape') in DRT to match the behavior of
WKTR.

* DumpRenderTree/mac/EventSendingController.mm:
(-[EventSendingController keyDown:withModifiers:withLocation:]):

LayoutTests:

Add layout test coverage.

* fullscreen/requestFullscreen-escape-key-expected.txt: Added.
* fullscreen/requestFullscreen-escape-key.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219950 268f45cc-cd09-0410-ab3c-d52691b4dbfc


No differences found