Skip to content
  • commit-queue@webkit.org's avatar
    [BlackBerry] exitFullScreenForElement() is not working for fullscreen elements in iframes · ae533055
    commit-queue@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=90327
    
    Patch by Max Feil <mfeil@rim.com> on 2012-07-06
    Reviewed by Antonio Gomes.
    
    Source/WebKit/blackberry:
    
    Fix exit fullscreen problem for elements in iframes. The
    exitFullScreenForElement() call is passed a null element in
    this case, instead of the original element which entered
    fullscreen. If you look in Document.cpp you can see the
    exitFullScreenForElement() call being made on the topDocument
    (which has a null m_fullScreenElement) instead of the iframe's
    document.
    
    The Chromium and Windows ports get around this problem by
    storing either the fullscreen element or its frame during
    enterFullScreenForElement(), so I will bring the BlackBerry port
    in line with this. See also bug 89817.
    
    * WebCoreSupport/ChromeClientBlackBerry.cpp:
    (WebCore::ChromeClientBlackBerry::enterFullScreenForElement):
    (WebCore::ChromeClientBlackBerry::exitFullScreenForElement):
    * WebCoreSupport/ChromeClientBlackBerry.h:
    (ChromeClientBlackBerry):
    
    LayoutTests:
    
    Test of exit fullscreen for an iframe.
    
    * fullscreen/exit-full-screen-iframe-expected.txt: Added.
    * fullscreen/exit-full-screen-iframe.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122035 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    ae533055