[WPE] Use new view state API from libwpe
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Dec 2018 12:57:22 +0000 (12:57 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Dec 2018 12:57:22 +0000 (12:57 +0000)
commit3a3824d1db4141d091a652018355c010bbfb6728
tree23c6670df4d98ebc1c9815215aa40bb8ac3dfa52
parent2ebc56bcd5993726d25fe21e99eb51dd132be6ed
[WPE] Use new view state API from libwpe
https://bugs.webkit.org/show_bug.cgi?id=191906

Reviewed by Žan Doberšek.

Source/WebKit:

Remove WKViewSetViewState from the C API.

* UIProcess/API/C/wpe/WKAPICastWPE.h:
* UIProcess/API/C/wpe/WKView.cpp:
* UIProcess/API/C/wpe/WKView.h:
* UIProcess/API/wpe/WPEView.cpp:
(WKWPE::View::View): Add implementation for activity_state_changed vfunc of the view backend client.):
(WKWPE::View::setViewState): Remove the default flags.
* UIProcess/API/wpe/WPEView.h:
(WKWPE::View::setViewState const): Make it private.

Tools:

* TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:
(beforeAll): Enable /webkit/WebKitWebView/page-visibility in WPE.
* TestWebKitAPI/glib/WebKitGLib/TestMain.h:
(Test::createWebViewBackend): Make the view initially hidden for consistency with GTK+ tests.
* TestWebKitAPI/glib/WebKitGLib/WebViewTest.h:
* TestWebKitAPI/glib/WebKitGLib/wpe/WebViewTestWPE.cpp:
(WebViewTest::showInWindow): Add wpe_view_activity_state_visible, wpe_view_activity_state_in_window and
wpe_view_activity_state_focused state flags.
(WebViewTest::hideView): Remove wpe_view_activity_state_visible and wpe_view_activity_state_focused state flags.
* wpe/backends/HeadlessViewBackend.cpp:
(WPEToolingBackends::HeadlessViewBackend::HeadlessViewBackend): Assume view is always visible, focused and in window.
* wpe/backends/WindowViewBackend.cpp:
(WPEToolingBackends::WindowViewBackend::WindowViewBackend): Update the view state flags depending on state
received in configure callback.
* wpe/jhbuild.modules: Bump libwpe to 1.1.0

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239203 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/C/wpe/WKAPICastWPE.h
Source/WebKit/UIProcess/API/C/wpe/WKView.cpp
Source/WebKit/UIProcess/API/C/wpe/WKView.h
Source/WebKit/UIProcess/API/wpe/WPEView.cpp
Source/WebKit/UIProcess/API/wpe/WPEView.h
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp
Tools/TestWebKitAPI/glib/WebKitGLib/TestMain.h
Tools/TestWebKitAPI/glib/WebKitGLib/WebViewTest.h
Tools/TestWebKitAPI/glib/WebKitGLib/wpe/WebViewTestWPE.cpp
Tools/wpe/backends/HeadlessViewBackend.cpp
Tools/wpe/backends/WindowViewBackend.cpp
Tools/wpe/jhbuild.modules