Title: [135992] trunk/Source/WebCore
- Revision
- 135992
- Author
- roger_f...@apple.com
- Date
- 2012-11-28 03:31:47 -0800 (Wed, 28 Nov 2012)
Log Message
Initialize identity matrix in SimpleFontData::initGDIFont() properly.
https://bugs.webkit.org/show_bug.cgi?id=103499
<rdar://problem/12400700>
Reviewed by Timothy Horton.
We are incorrectly initializing the matrix passed into GetGlyphOutline.
This patch fixes MAT2 initialization to match the way we initialize the
identity matrix in SimpleFontData::boundsForGDIGlyph and SimpleFontData::widthForGDIGlyph.
* platform/graphics/win/SimpleFontDataWin.cpp:
(WebCore::SimpleFontData::initGDIFont):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (135991 => 135992)
--- trunk/Source/WebCore/ChangeLog 2012-11-28 10:26:53 UTC (rev 135991)
+++ trunk/Source/WebCore/ChangeLog 2012-11-28 11:31:47 UTC (rev 135992)
@@ -1,3 +1,18 @@
+2012-11-28 Roger Fong <roger_f...@apple.com>
+
+ Initialize identity matrix in SimpleFontData::initGDIFont() properly.
+ https://bugs.webkit.org/show_bug.cgi?id=103499
+ <rdar://problem/12400700>
+
+ Reviewed by Timothy Horton.
+
+ We are incorrectly initializing the matrix passed into GetGlyphOutline.
+ This patch fixes MAT2 initialization to match the way we initialize the
+ identity matrix in SimpleFontData::boundsForGDIGlyph and SimpleFontData::widthForGDIGlyph.
+
+ * platform/graphics/win/SimpleFontDataWin.cpp:
+ (WebCore::SimpleFontData::initGDIFont):
+
2012-11-28 Huang Dongsung <luxte...@company100.net>
[Texmap] REGRESSION(r135620) QtTestBrowser crashes on Google-gravity.
Modified: trunk/Source/WebCore/platform/graphics/win/SimpleFontDataWin.cpp (135991 => 135992)
--- trunk/Source/WebCore/platform/graphics/win/SimpleFontDataWin.cpp 2012-11-28 10:26:53 UTC (rev 135991)
+++ trunk/Source/WebCore/platform/graphics/win/SimpleFontDataWin.cpp 2012-11-28 11:31:47 UTC (rev 135992)
@@ -97,8 +97,8 @@
float xHeight = ascent * 0.56f; // Best guess for xHeight if no x glyph is present.
#if !OS(WINCE)
GLYPHMETRICS gm;
- MAT2 mat = { 1, 0, 0, 1 };
- DWORD len = GetGlyphOutline(hdc, 'x', GGO_METRICS, &gm, 0, 0, &mat);
+ static const MAT2 identity = { 0, 1, 0, 0, 0, 0, 0, 1 };
+ DWORD len = GetGlyphOutline(hdc, 'x', GGO_METRICS, &gm, 0, 0, &identity);
if (len != GDI_ERROR && gm.gmptGlyphOrigin.y > 0)
xHeight = gm.gmptGlyphOrigin.y;
#endif
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes