Changeset 180675 in webkit


Ignore:
Timestamp:
Feb 26, 2015 8:24:41 AM (9 years ago)
Author:
commit-queue@webkit.org
Message:

[FreeType] REGRESSION(r180563): Introduced crashes
https://bugs.webkit.org/show_bug.cgi?id=142044

Patch by Michael Catanzaro <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):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r180669 r180675  
     12015-02-26  Michael Catanzaro  <mcatanzaro@igalia.com>
     2
     3        [FreeType] REGRESSION(r180563): Introduced crashes
     4        https://bugs.webkit.org/show_bug.cgi?id=142044
     5
     6        Reviewed by Martin Robinson.
     7
     8        No new tests, should be caught by any woff font test.
     9
     10        Use optionsPattern, not m_pattern, when m_pattern may be null.
     11
     12        * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
     13        (WebCore::FontPlatformData::initializeWithFontFace):
     14
    1152015-02-26  Sergio Villar Senin  <svillar@igalia.com>
    216
  • trunk/Source/WebCore/platform/graphics/freetype/FontPlatformDataFreeType.cpp

    r180563 r180675  
    321321
    322322    // These matrices may be stacked in the pattern, so it's our job to get them all and multiply them.
    323     for (int i = 0; FcPatternGetMatrix(m_pattern.get(), FC_MATRIX, i, &tempFontConfigMatrix) == FcResultMatch; i++)
     323    for (int i = 0; FcPatternGetMatrix(optionsPattern, FC_MATRIX, i, &tempFontConfigMatrix) == FcResultMatch; i++)
    324324        FcMatrixMultiply(&fontConfigMatrix, &fontConfigMatrix, tempFontConfigMatrix);
    325325    cairo_matrix_init(&fontMatrix, fontConfigMatrix.xx, -fontConfigMatrix.yx,
     
    328328    // We requested an italic font, but Fontconfig gave us one that was neither oblique nor italic.
    329329    int actualFontSlant;
    330     if (fontDescription.italic() && FcPatternGetInteger(m_pattern.get(), FC_SLANT, 0, &actualFontSlant) == FcResultMatch)
     330    if (fontDescription.italic() && FcPatternGetInteger(optionsPattern, FC_SLANT, 0, &actualFontSlant) == FcResultMatch)
    331331        m_syntheticOblique = actualFontSlant == FC_SLANT_ROMAN;
    332332
Note: See TracChangeset for help on using the changeset viewer.