Commit bfab9a2b authored by jer.noble@apple.com's avatar jer.noble@apple.com

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: svn://svn.chromium.org/blink/trunk@83208 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 521aaaaa
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> 2011-04-07 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel. Reviewed by Eric Seidel.
...@@ -2448,7 +2448,12 @@ bool HTMLMediaElement::isFullscreen() const ...@@ -2448,7 +2448,12 @@ bool HTMLMediaElement::isFullscreen() const
void HTMLMediaElement::enterFullscreen() void HTMLMediaElement::enterFullscreen()
{ {
LOG(Media, "HTMLMediaElement::enterFullscreen"); LOG(Media, "HTMLMediaElement::enterFullscreen");
#if ENABLE(FULLSCREEN_API)
if (document()->settings() && document()->settings()->fullScreenEnabled()) {
webkitRequestFullScreen(0);
return;
}
#endif
ASSERT(!m_isFullscreen); ASSERT(!m_isFullscreen);
m_isFullscreen = true; m_isFullscreen = true;
if (document() && document()->page()) { if (document() && document()->page()) {
...@@ -2460,7 +2465,13 @@ void HTMLMediaElement::enterFullscreen() ...@@ -2460,7 +2465,13 @@ void HTMLMediaElement::enterFullscreen()
void HTMLMediaElement::exitFullscreen() void HTMLMediaElement::exitFullscreen()
{ {
LOG(Media, "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); ASSERT(m_isFullscreen);
m_isFullscreen = false; m_isFullscreen = false;
if (document() && document()->page()) { 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