Bug 153220 - Add a mode parameter to MediaControllerInterface::supportsFullscreen() and ChromeClient::supportsVideoFullscreen()
Summary: Add a mode parameter to MediaControllerInterface::supportsFullscreen() and Ch...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ada Chan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-01-18 22:16 PST by Ada Chan
Modified: 2016-01-22 15:39 PST (History)
2 users (show)

See Also:


Attachments
Patch (22.94 KB, patch)
2016-01-21 11:29 PST, Ada Chan
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews100 for mac-yosemite (755.68 KB, application/zip)
2016-01-21 12:20 PST, Build Bot
no flags Details
Archive of layout-test-results from ews115 for mac-yosemite (954.31 KB, application/zip)
2016-01-21 12:26 PST, Build Bot
no flags Details
Patch (23.33 KB, patch)
2016-01-21 14:17 PST, Ada Chan
no flags Details | Formatted Diff | Diff
Patch (23.07 KB, patch)
2016-01-21 15:22 PST, Ada Chan
eric.carlson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ada Chan 2016-01-18 22:16:36 PST
Add a mode parameter to MediaControllerInterface::supportsFullscreen() and ChromeClient::supportsVideoFullscreen().

This seems like a logical thing to do as you can specify which fullscreen mode in MediaElement::enterFullscreen().

Part of <rdar://problem/24171440>.
Comment 1 Ada Chan 2016-01-21 11:29:55 PST
Created attachment 269474 [details]
Patch
Comment 2 Build Bot 2016-01-21 12:20:47 PST
Comment on attachment 269474 [details]
Patch

Attachment 269474 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/722601

New failing tests:
media/media-fullscreen-inline.html
media/video-controls-visible-exiting-fullscreen.html
Comment 3 Build Bot 2016-01-21 12:20:49 PST
Created attachment 269481 [details]
Archive of layout-test-results from ews100 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews100  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 4 Build Bot 2016-01-21 12:26:46 PST
Comment on attachment 269474 [details]
Patch

Attachment 269474 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/722597

New failing tests:
media/media-fullscreen-inline.html
media/video-controls-visible-exiting-fullscreen.html
Comment 5 Build Bot 2016-01-21 12:26:50 PST
Created attachment 269483 [details]
Archive of layout-test-results from ews115 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews115  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 6 Ada Chan 2016-01-21 13:42:39 PST
Comment on attachment 269474 [details]
Patch

Fixing test failures and will post updated patch soon.
Comment 7 Ada Chan 2016-01-21 14:17:37 PST
Created attachment 269491 [details]
Patch
Comment 8 Chris Dumez 2016-01-21 14:31:30 PST
Comment on attachment 269491 [details]
Patch

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

> Source/WebCore/html/HTMLMediaElement.cpp:5300
> +    if (!document().page()->chrome().client().supportsVideoFullscreen(m_videoFullscreenMode))

What if document().page() is null? I believe it can be based on the null check a few lines below.
Comment 9 Ada Chan 2016-01-21 14:39:18 PST
(In reply to comment #8)
> Comment on attachment 269491 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=269491&action=review
> 
> > Source/WebCore/html/HTMLMediaElement.cpp:5300
> > +    if (!document().page()->chrome().client().supportsVideoFullscreen(m_videoFullscreenMode))
> 
> What if document().page() is null? I believe it can be based on the null
> check a few lines below.

Good point.  I'll move the null check up and post an updated patch.
Comment 10 Ada Chan 2016-01-21 15:21:24 PST
Turns out that early return is not necessary.  HTMLVideoElement::setFullscreenMode(mode) should not call HTMLMediaElement::enterfullscreen(mode) if the mode is not supported.  I'll revert that code to what it was before.
Comment 11 Ada Chan 2016-01-21 15:22:00 PST
Created attachment 269503 [details]
Patch
Comment 12 Eric Carlson 2016-01-22 13:00:06 PST
Comment on attachment 269503 [details]
Patch

This looks good to me, but a WK2 reviewer will have to give an official r+.
Comment 13 Ada Chan 2016-01-22 13:14:25 PST
I talked to Sam Weinig who said this doesn't need an official WK2 reviewer's review as this just adds a new parameter.
Comment 14 Ada Chan 2016-01-22 15:39:55 PST
Committed:
http://trac.webkit.org/changeset/195487