Modified: trunk/Source/WebCore/ChangeLog (135993 => 135994)
--- trunk/Source/WebCore/ChangeLog 2012-11-28 11:33:28 UTC (rev 135993)
+++ trunk/Source/WebCore/ChangeLog 2012-11-28 11:48:34 UTC (rev 135994)
@@ -1,3 +1,10 @@
+2012-11-28 Roger Fong <roger_f...@apple.com>
+
+ Unreviewed. Fix extra spaces in SimpleFontData::initGDIFont().
+
+ * platform/graphics/win/SimpleFontDataWin.cpp:
+ (WebCore::SimpleFontData::initGDIFont):
+
2012-11-28 Dan Carney <dcar...@google.com>
[V8] Crash wrapping media element when MediaPlayer isn't available
Modified: trunk/Source/WebCore/platform/graphics/win/SimpleFontDataWin.cpp (135993 => 135994)
--- trunk/Source/WebCore/platform/graphics/win/SimpleFontDataWin.cpp 2012-11-28 11:33:28 UTC (rev 135993)
+++ trunk/Source/WebCore/platform/graphics/win/SimpleFontDataWin.cpp 2012-11-28 11:48:34 UTC (rev 135994)
@@ -80,32 +80,32 @@
return;
}
- HWndDC hdc(0);
- HGDIOBJ oldFont = SelectObject(hdc, m_platformData.hfont());
- OUTLINETEXTMETRIC metrics;
- GetOutlineTextMetrics(hdc, sizeof(metrics), &metrics);
- TEXTMETRIC& textMetrics = metrics.otmTextMetrics;
- float ascent = textMetrics.tmAscent;
- float descent = textMetrics.tmDescent;
- float lineGap = textMetrics.tmExternalLeading;
- m_fontMetrics.setAscent(ascent);
- m_fontMetrics.setDescent(descent);
- m_fontMetrics.setLineGap(lineGap);
- m_fontMetrics.setLineSpacing(lroundf(ascent) + lroundf(descent) + lroundf(lineGap));
- m_avgCharWidth = textMetrics.tmAveCharWidth;
- m_maxCharWidth = textMetrics.tmMaxCharWidth;
- float xHeight = ascent * 0.56f; // Best guess for xHeight if no x glyph is present.
+ HWndDC hdc(0);
+ HGDIOBJ oldFont = SelectObject(hdc, m_platformData.hfont());
+ OUTLINETEXTMETRIC metrics;
+ GetOutlineTextMetrics(hdc, sizeof(metrics), &metrics);
+ TEXTMETRIC& textMetrics = metrics.otmTextMetrics;
+ float ascent = textMetrics.tmAscent;
+ float descent = textMetrics.tmDescent;
+ float lineGap = textMetrics.tmExternalLeading;
+ m_fontMetrics.setAscent(ascent);
+ m_fontMetrics.setDescent(descent);
+ m_fontMetrics.setLineGap(lineGap);
+ m_fontMetrics.setLineSpacing(lroundf(ascent) + lroundf(descent) + lroundf(lineGap));
+ m_avgCharWidth = textMetrics.tmAveCharWidth;
+ m_maxCharWidth = textMetrics.tmMaxCharWidth;
+ float xHeight = ascent * 0.56f; // Best guess for xHeight if no x glyph is present.
#if !OS(WINCE)
- GLYPHMETRICS gm;
- 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;
+ GLYPHMETRICS gm;
+ 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
- m_fontMetrics.setXHeight(xHeight);
- m_fontMetrics.setUnitsPerEm(metrics.otmEMSquare);
+ m_fontMetrics.setXHeight(xHeight);
+ m_fontMetrics.setUnitsPerEm(metrics.otmEMSquare);
- SelectObject(hdc, oldFont);
+ SelectObject(hdc, oldFont);
}
void SimpleFontData::platformCharWidthInit()