Title: [89445] branches/chromium/782
Revision
89445
Author
[email protected]
Date
2011-06-22 10:17:51 -0700 (Wed, 22 Jun 2011)

Log Message

Merge 89183 - 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.

[email protected]
Review URL: http://codereview.chromium.org/7231014

Modified Paths

Added Paths

Diff

Modified: branches/chromium/782/LayoutTests/ChangeLog (89444 => 89445)


--- branches/chromium/782/LayoutTests/ChangeLog	2011-06-22 17:14:49 UTC (rev 89444)
+++ branches/chromium/782/LayoutTests/ChangeLog	2011-06-22 17:17:51 UTC (rev 89445)
@@ -13,6 +13,16 @@
         * platform/mac/svg/text/scaling-font-with-geometric-precision-expected.txt: Added.
         * svg/text/scaling-font-with-geometric-precision.html: 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
+
+        * svg/custom/assert-empty-layout-attributes-expected.txt: Added.
+        * svg/custom/assert-empty-layout-attributes.svg: Added.
+
 2011-06-09  Julien Chaffraix  <[email protected]>
 
         Reviewed by Darin Adler.

Copied: branches/chromium/782/LayoutTests/svg/custom/assert-empty-layout-attributes-expected.txt (from rev 89183, trunk/LayoutTests/svg/custom/assert-empty-layout-attributes-expected.txt) (0 => 89445)


--- branches/chromium/782/LayoutTests/svg/custom/assert-empty-layout-attributes-expected.txt	                        (rev 0)
+++ branches/chromium/782/LayoutTests/svg/custom/assert-empty-layout-attributes-expected.txt	2011-06-22 17:17:51 UTC (rev 89445)
@@ -0,0 +1,2 @@
+Test for https://bugs.webkit.org/show_bug.cgi?id=62884
+This test passes if it did not crash

Copied: branches/chromium/782/LayoutTests/svg/custom/assert-empty-layout-attributes.svg (from rev 89183, trunk/LayoutTests/svg/custom/assert-empty-layout-attributes.svg) (0 => 89445)


--- branches/chromium/782/LayoutTests/svg/custom/assert-empty-layout-attributes.svg	                        (rev 0)
+++ branches/chromium/782/LayoutTests/svg/custom/assert-empty-layout-attributes.svg	2011-06-22 17:17:51 UTC (rev 89445)
@@ -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>

Modified: branches/chromium/782/Source/WebCore/ChangeLog (89444 => 89445)


--- branches/chromium/782/Source/WebCore/ChangeLog	2011-06-22 17:14:49 UTC (rev 89444)
+++ branches/chromium/782/Source/WebCore/ChangeLog	2011-06-22 17:17:51 UTC (rev 89445)
@@ -14,6 +14,20 @@
         * rendering/svg/RenderSVGInlineText.cpp:
         (WebCore::RenderSVGInlineText::computeNewScaledFontForStyle):
 
+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-09  Julien Chaffraix  <[email protected]>
 
         Reviewed by Darin Adler.

Modified: branches/chromium/782/Source/WebCore/rendering/svg/SVGRootInlineBox.cpp (89444 => 89445)


--- branches/chromium/782/Source/WebCore/rendering/svg/SVGRootInlineBox.cpp	2011-06-22 17:14:49 UTC (rev 89444)
+++ branches/chromium/782/Source/WebCore/rendering/svg/SVGRootInlineBox.cpp	2011-06-22 17:17:51 UTC (rev 89445)
@@ -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