Bug 185676

Summary: [WPE] Implement and enable FULLSCREEN_API
Product: WebKit Reporter: Carlos Alberto Lopez Perez <clopez>
Component: WPE WebKitAssignee: Carlos Alberto Lopez Perez <clopez>
Status: RESOLVED FIXED    
Severity: Normal CC: aperez, bugs-noreply, ews-watchlist, zan
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=75553
Attachments:
Description Flags
Patch
none
Archive of layout-test-results from ews125 for ios-simulator-wk2
none
Archive of layout-test-results from ews202 for win-future
none
Patch none

Description Carlos Alberto Lopez Perez 2018-05-16 03:24:52 PDT
Yesterday I discovered doing tests with WPE on video sites (e.g: youtube) that WPE doesn't implement FULLSCREEN_API.

This HTML5 API is needed for any website that wants to show content full-screen.

Is mostly useful for playing videos, although it can be used to show any content full-screen.

It looks enabling this on WPE is not difficult (I think I already have it working)  ... so I'll submit a patch.
Comment 1 Carlos Alberto Lopez Perez 2018-05-16 03:41:12 PDT
Created attachment 340483 [details]
Patch
Comment 2 Zan Dobersek 2018-05-16 04:00:37 PDT
Comment on attachment 340483 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=340483&action=review

> Source/WebKit/UIProcess/API/wpe/PageClientImpl.cpp:347
> +    WebFullScreenManagerProxy* fullScreenManagerProxy = m_view.page().fullScreenManager();
> +    fullScreenManagerProxy->willEnterFullScreen();
> +    fullScreenManagerProxy->didEnterFullScreen();

Guaranteed to be non-null?

> Source/WebKit/UIProcess/API/wpe/PageClientImpl.cpp:358
> +    WebFullScreenManagerProxy* fullScreenManagerProxy = m_view.page().fullScreenManager();
> +    fullScreenManagerProxy->willExitFullScreen();
> +    fullScreenManagerProxy->didExitFullScreen();

Guaranteed to be non-null?
Comment 3 Carlos Alberto Lopez Perez 2018-05-16 04:30:05 PDT
(In reply to Zan Dobersek from comment #2)
> Comment on attachment 340483 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=340483&action=review
> 
> > Source/WebKit/UIProcess/API/wpe/PageClientImpl.cpp:347
> > +    WebFullScreenManagerProxy* fullScreenManagerProxy = m_view.page().fullScreenManager();
> > +    fullScreenManagerProxy->willEnterFullScreen();
> > +    fullScreenManagerProxy->didEnterFullScreen();
> 
> Guaranteed to be non-null?
> 
> > Source/WebKit/UIProcess/API/wpe/PageClientImpl.cpp:358
> > +    WebFullScreenManagerProxy* fullScreenManagerProxy = m_view.page().fullScreenManager();
> > +    fullScreenManagerProxy->willExitFullScreen();
> > +    fullScreenManagerProxy->didExitFullScreen();
> 
> Guaranteed to be non-null?

I think so, its a RefPtr. 

And I see how other callers of this code are not null checking for it, for example in the WebKitGTK+ impl at https://trac.webkit.org/browser/trunk/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp?rev=225900#L1239
Comment 4 EWS Watchlist 2018-05-16 05:23:49 PDT
Comment on attachment 340483 [details]
Patch

Attachment 340483 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/7697389

New failing tests:
transitions/interrupted-transition-hardware.html
Comment 5 EWS Watchlist 2018-05-16 05:23:50 PDT
Created attachment 340485 [details]
Archive of layout-test-results from ews125 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews125  Port: ios-simulator-wk2  Platform: Mac OS X 10.13.4
Comment 6 EWS Watchlist 2018-05-16 16:07:45 PDT
Comment on attachment 340483 [details]
Patch

Attachment 340483 [details] did not pass win-ews (win):
Output: http://webkit-queues.webkit.org/results/7702816

New failing tests:
http/tests/security/canvas-remote-read-remote-video-blocked-no-crossorigin.html
Comment 7 EWS Watchlist 2018-05-16 16:07:56 PDT
Created attachment 340538 [details]
Archive of layout-test-results from ews202 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews202  Port: win-future  Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Comment 8 Carlos Alberto Lopez Perez 2018-05-17 10:29:49 PDT
Created attachment 340595 [details]
Patch

Patch v2, nullcheck fullScreenManagerProxy
Comment 9 Carlos Alberto Lopez Perez 2018-05-17 12:30:52 PDT
Comment on attachment 340595 [details]
Patch

Clearing flags on attachment: 340595

Committed r231917: <https://trac.webkit.org/changeset/231917>
Comment 10 Carlos Alberto Lopez Perez 2018-05-17 12:30:57 PDT
All reviewed patches have been landed.  Closing bug.