Title: [132824] branches/chromium/1271
Revision
132824
Author
[email protected]
Date
2012-10-29 11:02:03 -0700 (Mon, 29 Oct 2012)

Log Message

Merge 130999
BUG=154284
Review URL: https://codereview.chromium.org/11339015

Modified Paths

Added Paths

Diff

Copied: branches/chromium/1271/LayoutTests/svg/text/alt-glpyh-on-fallback-font-crash-expected.txt (from rev 130999, trunk/LayoutTests/svg/text/alt-glpyh-on-fallback-font-crash-expected.txt) (0 => 132824)


--- branches/chromium/1271/LayoutTests/svg/text/alt-glpyh-on-fallback-font-crash-expected.txt	                        (rev 0)
+++ branches/chromium/1271/LayoutTests/svg/text/alt-glpyh-on-fallback-font-crash-expected.txt	2012-10-29 18:02:03 UTC (rev 132824)
@@ -0,0 +1 @@
+A A: This test passes if you see two As at the start of this message.

Copied: branches/chromium/1271/LayoutTests/svg/text/alt-glpyh-on-fallback-font-crash.svg (from rev 130999, trunk/LayoutTests/svg/text/alt-glpyh-on-fallback-font-crash.svg) (0 => 132824)


--- branches/chromium/1271/LayoutTests/svg/text/alt-glpyh-on-fallback-font-crash.svg	                        (rev 0)
+++ branches/chromium/1271/LayoutTests/svg/text/alt-glpyh-on-fallback-font-crash.svg	2012-10-29 18:02:03 UTC (rev 132824)
@@ -0,0 +1,23 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+  <g>
+    <defs>
+      <font>
+        <font-face font-family="HappySad">
+        </font-face>
+      </font>
+    </defs>
+    <g font-family="HappySad" style="-webkit-writing-mode: vertical-rl; ">
+      <text>
+        <altGlyph>A</altGlyph>
+        A: This test passes if you see two As at the start of this message.
+      </text>
+    </g>
+  </g>
+  <script>
+    if (window.testRunner)
+      testRunner.dumpAsText();
+
+    var docElement = document.body ? document.body : document.documentElement;
+    if (docElement) docElement.offsetTop;
+  </script>
+</svg>

Modified: branches/chromium/1271/Source/WebCore/rendering/svg/SVGTextRunRenderingContext.cpp (132823 => 132824)


--- branches/chromium/1271/Source/WebCore/rendering/svg/SVGTextRunRenderingContext.cpp	2012-10-29 18:01:16 UTC (rev 132823)
+++ branches/chromium/1271/Source/WebCore/rendering/svg/SVGTextRunRenderingContext.cpp	2012-10-29 18:02:03 UTC (rev 132824)
@@ -188,6 +188,7 @@
     }
 
     // Characters enclosed by an <altGlyph> element, may not be registered in the GlyphPage.
+    const SimpleFontData* originalFontData = glyphData.fontData;
     if (glyphData.fontData && !glyphData.fontData->isSVGFont()) {
         if (TextRun::RenderingContext* renderingContext = run.renderingContext()) {
             RenderObject* renderObject = static_cast<SVGTextRunRenderingContext*>(renderingContext)->renderer();
@@ -239,7 +240,7 @@
 
     // Restore original state of the SVG Font glyph table and the current font fallback list,
     // to assure the next lookup of the same glyph won't immediately return the fallback glyph.
-    page->setGlyphDataForCharacter(character, glyphData.glyph, fontData);
+    page->setGlyphDataForCharacter(character, glyphData.glyph, originalFontData);
     fontList->setGlyphPageZero(originalGlyphPageZero);
     fontList->setGlyphPages(originalGlyphPages);
     ASSERT(fallbackGlyphData.fontData);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to