Commit 14984d17 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.

        Logic error in HTMLMediaElement::exitFullscreen()
        https://bugs.webkit.org/show_bug.cgi?id=58085

        The new full screen API case could fall through to the legacy API case
        unintentionally if a script calls exitFullscreen on an element which is
        not the current full screen element.

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83332 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent cebab213
2011-04-07 Jer Noble <jer.noble@apple.com>
Reviewed by Eric Carlson.
Logic error in HTMLMediaElement::exitFullscreen()
https://bugs.webkit.org/show_bug.cgi?id=58085
The new full screen API case could fall through to the legacy API case
unintentionally if a script calls exitFullscreen on an element which is
not the current full screen element.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::enterFullscreen):
(WebCore::HTMLMediaElement::exitFullscreen):
2011-04-08 Mike Reed <reed@google.com>
Reviewed by Eric Seidel.
......@@ -2449,7 +2449,7 @@ void HTMLMediaElement::enterFullscreen()
{
LOG(Media, "HTMLMediaElement::enterFullscreen");
#if ENABLE(FULLSCREEN_API)
if (document()->settings() && document()->settings()->fullScreenEnabled()) {
if (document() && document()->settings() && document()->settings()->fullScreenEnabled()) {
webkitRequestFullScreen(0);
return;
}
......@@ -2466,9 +2466,9 @@ void HTMLMediaElement::exitFullscreen()
{
LOG(Media, "HTMLMediaElement::exitFullscreen");
#if ENABLE(FULLSCREEN_API)
if (document()->settings() && document()->settings()->fullScreenEnabled()
&& document()->webkitIsFullScreen() && document()->webkitCurrentFullScreenElement() == this) {
document()->webkitCancelFullScreen();
if (document() && document()->settings() && document()->settings()->fullScreenEnabled()) {
if (document()->webkitIsFullScreen() && document()->webkitCurrentFullScreenElement() == this)
document()->webkitCancelFullScreen();
return;
}
#endif
......
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