Changeset 231917 in webkit


Ignore:
Timestamp:
May 17, 2018 12:30:46 PM (6 years ago)
Author:
clopez@igalia.com
Message:

[WPE] Implement and enable FULLSCREEN_API
https://bugs.webkit.org/show_bug.cgi?id=185676

Reviewed by Žan Doberšek.

.:

Remove the CMake option to disable this option for WPE.
This feature gets enabled now via Source/cmake/WebKitFeatures.cmake

  • Source/cmake/OptionsWPE.cmake:

Source/WebKit:

Do the initial implementation of FULLSCREEN_API for WPE and
enable the CMake option by default.

Most of the layout tests (55 of 58) are passing and the feature
seems to work fine on different websites that use it.

  • UIProcess/API/wpe/PageClientImpl.cpp:

(WebKit::PageClientImpl::fullScreenManagerProxyClient):
(WebKit::PageClientImpl::closeFullScreenManager):
(WebKit::PageClientImpl::isFullScreen):
(WebKit::PageClientImpl::enterFullScreen):
(WebKit::PageClientImpl::exitFullScreen):
(WebKit::PageClientImpl::beganEnterFullScreen):
(WebKit::PageClientImpl::beganExitFullScreen):

  • UIProcess/API/wpe/PageClientImpl.h:
  • UIProcess/API/wpe/WPEView.h:

(WKWPE::View::isFullScreen):
(WKWPE::View::setFullScreen):

Tools:

  • TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:

(testWebViewFullScreen):

LayoutTests:

Enable all the 58 fullscreen related tests.
Are all passing but 3.

  • platform/wpe/TestExpectations:
  • platform/wpe/fullscreen/full-screen-placeholder-expected.txt: Added. Copied baseline from WebKitGTK+ port.
