Title: [221719] trunk/Source/WebCore
- Revision
- 221719
- Author
- [email protected]
- Date
- 2017-09-06 23:20:58 -0700 (Wed, 06 Sep 2017)
Log Message
Unreviewed. Temporary disable the changes introduced in r221670 for WPE.
It caused a lot of test failures. Once WPE upgrades to Freetype 2.8 and removes the 2.4.11 patch, we can enable
it again.
* platform/graphics/freetype/SimpleFontDataFreeType.cpp:
(WebCore::Font::platformInit):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (221718 => 221719)
--- trunk/Source/WebCore/ChangeLog 2017-09-07 05:58:32 UTC (rev 221718)
+++ trunk/Source/WebCore/ChangeLog 2017-09-07 06:20:58 UTC (rev 221719)
@@ -1,3 +1,13 @@
+2017-09-06 Carlos Garcia Campos <[email protected]>
+
+ Unreviewed. Temporary disable the changes introduced in r221670 for WPE.
+
+ It caused a lot of test failures. Once WPE upgrades to Freetype 2.8 and removes the 2.4.11 patch, we can enable
+ it again.
+
+ * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
+ (WebCore::Font::platformInit):
+
2017-09-06 Zan Dobersek <[email protected]>
[GStreamer] Implement MediaPlayerPrivateGStreamerMSE::attempToDecryptWithInstance()
Modified: trunk/Source/WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp (221718 => 221719)
--- trunk/Source/WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp 2017-09-07 05:58:32 UTC (rev 221718)
+++ trunk/Source/WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp 2017-09-07 06:20:58 UTC (rev 221719)
@@ -54,6 +54,8 @@
namespace WebCore {
+// FIXME: Remove this ifdef once WPE upgrqades to Freetype 2.8 and removes the patch for 2.4.11.
+#if !PLATFORM(WPE)
static RefPtr<cairo_scaled_font_t> scaledFontWithoutMetricsHinting(cairo_scaled_font_t* scaledFont)
{
CairoUniquePtr<cairo_font_options_t> fontOptions(cairo_font_options_create());
@@ -65,6 +67,7 @@
cairo_scaled_font_get_ctm(scaledFont, &fontCTM);
return adoptRef(cairo_scaled_font_create(cairo_scaled_font_get_font_face(scaledFont), &fontMatrix, &fontCTM, fontOptions.get()));
}
+#endif
void Font::platformInit()
{
@@ -72,6 +75,11 @@
return;
ASSERT(m_platformData.scaledFont());
+ // FIXME: Remove this ifdef once WPE upgrqades to Freetype 2.8 and removes the patch for 2.4.11.
+#if PLATFORM(WPE)
+ cairo_font_extents_t fontExtents;
+ cairo_scaled_font_extents(m_platformData.scaledFont(), &fontExtents);
+#else
// Temporarily create a clone that doesn't have metrics hinting in order to avoid incorrect
// rounding resulting in incorrect baseline positioning since the sum of ascent and descent
// becomes larger than the line height.
@@ -78,6 +86,7 @@
auto fontWithoutMetricsHinting = scaledFontWithoutMetricsHinting(m_platformData.scaledFont());
cairo_font_extents_t fontExtents;
cairo_scaled_font_extents(fontWithoutMetricsHinting.get(), &fontExtents);
+#endif
float ascent = narrowPrecisionToFloat(fontExtents.ascent);
float descent = narrowPrecisionToFloat(fontExtents.descent);
@@ -106,7 +115,12 @@
m_fontMetrics.setAscent(ascent);
m_fontMetrics.setDescent(descent);
m_fontMetrics.setCapHeight(capHeight);
+ // FIXME: Remove this ifdef once WPE upgrqades to Freetype 2.8 and removes the patch for 2.4.11.
+#if PLATFORM(WPE)
+ m_fontMetrics.setLineSpacing(lroundf(ascent) + lroundf(descent) + lroundf(lineGap));
+#else
m_fontMetrics.setLineSpacing(ascent + descent + lineGap);
+#endif
m_fontMetrics.setLineGap(lineGap);
cairo_text_extents_t textExtents;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes