From: commit-queue@webkit.org Date: Thu, 26 Feb 2015 16:24:41 +0000 (+0000) Subject: [FreeType] REGRESSION(r180563): Introduced crashes X-Git-Url: http://git.webkit.org/?p=WebKit-https.git;a=commitdiff_plain;h=4768a46c37788080a78801ea22cef2d56680d88e;hp=320c4d49dee7f1497b5d6ebea7ed8a72efaf2b5c;ds=sidebyside [FreeType] REGRESSION(r180563): Introduced crashes https://bugs.webkit.org/show_bug.cgi?id=142044 Patch by Michael Catanzaro on 2015-02-26 Reviewed by Martin Robinson. No new tests, should be caught by any woff font test. Use optionsPattern, not m_pattern, when m_pattern may be null. * platform/graphics/freetype/FontPlatformDataFreeType.cpp: (WebCore::FontPlatformData::initializeWithFontFace): git-svn-id: https://svn.webkit.org/repository/webkit/trunk@180675 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index df557f5..b41501d 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,17 @@ +2015-02-26 Michael Catanzaro + + [FreeType] REGRESSION(r180563): Introduced crashes + https://bugs.webkit.org/show_bug.cgi?id=142044 + + Reviewed by Martin Robinson. + + No new tests, should be caught by any woff font test. + + Use optionsPattern, not m_pattern, when m_pattern may be null. + + * platform/graphics/freetype/FontPlatformDataFreeType.cpp: + (WebCore::FontPlatformData::initializeWithFontFace): + 2015-02-26 Sergio Villar Senin ASSERTION FAILED: !length.isUndefined() in WebCore::GridLength::GridLength diff --git a/Source/WebCore/platform/graphics/freetype/FontPlatformDataFreeType.cpp b/Source/WebCore/platform/graphics/freetype/FontPlatformDataFreeType.cpp index 538c9b2..e9c5f28 100644 --- a/Source/WebCore/platform/graphics/freetype/FontPlatformDataFreeType.cpp +++ b/Source/WebCore/platform/graphics/freetype/FontPlatformDataFreeType.cpp @@ -320,14 +320,14 @@ void FontPlatformData::initializeWithFontFace(cairo_font_face_t* fontFace, const FcMatrixInit(&fontConfigMatrix); // These matrices may be stacked in the pattern, so it's our job to get them all and multiply them. - for (int i = 0; FcPatternGetMatrix(m_pattern.get(), FC_MATRIX, i, &tempFontConfigMatrix) == FcResultMatch; i++) + for (int i = 0; FcPatternGetMatrix(optionsPattern, FC_MATRIX, i, &tempFontConfigMatrix) == FcResultMatch; i++) FcMatrixMultiply(&fontConfigMatrix, &fontConfigMatrix, tempFontConfigMatrix); cairo_matrix_init(&fontMatrix, fontConfigMatrix.xx, -fontConfigMatrix.yx, -fontConfigMatrix.xy, fontConfigMatrix.yy, 0, 0); // We requested an italic font, but Fontconfig gave us one that was neither oblique nor italic. int actualFontSlant; - if (fontDescription.italic() && FcPatternGetInteger(m_pattern.get(), FC_SLANT, 0, &actualFontSlant) == FcResultMatch) + if (fontDescription.italic() && FcPatternGetInteger(optionsPattern, FC_SLANT, 0, &actualFontSlant) == FcResultMatch) m_syntheticOblique = actualFontSlant == FC_SLANT_ROMAN; // The matrix from FontConfig does not include the scale.