Title: [89183] trunk
Revision
89183
Author
[email protected]
Date
2011-06-17 19:38:45 -0700 (Fri, 17 Jun 2011)

Log Message

2011-06-17  Julien Chaffraix  <[email protected]>

        Reviewed by Darin Adler.

        Assertion failure in SVGTextLayoutEngine constructor (!m_layoutAttributes.isEmpty())
        https://bugs.webkit.org/show_bug.cgi?id=62884

        * svg/custom/assert-empty-layout-attributes-expected.txt: Added.
        * svg/custom/assert-empty-layout-attributes.svg: Added.
2011-06-17  Julien Chaffraix  <[email protected]>

        Reviewed by Darin Adler.

        Assertion failure in SVGTextLayoutEngine constructor (!m_layoutAttributes.isEmpty())
        https://bugs.webkit.org/show_bug.cgi?id=62884

        Test: svg/custom/assert-empty-layout-attributes.svg

        * rendering/svg/SVGRootInlineBox.cpp:
        (WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation): Added a early return here.
        It is not needed to do the text layout algorithm if you don't have any layout information as
        your size is (0, 0) anyway.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (89182 => 89183)


--- trunk/LayoutTests/ChangeLog	2011-06-18 01:09:38 UTC (rev 89182)
+++ trunk/LayoutTests/ChangeLog	2011-06-18 02:38:45 UTC (rev 89183)
@@ -1,3 +1,13 @@
+2011-06-17  Julien Chaffraix  <[email protected]>
+
+        Reviewed by Darin Adler.
+
+        Assertion failure in SVGTextLayoutEngine constructor (!m_layoutAttributes.isEmpty())
+        https://bugs.webkit.org/show_bug.cgi?id=62884
+
+        * svg/custom/assert-empty-layout-attributes-expected.txt: Added.
+        * svg/custom/assert-empty-layout-attributes.svg: Added.
+
 2011-06-17  David Grogan  <[email protected]>
 
         Reviewed by Eric Seidel.

Added: trunk/LayoutTests/svg/custom/assert-empty-layout-attributes-expected.txt (0 => 89183)


--- trunk/LayoutTests/svg/custom/assert-empty-layout-attributes-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/svg/custom/assert-empty-layout-attributes-expected.txt	2011-06-18 02:38:45 UTC (rev 89183)
@@ -0,0 +1,2 @@
+Test for https://bugs.webkit.org/show_bug.cgi?id=62884
+This test passes if it did not crash

Added: trunk/LayoutTests/svg/custom/assert-empty-layout-attributes.svg (0 => 89183)


--- trunk/LayoutTests/svg/custom/assert-empty-layout-attributes.svg	                        (rev 0)
+++ trunk/LayoutTests/svg/custom/assert-empty-layout-attributes.svg	2011-06-18 02:38:45 UTC (rev 89183)
@@ -0,0 +1,21 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE x PUBLIC "" "">
+<svg xmlns="http://www.w3.org/2000/svg">
+    <style>
+        *:after {
+        content: "x"
+        }
+    </style>
+    <defs>
+        <font>
+            <font-face font-family="SVGArial" />
+        </font>
+    </defs>
+    <text style="font-family:SVGArial;"></text>
+    <script>
+    if (window.layoutTestController)
+        layoutTestController.dumpAsText();
+    </script>
+    <text x="10px" y="50px" >Test for https://bugs.webkit.org/show_bug.cgi?id=62884</text>
+    <text x="10px" y="100px">This test passes if it did not crash</text>
+</svg>
Property changes on: trunk/LayoutTests/svg/custom/assert-empty-layout-attributes.svg
___________________________________________________________________

Added: svn:executable

Modified: trunk/Source/WebCore/ChangeLog (89182 => 89183)


--- trunk/Source/WebCore/ChangeLog	2011-06-18 01:09:38 UTC (rev 89182)
+++ trunk/Source/WebCore/ChangeLog	2011-06-18 02:38:45 UTC (rev 89183)
@@ -1,3 +1,17 @@
+2011-06-17  Julien Chaffraix  <[email protected]>
+
+        Reviewed by Darin Adler.
+
+        Assertion failure in SVGTextLayoutEngine constructor (!m_layoutAttributes.isEmpty())
+        https://bugs.webkit.org/show_bug.cgi?id=62884
+
+        Test: svg/custom/assert-empty-layout-attributes.svg
+
+        * rendering/svg/SVGRootInlineBox.cpp:
+        (WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation): Added a early return here.
+        It is not needed to do the text layout algorithm if you don't have any layout information as
+        your size is (0, 0) anyway.
+
 2011-06-17  Alexey Proskuryakov  <[email protected]>
 
         Reviewed by Dan Bernstein.

Modified: trunk/Source/WebCore/rendering/svg/SVGRootInlineBox.cpp (89182 => 89183)


--- trunk/Source/WebCore/rendering/svg/SVGRootInlineBox.cpp	2011-06-18 01:09:38 UTC (rev 89182)
+++ trunk/Source/WebCore/rendering/svg/SVGRootInlineBox.cpp	2011-06-18 02:38:45 UTC (rev 89183)
@@ -77,6 +77,9 @@
     ASSERT(parentBlock);
 
     Vector<SVGTextLayoutAttributes>& attributes = parentBlock->layoutAttributes();
+    if (attributes.isEmpty())
+        return;
+
     if (parentBlock->needsReordering())
         reorderValueLists(attributes);
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to