Location:
trunk
Files:
2 added
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r231883 r231917  
     12018-05-17  Carlos Alberto Lopez Perez  <clopez@igalia.com>
     2
     3        [WPE] Implement and enable FULLSCREEN_API
     4        https://bugs.webkit.org/show_bug.cgi?id=185676
     5
     6        Reviewed by Žan Doberšek.
     7
     8        Remove the CMake option to disable this option for WPE.
     9        This feature gets enabled now via Source/cmake/WebKitFeatures.cmake
     10
     11        * Source/cmake/OptionsWPE.cmake:
     12
    1132018-05-16  Don Olmstead  <don.olmstead@sony.com>
    214
  • trunk/LayoutTests/ChangeLog

    r231915 r231917  
     12018-05-17  Carlos Alberto Lopez Perez  <clopez@igalia.com>
     2
     3        [WPE] Implement and enable FULLSCREEN_API
     4        https://bugs.webkit.org/show_bug.cgi?id=185676
     5
     6        Reviewed by Žan Doberšek.
     7
     8        Enable all the 58 fullscreen related tests.
     9        Are all passing but 3.
     10
     11        * platform/wpe/TestExpectations:
     12        * platform/wpe/fullscreen/full-screen-placeholder-expected.txt: Added. Copied baseline from WebKitGTK+ port.
     13
    1142018-05-17  Wenson Hsieh  <wenson_hsieh@apple.com>
    215
  • trunk/LayoutTests/platform/wpe/TestExpectations

    r231634 r231917  
    33Bug(WPE) editing/ [ Skip ]
    44Bug(WPE) fonts/ [ Skip ]
    5 Bug(WPE) fullscreen/ [ Skip ]
    65Bug(WPE) gamepad/ [ Skip ]
    76Bug(WPE) inspector/ [ Skip ]
     
    10161015http/tests/fileapi [ Skip ]
    10171016http/tests/frame-throttling [ Skip ]
    1018 http/tests/fullscreen [ Skip ]
    10191017http/tests/globalhistory [ Skip ]
    10201018http/tests/history [ Skip ]
     
    11691167webkit.org/b/111647 [ Debug ] sputnik/Conformance/13_Function_Definition/S13_A4_T4.html [ Slow ]
    11701168webkit.org/b/111647 [ Debug ] sputnik/Unicode/Unicode_218/S7.6_A5.3_T2.html [ Slow ]
     1169
     1170# This 3 fullscreen tests are still not passing.
     1171webkit.org/b/185676 fullscreen/requestFullscreen-escape-key.html [ Failure ]
     1172webkit.org/b/185676 fullscreen/video-controls-rtl.html [ Failure ]
     1173webkit.org/b/185676 fullscreen/full-screen-plugin.html [ Timeout ]
  • trunk/Source/WebKit/ChangeLog

    r231916 r231917  
     12018-05-17  Carlos Alberto Lopez Perez  <clopez@igalia.com>
     2
     3        [WPE] Implement and enable FULLSCREEN_API
     4        https://bugs.webkit.org/show_bug.cgi?id=185676
     5
     6        Reviewed by Žan Doberšek.
     7
     8        Do the initial implementation of FULLSCREEN_API for WPE and
     9        enable the CMake option by default.
     10
     11        Most of the layout tests (55 of 58) are passing and the feature
     12        seems to work fine on different websites that use it.
     13
     14        * UIProcess/API/wpe/PageClientImpl.cpp:
     15        (WebKit::PageClientImpl::fullScreenManagerProxyClient):
     16        (WebKit::PageClientImpl::closeFullScreenManager):
     17        (WebKit::PageClientImpl::isFullScreen):
     18        (WebKit::PageClientImpl::enterFullScreen):
     19        (WebKit::PageClientImpl::exitFullScreen):
     20        (WebKit::PageClientImpl::beganEnterFullScreen):
     21        (WebKit::PageClientImpl::beganExitFullScreen):
     22        * UIProcess/API/wpe/PageClientImpl.h:
     23        * UIProcess/API/wpe/WPEView.h:
     24        (WKWPE::View::isFullScreen):
     25        (WKWPE::View::setFullScreen):
     26
    1272018-05-17  Jiewen Tan  <jiewen_tan@apple.com>
    228
  • trunk/Source/WebKit/UIProcess/API/wpe/PageClientImpl.cpp

    r229799 r231917  
    322322}
    323323
     324#if ENABLE(FULLSCREEN_API)
     325WebFullScreenManagerProxyClient& PageClientImpl::fullScreenManagerProxyClient()
     326{
     327    return *this;
     328}
     329
     330void PageClientImpl::closeFullScreenManager()
     331{
     332    notImplemented();
     333}
     334
     335bool PageClientImpl::isFullScreen()
     336{
     337    return m_view.isFullScreen();
     338}
     339
     340void PageClientImpl::enterFullScreen()
     341{
     342    if (isFullScreen())
     343        return;
     344
     345    WebFullScreenManagerProxy* fullScreenManagerProxy = m_view.page().fullScreenManager();
     346    if (fullScreenManagerProxy) {
     347        fullScreenManagerProxy->willEnterFullScreen();
     348        m_view.setFullScreen(true);
     349        fullScreenManagerProxy->didEnterFullScreen();
     350    }
     351}
     352
     353void PageClientImpl::exitFullScreen()
     354{
     355    if (!isFullScreen())
     356        return;
     357
     358    WebFullScreenManagerProxy* fullScreenManagerProxy = m_view.page().fullScreenManager();
     359    if (fullScreenManagerProxy) {
     360        fullScreenManagerProxy->willExitFullScreen();
     361        m_view.setFullScreen(false);
     362        fullScreenManagerProxy->didExitFullScreen();
     363    }
     364}
     365
     366void PageClientImpl::beganEnterFullScreen(const WebCore::IntRect& /* initialFrame */, const WebCore::IntRect& /* finalFrame */)
     367{
     368    notImplemented();
     369}
     370
     371void PageClientImpl::beganExitFullScreen(const WebCore::IntRect& /* initialFrame */, const WebCore::IntRect& /* finalFrame */)
     372{
     373    notImplemented();
     374}
     375
     376#endif // ENABLE(FULLSCREEN_API)
     377
    324378} // namespace WebKit
  • trunk/Source/WebKit/UIProcess/API/wpe/PageClientImpl.h

    r229799 r231917  
    2727
    2828#include "PageClient.h"
     29#include "WebFullScreenManagerProxy.h"
    2930
    3031namespace WKWPE {
     
    3637class ScrollGestureController;
    3738
    38 class PageClientImpl final : public PageClient {
     39class PageClientImpl final : public PageClient
     40#if ENABLE(FULLSCREEN_API)
     41    , public WebFullScreenManagerProxyClient
     42#endif
     43{
    3944public:
    4045    PageClientImpl(WKWPE::View&);
     
    118123    void didRestoreScrollPosition() override;
    119124
     125#if ENABLE(FULLSCREEN_API)
     126    WebFullScreenManagerProxyClient& fullScreenManagerProxyClient() final;
     127
     128    void closeFullScreenManager() override;
     129    bool isFullScreen() override;
     130    void enterFullScreen() override;
     131    void exitFullScreen() override;
     132    void beganEnterFullScreen(const WebCore::IntRect& initialFrame, const WebCore::IntRect& finalFrame) override;
     133    void beganExitFullScreen(const WebCore::IntRect& initialFrame, const WebCore::IntRect& finalFrame) override;
     134#endif
     135
    120136    WebCore::UserInterfaceLayoutDirection userInterfaceLayoutDirection() override;
    121137
  • trunk/Source/WebKit/UIProcess/API/wpe/WPEView.h

    r229799 r231917  
    7373    void close();
    7474
     75#if ENABLE(FULLSCREEN_API)
     76    bool isFullScreen() { return m_fullScreenModeActive; };
     77    void setFullScreen(bool fullScreenState) { m_fullScreenModeActive = fullScreenState; };
     78#endif
     79
    7580private:
    7681    View(struct wpe_view_backend*, const API::PageConfiguration&);
     
    8792    WebKit::CompositingManagerProxy m_compositingManagerProxy;
    8893    struct wpe_view_backend* m_backend;
     94
     95#if ENABLE(FULLSCREEN_API)
     96    bool m_fullScreenModeActive { false };
     97#endif
    8998};
    9099
  • trunk/Source/cmake/OptionsWPE.cmake

    r231843 r231917  
    3535WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ACCESSIBILITY PRIVATE ON)
    3636WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ASYNC_SCROLLING PRIVATE ON)
    37 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_FULLSCREEN_API PRIVATE OFF)
    3837WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_GEOLOCATION PRIVATE OFF)
    3938WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MHTML PRIVATE ON)
  • trunk/Tools/ChangeLog

    r231912 r231917  
     12018-05-17  Carlos Alberto Lopez Perez  <clopez@igalia.com>
     2
     3        [WPE] Implement and enable FULLSCREEN_API
     4        https://bugs.webkit.org/show_bug.cgi?id=185676
     5
     6        Reviewed by Žan Doberšek.
     7
     8        * TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:
     9        (testWebViewFullScreen):
     10
    1112018-05-17  Brendan McLoughlin  <brendan@bocoup.com>
    212
  • trunk/Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp

    r231298 r231917  
    442442static void testWebViewFullScreen(FullScreenClientTest* test, gconstpointer)
    443443{
     444#if PLATFORM(GTK)
    444445    test->showInWindowAndWaitUntilMapped();
     446#endif
    445447    test->loadHtml("<html><body>FullScreen test</body></html>", 0);
    446448    test->waitUntilLoadFinished();
Note: See TracChangeset for help on using the changeset viewer.