Web Inspector: user gesture toggle should also force user interaction flag
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 15 May 2019 22:42:00 +0000 (22:42 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 15 May 2019 22:42:00 +0000 (22:42 +0000)
commitf5c291ac827afa316d36ebbf1d5fec121780a51c
tree8ecab86bf1a50ba727eec460bb933d6681c4eb69
parent4b179f3af23f9d0738851e78226f4396ef7801fc
Web Inspector: user gesture toggle should also force user interaction flag
https://bugs.webkit.org/show_bug.cgi?id=197269

Reviewed by Joseph Pecoraro.

Source/WebCore:

Test: inspector/runtime/evaluate-userGestureEmulation-userIsInteracting.html

* inspector/agents/page/PageRuntimeAgent.cpp:
(WebCore::PageRuntimeAgent::evaluate):

* page/ChromeClient.h:
(WebCore::ChromeClient::userIsInteracting const): Added.
(WebCore::ChromeClient::setUserIsInteracting): Added.

* testing/Internals.idl:
* testing/Internals.h:
* testing/Internals.cpp:
(WebCore::Internals::userIsInteracting): Added.

Source/WebKit:

* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::userIsInteracting const): Added.
(WebKit::WebChromeClient::setUserIsInteracting): Added.

* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::userIsInteracting const): Added.
(WebKit::WebPage::setUserIsInteracting): Added.

LayoutTests:

* inspector/runtime/evaluate-userGestureEmulation-userIsInteracting.html: Added.
* inspector/runtime/evaluate-userGestureEmulation-userIsInteracting-expected.txt: Added.

* TestExpectations:
* platform/wk2/TestExpectations:
Only enable the above test on WK2, as the user interaction state is only supported by WK2.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245366 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 files changed:
LayoutTests/ChangeLog
LayoutTests/TestExpectations
LayoutTests/inspector/runtime/evaluate-userGestureEmulation-userIsInteracting-expected.txt [new file with mode: 0644]
LayoutTests/inspector/runtime/evaluate-userGestureEmulation-userIsInteracting.html [new file with mode: 0644]
LayoutTests/platform/wk2/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/inspector/agents/page/PageRuntimeAgent.cpp
Source/WebCore/page/ChromeClient.h
Source/WebCore/testing/Internals.cpp
Source/WebCore/testing/Internals.h
Source/WebCore/testing/Internals.idl
Source/WebKit/ChangeLog
Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp
Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h
Source/WebKit/WebProcess/WebPage/WebPage.h