Title: [122078] trunk/Source/WebKit/efl
- Revision
- 122078
- Author
- [email protected]
- Date
- 2012-07-08 20:51:26 -0700 (Sun, 08 Jul 2012)
Log 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 <[email protected]> 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):
Modified Paths
Diff
Modified: trunk/Source/WebKit/efl/ChangeLog (122077 => 122078)
--- trunk/Source/WebKit/efl/ChangeLog 2012-07-09 03:48:56 UTC (rev 122077)
+++ trunk/Source/WebKit/efl/ChangeLog 2012-07-09 03:51:26 UTC (rev 122078)
@@ -1,3 +1,22 @@
+2012-07-08 Christophe Dumez <[email protected]>
+
+ [EFL] REGRESSION (r122035): fullscreen/exit-full-screen-iframe.html is crashing
+ https://bugs.webkit.org/show_bug.cgi?id=90735
+
+ 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):
+
2012-07-07 Jinwoo Song <[email protected]>
[EFL] Fix build break when Accelerated Compositing is on.
Modified: trunk/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp (122077 => 122078)
--- trunk/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp 2012-07-09 03:48:56 UTC (rev 122077)
+++ trunk/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp 2012-07-09 03:51:26 UTC (rev 122078)
@@ -628,14 +628,25 @@
void ChromeClientEfl::enterFullScreenForElement(WebCore::Element* element)
{
+ // Keep a reference to the element to use it later in
+ // exitFullScreenForElement().
+ m_fullScreenElement = element;
+
element->document()->webkitWillEnterFullScreenForElement(element);
element->document()->webkitDidEnterFullScreenForElement(element);
}
-void ChromeClientEfl::exitFullScreenForElement(WebCore::Element* element)
+void ChromeClientEfl::exitFullScreenForElement(WebCore::Element*)
{
- element->document()->webkitWillExitFullScreenForElement(element);
- element->document()->webkitDidExitFullScreenForElement(element);
+ // The element passed into this function is not reliable, i.e. it could
+ // be null. In addition the parameter may be disappearing in the future.
+ // So we use the reference to the element we saved above.
+ ASSERT(m_fullScreenElement);
+
+ m_fullScreenElement->document()->webkitWillExitFullScreenForElement(m_fullScreenElement.get());
+ m_fullScreenElement->document()->webkitDidExitFullScreenForElement(m_fullScreenElement.get());
+
+ m_fullScreenElement.clear();
}
#endif
Modified: trunk/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.h (122077 => 122078)
--- trunk/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.h 2012-07-09 03:48:56 UTC (rev 122077)
+++ trunk/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.h 2012-07-09 03:51:26 UTC (rev 122078)
@@ -192,6 +192,9 @@
Evas_Object* m_view;
KURL m_hoveredLinkURL;
+#if ENABLE(FULLSCREEN_API)
+ RefPtr<Element> m_fullScreenElement;
+#endif
};
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes