Commit b14cd6d7 authored by jer.noble@apple.com's avatar jer.noble@apple.com
Browse files

2011-04-07 Jer Noble <jer.noble@apple.com>

        Reviewed by Eric Carlson.

        HTMLVideoElement::webkitEnterFullscreen does not use new Full Screen API when available.
        https://bugs.webkit.org/show_bug.cgi?id=58070

        Make the HTMLMediaElement full screen functions call into the new Full Screen API when
        FULLSCREEN_API is enabled.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::enterFullscreen):
        (WebCore::HTMLMediaElement::exitFullscreen):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83208 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 1c3b1d07
2011-04-07 Jer Noble <jer.noble@apple.com>
Reviewed by Eric Carlson.
HTMLVideoElement::webkitEnterFullscreen does not use new Full Screen API when available.
https://bugs.webkit.org/show_bug.cgi?id=58070
Make the HTMLMediaElement full screen functions call into the new Full Screen API when
FULLSCREEN_API is enabled.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::enterFullscreen):
(WebCore::HTMLMediaElement::exitFullscreen):
2011-04-07 Adam Barth <abarth@webkit.org>
 
Reviewed by Eric Seidel.
......@@ -2448,7 +2448,12 @@ bool HTMLMediaElement::isFullscreen() const
void HTMLMediaElement::enterFullscreen()
{
LOG(Media, "HTMLMediaElement::enterFullscreen");
#if ENABLE(FULLSCREEN_API)
if (document()->settings() && document()->settings()->fullScreenEnabled()) {
webkitRequestFullScreen(0);
return;
}
#endif
ASSERT(!m_isFullscreen);
m_isFullscreen = true;
if (document() && document()->page()) {
......@@ -2460,7 +2465,13 @@ void HTMLMediaElement::enterFullscreen()
void HTMLMediaElement::exitFullscreen()
{
LOG(Media, "HTMLMediaElement::exitFullscreen");
#if ENABLE(FULLSCREEN_API)
if (document()->settings() && document()->settings()->fullScreenEnabled()
&& document()->webkitIsFullScreen() && document()->webkitCurrentFullScreenElement() == this) {
document()->webkitCancelFullScreen();
return;
}
#endif
ASSERT(m_isFullscreen);
m_isFullscreen = false;
if (document() && document()->page()) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment