Title: [231917] trunk
Revision
231917
Author
clo...@igalia.com
Date
2018-05-17 12:30:46 -0700 (Thu, 17 May 2018)

Log 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.

Modified Paths

Added Paths

Diff

Modified: trunk/ChangeLog (231916 => 231917)


--- trunk/ChangeLog	2018-05-17 19:26:52 UTC (rev 231916)
+++ trunk/ChangeLog	2018-05-17 19:30:46 UTC (rev 231917)
@@ -1,3 +1,15 @@
+2018-05-17  Carlos Alberto Lopez Perez  <clo...@igalia.com>
+
+        [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:
+
 2018-05-16  Don Olmstead  <don.olmst...@sony.com>
 
         [WinCairo] Update WinCairoRequirements

Modified: trunk/LayoutTests/ChangeLog (231916 => 231917)


--- trunk/LayoutTests/ChangeLog	2018-05-17 19:26:52 UTC (rev 231916)
+++ trunk/LayoutTests/ChangeLog	2018-05-17 19:30:46 UTC (rev 231917)
@@ -1,3 +1,16 @@
+2018-05-17  Carlos Alberto Lopez Perez  <clo...@igalia.com>
+
+        [WPE] Implement and enable FULLSCREEN_API
+        https://bugs.webkit.org/show_bug.cgi?id=185676
+
+        Reviewed by Žan Doberšek.
+
+        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.
+
 2018-05-17  Wenson Hsieh  <wenson_hs...@apple.com>
 
         [Extra zoom mode] Disabled adaptations are not reset upon mainframe navigation

Modified: trunk/LayoutTests/platform/wpe/TestExpectations (231916 => 231917)


--- trunk/LayoutTests/platform/wpe/TestExpectations	2018-05-17 19:26:52 UTC (rev 231916)
+++ trunk/LayoutTests/platform/wpe/TestExpectations	2018-05-17 19:30:46 UTC (rev 231917)
@@ -2,7 +2,6 @@
 Bug(WPE) legacy-animation-engine/compositing/ [ Skip ]
 Bug(WPE) editing/ [ Skip ]
 Bug(WPE) fonts/ [ Skip ]
-Bug(WPE) fullscreen/ [ Skip ]
 Bug(WPE) gamepad/ [ Skip ]
 Bug(WPE) inspector/ [ Skip ]
 Bug(WPE) mathml/ [ Skip ]
@@ -1015,7 +1014,6 @@
 http/tests/download [ Skip ]
 http/tests/fileapi [ Skip ]
 http/tests/frame-throttling [ Skip ]
-http/tests/fullscreen [ Skip ]
 http/tests/globalhistory [ Skip ]
 http/tests/history [ Skip ]
 http/tests/inspector [ Skip ]
@@ -1168,3 +1166,8 @@
 webkit.org/b/111647 [ Debug ] sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.2_The_while_statement/S12.6.2_A6_T2.html [ Slow ]
 webkit.org/b/111647 [ Debug ] sputnik/Conformance/13_Function_Definition/S13_A4_T4.html [ Slow ]
 webkit.org/b/111647 [ Debug ] sputnik/Unicode/Unicode_218/S7.6_A5.3_T2.html [ Slow ]
+
+# This 3 fullscreen tests are still not passing.
+webkit.org/b/185676 fullscreen/requestFullscreen-escape-key.html [ Failure ]
+webkit.org/b/185676 fullscreen/video-controls-rtl.html [ Failure ]
+webkit.org/b/185676 fullscreen/full-screen-plugin.html [ Timeout ]

Added: trunk/LayoutTests/platform/wpe/fullscreen/full-screen-placeholder-expected.txt (0 => 231917)


--- trunk/LayoutTests/platform/wpe/fullscreen/full-screen-placeholder-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/wpe/fullscreen/full-screen-placeholder-expected.txt	2018-05-17 19:30:46 UTC (rev 231917)
@@ -0,0 +1,17 @@
+This layout test checks that the offset positions of the blue and green divs does not change when the red div enters full-screen mode. Press go full-screen to begin.
+One
+Two
+EVENT(webkitfullscreenchange)
+EXPECTED (document.webkitCurrentFullScreenElement == '[object HTMLDivElement]') OK
+EXPECTED (one.offsetLeft == '68') OK
+EXPECTED (one.offsetTop == '57') OK
+EXPECTED (two.offsetLeft == '8') OK
+EXPECTED (two.offsetTop == '117') OK
+EVENT(webkitfullscreenchange)
+EXPECTED (document.webkitCurrentFullScreenElement == 'null') OK
+EXPECTED (one.offsetLeft == '68') OK
+EXPECTED (one.offsetTop == '57') OK
+EXPECTED (two.offsetLeft == '8') OK
+EXPECTED (two.offsetTop == '117') OK
+END OF TEST
+

Modified: trunk/Source/WebKit/ChangeLog (231916 => 231917)


--- trunk/Source/WebKit/ChangeLog	2018-05-17 19:26:52 UTC (rev 231916)
+++ trunk/Source/WebKit/ChangeLog	2018-05-17 19:30:46 UTC (rev 231917)
@@ -1,3 +1,29 @@
+2018-05-17  Carlos Alberto Lopez Perez  <clo...@igalia.com>
+
+        [WPE] Implement and enable FULLSCREEN_API
+        https://bugs.webkit.org/show_bug.cgi?id=185676
+
+        Reviewed by Žan Doberšek.
+
+        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):
+
 2018-05-17  Jiewen Tan  <jiewen_...@apple.com>
 
         Convert CertificateInfo into Credential in UI Process instead of Networking Process

