Changeset 83332 in webkit


Ignore:
Timestamp:
Apr 8, 2011 1:11:32 PM (13 years ago)
Author:
jer.noble@apple.com
Message:

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):
Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r83329 r83332  
     12011-04-07  Jer Noble  <jer.noble@apple.com>
     2
     3        Reviewed by Eric Carlson.
     4
     5        Logic error in HTMLMediaElement::exitFullscreen()
     6        https://bugs.webkit.org/show_bug.cgi?id=58085
     7
     8        The new full screen API case could fall through to the legacy API case
     9        unintentionally if a script calls exitFullscreen on an element which is
     10        not the current full screen element.
     11
     12        * html/HTMLMediaElement.cpp:
     13        (WebCore::HTMLMediaElement::enterFullscreen):
     14        (WebCore::HTMLMediaElement::exitFullscreen):
     15
    1162011-04-08  Mike Reed  <reed@google.com>
    217
  • trunk/Source/WebCore/html/HTMLMediaElement.cpp

    r83208 r83332  
    24502450    LOG(Media, "HTMLMediaElement::enterFullscreen");
    24512451#if ENABLE(FULLSCREEN_API)
    2452     if (document()->settings() && document()->settings()->fullScreenEnabled()) {
     2452    if (document() && document()->settings() && document()->settings()->fullScreenEnabled()) {
    24532453        webkitRequestFullScreen(0);
    24542454        return;
     
    24672467    LOG(Media, "HTMLMediaElement::exitFullscreen");
    24682468#if ENABLE(FULLSCREEN_API)
    2469     if (document()->settings() && document()->settings()->fullScreenEnabled()
    2470         && document()->webkitIsFullScreen() && document()->webkitCurrentFullScreenElement() == this) {
    2471         document()->webkitCancelFullScreen();
     2469    if (document() && document()->settings() && document()->settings()->fullScreenEnabled()) {
     2470        if (document()->webkitIsFullScreen() && document()->webkitCurrentFullScreenElement() == this)
     2471            document()->webkitCancelFullScreen();
    24722472        return;
    24732473    }
Note: See TracChangeset for help on using the changeset viewer.