Changeset 122035 in webkit


Ignore:
Timestamp:
Jul 6, 2012 2:40:59 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[BlackBerry] exitFullScreenForElement() is not working for fullscreen elements in iframes
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.
Location:
trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r121977 r122035  
     12012-07-06  Max Feil  <mfeil@rim.com>
     2
     3        [BlackBerry] exitFullScreenForElement() is not working for fullscreen elements in iframes
     4        https://bugs.webkit.org/show_bug.cgi?id=90327
     5
     6        Reviewed by Antonio Gomes.
     7
     8        Test of exit fullscreen for an iframe.
     9
     10        * fullscreen/exit-full-screen-iframe-expected.txt: Added.
     11        * fullscreen/exit-full-screen-iframe.html: Added.
     12
    1132012-07-06  Csaba Osztrogonác  <ossy@webkit.org>
    214
  • trunk/LayoutTests/platform/chromium/TestExpectations

    r121876 r122035  
    37293729
    37303730BUGWK90517 WIN : svg/W3C-I18N/tspan-dirRTL-ubNone-in-default-context.svg = PASS CRASH
     3731
     3732// webkitIsFullScreen does not have the correct value after an iframe exits fullscreen
     3733BUGWK90704 : fullscreen/exit-full-screen-iframe.html = TEXT
  • trunk/Source/WebKit/blackberry/ChangeLog

    r122034 r122035  
     12012-07-06  Max Feil  <mfeil@rim.com>
     2
     3        [BlackBerry] exitFullScreenForElement() is not working for fullscreen elements in iframes
     4        https://bugs.webkit.org/show_bug.cgi?id=90327
     5
     6        Reviewed by Antonio Gomes.
     7
     8        Fix exit fullscreen problem for elements in iframes. The
     9        exitFullScreenForElement() call is passed a null element in
     10        this case, instead of the original element which entered
     11        fullscreen. If you look in Document.cpp you can see the
     12        exitFullScreenForElement() call being made on the topDocument
     13        (which has a null m_fullScreenElement) instead of the iframe's
     14        document.
     15
     16        The Chromium and Windows ports get around this problem by
     17        storing either the fullscreen element or its frame during
     18        enterFullScreenForElement(), so I will bring the BlackBerry port
     19        in line with this. See also bug 89817.
     20
     21        * WebCoreSupport/ChromeClientBlackBerry.cpp:
     22        (WebCore::ChromeClientBlackBerry::enterFullScreenForElement):
     23        (WebCore::ChromeClientBlackBerry::exitFullScreenForElement):
     24        * WebCoreSupport/ChromeClientBlackBerry.h:
     25        (ChromeClientBlackBerry):
     26
    1272012-07-06  Benjamin C Meyer  <bmeyer@rim.com>
    228
  • trunk/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp

    r121931 r122035  
    728728    m_webPagePrivate->enterFullScreenForElement(element);
    729729    element->document()->webkitDidEnterFullScreenForElement(element);
    730 }
    731 
    732 void ChromeClientBlackBerry::exitFullScreenForElement(WebCore::Element* element)
    733 {
    734     element->document()->webkitWillExitFullScreenForElement(element);
    735     m_webPagePrivate->exitFullScreenForElement(element);
    736     element->document()->webkitDidExitFullScreenForElement(element);
     730    m_fullScreenElement = element;
     731}
     732
     733void ChromeClientBlackBerry::exitFullScreenForElement(WebCore::Element*)
     734{
     735    // The element passed into this function is not reliable, i.e. it could
     736    // be null. In addition the parameter may be disappearing in the future.
     737    // So we use the reference to the element we saved above.
     738    ASSERT(m_fullScreenElement);
     739    m_fullScreenElement->document()->webkitWillExitFullScreenForElement(m_fullScreenElement.get());
     740    m_webPagePrivate->exitFullScreenForElement(m_fullScreenElement.get());
     741    m_fullScreenElement->document()->webkitDidExitFullScreenForElement(m_fullScreenElement.get());
     742    m_fullScreenElement.clear();
    737743}
    738744
  • trunk/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.h

    r121774 r122035  
    169169private:
    170170    BlackBerry::WebKit::WebPagePrivate* m_webPagePrivate;
     171    RefPtr<WebCore::Element> m_fullScreenElement;
    171172};
    172173
Note: See TracChangeset for help on using the changeset viewer.