Modified: trunk/Source/WebKit/UIProcess/API/wpe/PageClientImpl.cpp (231916 => 231917)


--- trunk/Source/WebKit/UIProcess/API/wpe/PageClientImpl.cpp	2018-05-17 19:26:52 UTC (rev 231916)
+++ trunk/Source/WebKit/UIProcess/API/wpe/PageClientImpl.cpp	2018-05-17 19:30:46 UTC (rev 231917)
@@ -321,4 +321,58 @@
     return WebCore::UserInterfaceLayoutDirection::LTR;
 }
 
+#if ENABLE(FULLSCREEN_API)
+WebFullScreenManagerProxyClient& PageClientImpl::fullScreenManagerProxyClient()
+{
+    return *this;
+}
+
+void PageClientImpl::closeFullScreenManager()
+{
+    notImplemented();
+}
+
+bool PageClientImpl::isFullScreen()
+{
+    return m_view.isFullScreen();
+}
+
+void PageClientImpl::enterFullScreen()
+{
+    if (isFullScreen())
+        return;
+
+    WebFullScreenManagerProxy* fullScreenManagerProxy = m_view.page().fullScreenManager();
+    if (fullScreenManagerProxy) {
+        fullScreenManagerProxy->willEnterFullScreen();
+        m_view.setFullScreen(true);
+        fullScreenManagerProxy->didEnterFullScreen();
+    }
+}
+
+void PageClientImpl::exitFullScreen()
+{
+    if (!isFullScreen())
+        return;
+
+    WebFullScreenManagerProxy* fullScreenManagerProxy = m_view.page().fullScreenManager();
+    if (fullScreenManagerProxy) {
+        fullScreenManagerProxy->willExitFullScreen();
+        m_view.setFullScreen(false);
+        fullScreenManagerProxy->didExitFullScreen();
+    }
+}
+
+void PageClientImpl::beganEnterFullScreen(const WebCore::IntRect& /* initialFrame */, const WebCore::IntRect& /* finalFrame */)
+{
+    notImplemented();
+}
+
+void PageClientImpl::beganExitFullScreen(const WebCore::IntRect& /* initialFrame */, const WebCore::IntRect& /* finalFrame */)
+{
+    notImplemented();
+}
+
+#endif // ENABLE(FULLSCREEN_API)
+
 } // namespace WebKit

Modified: trunk/Source/WebKit/UIProcess/API/wpe/PageClientImpl.h (231916 => 231917)


--- trunk/Source/WebKit/UIProcess/API/wpe/PageClientImpl.h	2018-05-17 19:26:52 UTC (rev 231916)
+++ trunk/Source/WebKit/UIProcess/API/wpe/PageClientImpl.h	2018-05-17 19:30:46 UTC (rev 231917)
@@ -26,6 +26,7 @@
 #pragma once
 
 #include "PageClient.h"
