REGRESSION (r89733): fast/text/zero-font-size.html is failing on Leopard
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 28 Jun 2011 15:56:42 +0000 (15:56 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 28 Jun 2011 15:56:42 +0000 (15:56 +0000)
https://bugs.webkit.org/show_bug.cgi?id=63512

Reviewed by Darin Adler.

* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::SimpleFontData::platformWidthForGlyph): Initialize the advance local variable, because
on Leopard wkGetGlyphTransformedAdvances can return successfully yet not update the variable when
the font size is 0. Presumably, r89733 exposed this by changing the values put on the stack just
before this function is called.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@89933 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm

index 797d7a1e050f9218246126828f0e0da99451e569..459749a54b221e63dc581e6ade20c342182325c6 100644 (file)
@@ -1,3 +1,16 @@
+2011-06-28  Dan Bernstein  <mitz@apple.com>
+
+        Reviewed by Darin Adler.
+
+        REGRESSION (r89733): fast/text/zero-font-size.html is failing on Leopard
+        https://bugs.webkit.org/show_bug.cgi?id=63512
+
+        * platform/graphics/mac/SimpleFontDataMac.mm:
+        (WebCore::SimpleFontData::platformWidthForGlyph): Initialize the advance local variable, because
+        on Leopard wkGetGlyphTransformedAdvances can return successfully yet not update the variable when
+        the font size is 0. Presumably, r89733 exposed this by changing the values put on the stack just
+        before this function is called.
+
 2011-06-27  Alexander Pavlov  <apavlov@chromium.org>
 
         Reviewed by Pavel Feldman.
index 71e98ce11499dcba5b08596bd8f02805116e9243..75ceeaefcffa2db97776447f0a44cd93c4d865ff 100644 (file)
@@ -399,7 +399,7 @@ FloatRect SimpleFontData::platformBoundsForGlyph(Glyph glyph) const
 
 float SimpleFontData::platformWidthForGlyph(Glyph glyph) const
 {
-    CGSize advance;
+    CGSize advance = CGSizeZero;
     if (platformData().orientation() == Horizontal || m_isBrokenIdeographFallback) {
         NSFont* font = platformData().font();
         float pointSize = platformData().m_size;