Changeset 122078 in webkit


Ignore:
Timestamp:
Jul 8, 2012 8:51:26 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[EFL] REGRESSION (r122035): fullscreen/exit-full-screen-iframe.html is crashing
https://bugs.webkit.org/show_bug.cgi?id=90735

Patch by Christophe Dumez <Christophe Dumez> on 2012-07-08
Reviewed by Antonio Gomes.

Keep a reference to the Element passed to enterFullScreenForElement() so
that we can reuse it later in exitFullScreenForElement(). This is needed
because the Element passed to exitFullScreenForElement() may be null.
This fixes the crash for the fullscreen/exit-full-screen-iframe.html
test introduced in r122035.

  • WebCoreSupport/ChromeClientEfl.cpp:

(WebCore::ChromeClientEfl::enterFullScreenForElement):
(WebCore::ChromeClientEfl::exitFullScreenForElement):

  • WebCoreSupport/ChromeClientEfl.h:

(ChromeClientEfl):

Location:
trunk/Source/WebKit/efl
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/efl/ChangeLog

    r122057 r122078  
     12012-07-08  Christophe Dumez  <christophe.dumez@intel.com>
     2
     3        [EFL] REGRESSION (r122035): fullscreen/exit-full-screen-iframe.html is crashing
     4        https://bugs.webkit.org/show_bug.cgi?id=90735
     5
     6        Reviewed by Antonio Gomes.
     7
     8        Keep a reference to the Element passed to enterFullScreenForElement() so
     9        that we can reuse it later in exitFullScreenForElement(). This is needed
     10        because the Element passed to exitFullScreenForElement() may be null.
     11        This fixes the crash for the fullscreen/exit-full-screen-iframe.html
     12        test introduced in r122035.
     13
     14        * WebCoreSupport/ChromeClientEfl.cpp:
     15        (WebCore::ChromeClientEfl::enterFullScreenForElement):
     16        (WebCore::ChromeClientEfl::exitFullScreenForElement):
     17        * WebCoreSupport/ChromeClientEfl.h:
     18        (ChromeClientEfl):
     19
    1202012-07-07  Jinwoo Song  <jinwoo7.song@samsung.com>
    221
  • trunk/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp

    r121898 r122078  
    629629void ChromeClientEfl::enterFullScreenForElement(WebCore::Element* element)
    630630{
     631    // Keep a reference to the element to use it later in
     632    // exitFullScreenForElement().
     633    m_fullScreenElement = element;
     634
    631635    element->document()->webkitWillEnterFullScreenForElement(element);
    632636    element->document()->webkitDidEnterFullScreenForElement(element);
    633637}
    634638
    635 void ChromeClientEfl::exitFullScreenForElement(WebCore::Element* element)
    636 {
    637     element->document()->webkitWillExitFullScreenForElement(element);
    638     element->document()->webkitDidExitFullScreenForElement(element);
     639void ChromeClientEfl::exitFullScreenForElement(WebCore::Element*)
     640{
     641    // The element passed into this function is not reliable, i.e. it could
     642    // be null. In addition the parameter may be disappearing in the future.
     643    // So we use the reference to the element we saved above.
     644    ASSERT(m_fullScreenElement);
     645
     646    m_fullScreenElement->document()->webkitWillExitFullScreenForElement(m_fullScreenElement.get());
     647    m_fullScreenElement->document()->webkitDidExitFullScreenForElement(m_fullScreenElement.get());
     648
     649    m_fullScreenElement.clear();
    639650}
    640651#endif
  • trunk/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.h

    r119482 r122078  
    193193    Evas_Object* m_view;
    194194    KURL m_hoveredLinkURL;
     195#if ENABLE(FULLSCREEN_API)
     196    RefPtr<Element> m_fullScreenElement;
     197#endif
    195198};
    196199}
Note: See TracChangeset for help on using the changeset viewer.