+#include "WebFullScreenManagerProxy.h"
 
 namespace WKWPE {
 class View;
@@ -35,7 +36,11 @@
 
 class ScrollGestureController;
 
-class PageClientImpl final : public PageClient {
+class PageClientImpl final : public PageClient
+#if ENABLE(FULLSCREEN_API)
+    , public WebFullScreenManagerProxyClient
+#endif
+{
 public:
     PageClientImpl(WKWPE::View&);
     virtual ~PageClientImpl();
@@ -117,6 +122,17 @@
 
     void didRestoreScrollPosition() override;
 
+#if ENABLE(FULLSCREEN_API)
+    WebFullScreenManagerProxyClient& fullScreenManagerProxyClient() final;
+
+    void closeFullScreenManager() override;
+    bool isFullScreen() override;
+    void enterFullScreen() override;
+    void exitFullScreen() override;
+    void beganEnterFullScreen(const WebCore::IntRect& initialFrame, const WebCore::IntRect& finalFrame) override;
+    void beganExitFullScreen(const WebCore::IntRect& initialFrame, const WebCore::IntRect& finalFrame) override;
+#endif
+
     WebCore::UserInterfaceLayoutDirection userInterfaceLayoutDirection() override;
 
     WKWPE::View& m_view;

Modified: trunk/Source/WebKit/UIProcess/API/wpe/WPEView.h (231916 => 231917)


--- trunk/Source/WebKit/UIProcess/API/wpe/WPEView.h	2018-05-17 19:26:52 UTC (rev 231916)
+++ trunk/Source/WebKit/UIProcess/API/wpe/WPEView.h	2018-05-17 19:30:46 UTC (rev 231917)
@@ -72,6 +72,11 @@
 
     void close();
 
+#if ENABLE(FULLSCREEN_API)
+    bool isFullScreen() { return m_fullScreenModeActive; };
+    void setFullScreen(bool fullScreenState) { m_fullScreenModeActive = fullScreenState; };
+#endif
+
 private:
     View(struct wpe_view_backend*, const API::PageConfiguration&);
 
@@ -86,6 +91,10 @@
 
     WebKit::CompositingManagerProxy m_compositingManagerProxy;
     struct wpe_view_backend* m_backend;
+
+#if ENABLE(FULLSCREEN_API)
+    bool m_fullScreenModeActive { false };
+#endif
 };
 
 } // namespace WKWPE

Modified: trunk/Source/cmake/OptionsWPE.cmake (231916 => 231917)


--- trunk/Source/cmake/OptionsWPE.cmake	2018-05-17 19:26:52 UTC (rev 231916)
+++ trunk/Source/cmake/OptionsWPE.cmake	2018-05-17 19:30:46 UTC (rev 231917)
@@ -34,7 +34,6 @@
 # Changing these options is completely unsupported.
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ACCESSIBILITY PRIVATE ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ASYNC_SCROLLING PRIVATE ON)
-WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_FULLSCREEN_API PRIVATE OFF)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_GEOLOCATION PRIVATE OFF)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MHTML PRIVATE ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_NETSCAPE_PLUGIN_API PRIVATE OFF)

Modified: trunk/Tools/ChangeLog (231916 => 231917)


--- trunk/Tools/ChangeLog	2018-05-17 19:26:52 UTC (rev 231916)
+++ trunk/Tools/ChangeLog	2018-05-17 19:30:46 UTC (rev 231917)
@@ -1,3 +1,13 @@
+2018-05-17  Carlos Alberto Lopez Perez  <clo...@igalia.com>
+
+        [WPE] Implement and enable FULLSCREEN_API
+        https://bugs.webkit.org/show_bug.cgi?id=185676
+
+        Reviewed by Žan Doberšek.
+
+        * TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:
+        (testWebViewFullScreen):
+
 2018-05-17  Brendan McLoughlin  <bren...@bocoup.com>
 
         Export changes to web-platform-test as part of the webkit-patch upload workflow

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp (231916 => 231917)


--- trunk/Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp	2018-05-17 19:26:52 UTC (rev 231916)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp	2018-05-17 19:30:46 UTC (rev 231917)
@@ -441,7 +441,9 @@
 #if ENABLE(FULLSCREEN_API)
 static void testWebViewFullScreen(FullScreenClientTest* test, gconstpointer)
 {
+#if PLATFORM(GTK)
     test->showInWindowAndWaitUntilMapped();
+#endif
     test->loadHtml("<html><body>FullScreen test</body></html>", 0);
     test->waitUntilLoadFinished();
     test->requestFullScreenAndWaitUntilEnteredFullScreen();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to