Title: [89876] trunk
- Revision
- 89876
- Author
- [email protected]
- Date
- 2011-06-27 16:26:18 -0700 (Mon, 27 Jun 2011)
Log Message
2011-06-27 Joe Wild <[email protected]>
Reviewed by Simon Fraser.
Crash on www.crave.cnet.com in FrameView::windowClipRect()
https://bugs.webkit.org/show_bug.cgi?id=56393
Tests that a plugin of a swf file in a hidden iframe will not
crash. This test required more than 1 content file and a
timeout or else it would not repeat the error condition.
This test will only crash on platforms (like Symbian) that
don't allow nonvirtual functions to have a null this pointer.
* plugins/hidden-iframe-with-swf-plugin-expected.txt: Added.
* plugins/hidden-iframe-with-swf-plugin.html: Added.
* plugins/resources/iframe-content-with-swf-plugin.html: Added.
2011-06-27 Joe Wild <[email protected]>
Reviewed by Simon Fraser.
Crash on www.crave.cnet.com in FrameView::windowClipRect()
https://bugs.webkit.org/show_bug.cgi?id=56393
Check for a null renderer to fix a crash. This situation can
arise when external content/plugins is referenced from html
elements with style="display:none".
Test: plugins/hidden-iframe-with-swf-plugin.html
* page/FrameView.cpp:
(WebCore::FrameView::windowClipRect):
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (89875 => 89876)
--- trunk/LayoutTests/ChangeLog 2011-06-27 23:16:37 UTC (rev 89875)
+++ trunk/LayoutTests/ChangeLog 2011-06-27 23:26:18 UTC (rev 89876)
@@ -1,3 +1,21 @@
+2011-06-27 Joe Wild <[email protected]>
+
+ Reviewed by Simon Fraser.
+
+ Crash on www.crave.cnet.com in FrameView::windowClipRect()
+ https://bugs.webkit.org/show_bug.cgi?id=56393
+
+ Tests that a plugin of a swf file in a hidden iframe will not
+ crash. This test required more than 1 content file and a
+ timeout or else it would not repeat the error condition.
+
+ This test will only crash on platforms (like Symbian) that
+ don't allow nonvirtual functions to have a null this pointer.
+
+ * plugins/hidden-iframe-with-swf-plugin-expected.txt: Added.
+ * plugins/hidden-iframe-with-swf-plugin.html: Added.
+ * plugins/resources/iframe-content-with-swf-plugin.html: Added.
+
2011-06-27 Adam Barth <[email protected]>
Reviewed by Eric Seidel.
Added: trunk/LayoutTests/plugins/hidden-iframe-with-swf-plugin-expected.txt (0 => 89876)
--- trunk/LayoutTests/plugins/hidden-iframe-with-swf-plugin-expected.txt (rev 0)
+++ trunk/LayoutTests/plugins/hidden-iframe-with-swf-plugin-expected.txt 2011-06-27 23:26:18 UTC (rev 89876)
@@ -0,0 +1,8 @@
+This page tests
+https://bugs.webkit.org/show_bug.cgi?id=56393
+Bug 56393 - Crash on www.crave.cnet.com in FrameView::windowClipRect()
+It contains an iframe element with display:none that loads an HTML page with an object element of a .swf file. Object must be in a separate page (data: scheme won't show problem).
+If this test does not assert or crash and the line below reads "PASSED", it passes.
+
+PASSED
+
Added: trunk/LayoutTests/plugins/hidden-iframe-with-swf-plugin.html (0 => 89876)
--- trunk/LayoutTests/plugins/hidden-iframe-with-swf-plugin.html (rev 0)
+++ trunk/LayoutTests/plugins/hidden-iframe-with-swf-plugin.html 2011-06-27 23:26:18 UTC (rev 89876)
@@ -0,0 +1,45 @@
+<html>
+<head>
+<script>
+if (window.layoutTestController) {
+ layoutTestController.waitUntilDone();
+ layoutTestController.dumpAsText();
+}
+
+// This was the only way that I was able to wait long enough
+// for the test to crash while still running under DumpRenderTree(DRT).
+window.setTimeout( "bodyLoaded();", 300);
+
+function log(msg)
+{
+ var span = document.createElement("span");
+ document.getElementById("console").appendChild(span);
+ span.innerHTML = msg + '<br />';
+}
+
+function bodyLoaded() {
+ log("PASSED");
+ if (window.layoutTestController)
+ layoutTestController.notifyDone();
+}
+</script>
+</head>
+
+<body>
+<div style="display:none">
+ <iframe name="testiframe" id="testiframe"
+ src=""
+ </iframe>
+</div>
+<p id="description">
+This page tests<br/>
+https://bugs.webkit.org/show_bug.cgi?id=56393<br/>
+Bug 56393 - Crash on www.crave.cnet.com in FrameView::windowClipRect()<br/>
+It contains an iframe element with display:none that loads an HTML page
+with an object element of a .swf file. Object must be in a separate page
+(data: scheme won't show problem).<br/>
+If this test does not assert or crash and the line below reads "PASSED", it passes.
+</p>
+<div id="console"></div>
+</body>
+</html>
Added: trunk/LayoutTests/plugins/resources/iframe-content-with-swf-plugin.html (0 => 89876)
--- trunk/LayoutTests/plugins/resources/iframe-content-with-swf-plugin.html (rev 0)
+++ trunk/LayoutTests/plugins/resources/iframe-content-with-swf-plugin.html 2011-06-27 23:26:18 UTC (rev 89876)
@@ -0,0 +1,8 @@
+<html>
+<body>
+ <object>
+ <param name="movie" value="simple_blank.swf">
+ <embed src=""
+ </object>
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (89875 => 89876)
--- trunk/Source/WebCore/ChangeLog 2011-06-27 23:16:37 UTC (rev 89875)
+++ trunk/Source/WebCore/ChangeLog 2011-06-27 23:26:18 UTC (rev 89876)
@@ -1,3 +1,19 @@
+2011-06-27 Joe Wild <[email protected]>
+
+ Reviewed by Simon Fraser.
+
+ Crash on www.crave.cnet.com in FrameView::windowClipRect()
+ https://bugs.webkit.org/show_bug.cgi?id=56393
+
+ Check for a null renderer to fix a crash. This situation can
+ arise when external content/plugins is referenced from html
+ elements with style="display:none".
+
+ Test: plugins/hidden-iframe-with-swf-plugin.html
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::windowClipRect):
+
2011-06-27 Raymes Khoury <[email protected]>
Reviewed by Tony Chang.
Modified: trunk/Source/WebCore/page/FrameView.cpp (89875 => 89876)
--- trunk/Source/WebCore/page/FrameView.cpp 2011-06-27 23:16:37 UTC (rev 89875)
+++ trunk/Source/WebCore/page/FrameView.cpp 2011-06-27 23:26:18 UTC (rev 89876)
@@ -2127,8 +2127,9 @@
// Take our owner element and get the clip rect from the enclosing layer.
Element* elt = m_frame->ownerElement();
- RenderLayer* layer = elt->renderer()->enclosingLayer();
- // FIXME: layer should never be null, but sometimes seems to be anyway.
+ // The renderer can sometimes be null when style="display:none" interacts
+ // with external content and plugins.
+ RenderLayer* layer = elt->renderer() ? elt->renderer()->enclosingLayer() : 0;
if (!layer)
return clipRect;
FrameView* parentView = elt->document()->view();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes