Title: [105250] trunk
Revision
105250
Author
[email protected]
Date
2012-01-18 02:00:20 -0800 (Wed, 18 Jan 2012)

Log Message

Source/WebCore: Crash in FrameView::forceLayoutParentViewIfNeeded.
https://bugs.webkit.org/show_bug.cgi?id=76309

Reviewed by Nikolas Zimmermann.

updateWidgetPositions can blow away the owning renderer
and its frameview, so need to protect it with refptr.

Test: svg/dom/parent-view-layout-crash.html

* page/FrameView.cpp:
(WebCore::FrameView::forceLayoutParentViewIfNeeded):

LayoutTests: Crash in FrameView::forceLayoutParentViewIfNeeded.
https://bugs.webkit.org/show_bug.cgi?id=76309

Reviewed by Nikolas Zimmermann.

* svg/dom/parent-view-layout-crash-expected.txt: Added.
* svg/dom/parent-view-layout-crash.html: Added.
* svg/dom/resources/svg-font-face.svg: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (105249 => 105250)


--- trunk/LayoutTests/ChangeLog	2012-01-18 09:15:24 UTC (rev 105249)
+++ trunk/LayoutTests/ChangeLog	2012-01-18 10:00:20 UTC (rev 105250)
@@ -1,3 +1,14 @@
+2012-01-18  Abhishek Arya  <[email protected]>
+
+        Crash in FrameView::forceLayoutParentViewIfNeeded.
+        https://bugs.webkit.org/show_bug.cgi?id=76309
+
+        Reviewed by Nikolas Zimmermann.
+
+        * svg/dom/parent-view-layout-crash-expected.txt: Added.
+        * svg/dom/parent-view-layout-crash.html: Added.
+        * svg/dom/resources/svg-font-face.svg: Added.
+
 2012-01-18  Shinya Kawanaka  <[email protected]>
 
         Move ShadowContentElement from dom/ to html/ and make ShadowContentElement subclass of HTMLElement.

Added: trunk/LayoutTests/svg/dom/parent-view-layout-crash-expected.txt (0 => 105250)


--- trunk/LayoutTests/svg/dom/parent-view-layout-crash-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/svg/dom/parent-view-layout-crash-expected.txt	2012-01-18 10:00:20 UTC (rev 105250)
@@ -0,0 +1 @@
+Test passes if it does not crash.  

Added: trunk/LayoutTests/svg/dom/parent-view-layout-crash.html (0 => 105250)


--- trunk/LayoutTests/svg/dom/parent-view-layout-crash.html	                        (rev 0)
+++ trunk/LayoutTests/svg/dom/parent-view-layout-crash.html	2012-01-18 10:00:20 UTC (rev 105250)
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+Test passes if it does not crash.
+<style></style>
+<script>
+if (window.layoutTestController)
+    layoutTestController.dumpAsText();
+
+function runTest()
+{
+    document.styleSheets[0].insertRule("font {}", 0);
+}
+</script>
+<object data=""
+<object style="content:counter(item)" data="" _onload_="runTest()"></object>
+</script>
+</html>
+

Added: trunk/LayoutTests/svg/dom/resources/svg-font-face.svg (0 => 105250)


--- trunk/LayoutTests/svg/dom/resources/svg-font-face.svg	                        (rev 0)
+++ trunk/LayoutTests/svg/dom/resources/svg-font-face.svg	2012-01-18 10:00:20 UTC (rev 105250)
@@ -0,0 +1,4 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <font-face-uri xlink:href=""
+</svg>
+

Modified: trunk/Source/WebCore/ChangeLog (105249 => 105250)


--- trunk/Source/WebCore/ChangeLog	2012-01-18 09:15:24 UTC (rev 105249)
+++ trunk/Source/WebCore/ChangeLog	2012-01-18 10:00:20 UTC (rev 105250)
@@ -1,3 +1,18 @@
+2012-01-18  Abhishek Arya  <[email protected]>
+
+        Crash in FrameView::forceLayoutParentViewIfNeeded.        
+        https://bugs.webkit.org/show_bug.cgi?id=76309
+
+        Reviewed by Nikolas Zimmermann.
+
+        updateWidgetPositions can blow away the owning renderer
+        and its frameview, so need to protect it with refptr.
+
+        Test: svg/dom/parent-view-layout-crash.html
+
+        * page/FrameView.cpp:
+        (WebCore::FrameView::forceLayoutParentViewIfNeeded):
+
 2012-01-18  Shinya Kawanaka  <[email protected]>
 
         Move ShadowContentElement from dom/ to html/ and make ShadowContentElement subclass of HTMLElement.

Modified: trunk/Source/WebCore/page/FrameView.cpp (105249 => 105250)


--- trunk/Source/WebCore/page/FrameView.cpp	2012-01-18 09:15:24 UTC (rev 105249)
+++ trunk/Source/WebCore/page/FrameView.cpp	2012-01-18 10:00:20 UTC (rev 105250)
@@ -915,6 +915,8 @@
     if (!svgRoot->needsSizeNegotiationWithHostDocument())
         return;
 
+    RefPtr<FrameView> frameView = ownerRenderer->frame()->view();
+
     ASSERT(!m_inLayoutParentView);
     TemporaryChange<bool> resetInLayoutParentView(m_inLayoutParentView, true);
 
@@ -933,7 +935,6 @@
     rootView->updateWidgetPositions();
 
     // Synchronously enter layout, to layout the view containing the host object/embed/iframe.
-    FrameView* frameView = ownerRenderer->frame()->view();
     ASSERT(frameView);
     frameView->layout();
 #endif
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to