<video> elements with no video tracks report false for webkitSupportsFullscreen.
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 May 2012 19:55:05 +0000 (19:55 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 May 2012 19:55:05 +0000 (19:55 +0000)
commitb240c7a522a9bd530401ee7998a7ea138765139f
treec94112559b835c39aec2f7d1bfe562e87b197b6e
parentefb2623042eff5ceebe850531051a0ff341b6b48
<video> elements with no video tracks report false for webkitSupportsFullscreen.
https://bugs.webkit.org/show_bug.cgi?id=86650

Reviewed by Eric Carlson.

Source/WebCore:

No new tests; updated media/media-fullscreen-inline.html.

With the new Full Screen API, the restriction that only video elements with
video tracks can enter full screen seems arbitrary. Some media types will
occasionally determine they have video tracks long after loadedmetadata, which
breaks websites who check for webkitSupportsFullscreen(). Relax the restriction
on webkitSupportsFullscreen() for ports where the Full Screen API is enabled and
supported so as to no longer require hasVideo().

* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::supportsFullscreen):

LayoutTests:

Fix media-fullscreen.js to support the new FULLSCREEN_API events, if present.
Fix the media-fullscreen-inline.html test and unskip on Lion.

* media/media-fullscreen-inline-expected.txt:
* media/media-fullscreen-inline.html:
* media/media-fullscreen.js:
(fullscreenchange):
(loadedmetadata):
(addEventListeners):
* platform/mac-lion/Skipped:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117326 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/media/media-fullscreen-inline-expected.txt
LayoutTests/media/media-fullscreen-inline.html
LayoutTests/media/media-fullscreen.js
LayoutTests/platform/mac-lion/Skipped
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLVideoElement.cpp