Changeset 84996 in webkit


Ignore:
Timestamp:
Apr 26, 2011 6:15:40 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-04-26 Sheriff Bot <webkit.review.bot@gmail.com>

Unreviewed, rolling out r84989.
http://trac.webkit.org/changeset/84989
https://bugs.webkit.org/show_bug.cgi?id=59566

REGRESSION (r84989): Lots of vertical text tests failing on
windows (Requested by weinig on #webkit).

  • platform/graphics/FontPlatformData.h:
  • platform/graphics/win/FontCacheWin.cpp: (WebCore::FontCache::getFontDataForCharacters): (WebCore::FontCache::createFontPlatformData):
  • platform/graphics/win/FontCustomPlatformData.cpp: (WebCore::FontCustomPlatformData::fontPlatformData):
  • platform/graphics/win/FontPlatformDataCGWin.cpp: (WebCore::FontPlatformData::FontPlatformData):
  • platform/graphics/win/FontPlatformDataWin.cpp: (WebCore::FontPlatformData::FontPlatformData):
Location:
trunk/Source/WebCore
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r84992 r84996  
     12011-04-26  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r84989.
     4        http://trac.webkit.org/changeset/84989
     5        https://bugs.webkit.org/show_bug.cgi?id=59566
     6
     7        REGRESSION (r84989): Lots of vertical text tests failing on
     8        windows (Requested by weinig on #webkit).
     9
     10        * platform/graphics/FontPlatformData.h:
     11        * platform/graphics/win/FontCacheWin.cpp:
     12        (WebCore::FontCache::getFontDataForCharacters):
     13        (WebCore::FontCache::createFontPlatformData):
     14        * platform/graphics/win/FontCustomPlatformData.cpp:
     15        (WebCore::FontCustomPlatformData::fontPlatformData):
     16        * platform/graphics/win/FontPlatformDataCGWin.cpp:
     17        (WebCore::FontPlatformData::FontPlatformData):
     18        * platform/graphics/win/FontPlatformDataWin.cpp:
     19        (WebCore::FontPlatformData::FontPlatformData):
     20
    1212011-04-26  Sam Weinig  <sam@webkit.org>
    222
  • trunk/Source/WebCore/platform/graphics/FontPlatformData.h

    r84989 r84996  
    197197#endif
    198198#if PLATFORM(WIN)
    199     FontPlatformData(HFONT, float size, bool syntheticBold, bool syntheticOblique, bool useGDI, FontOrientation = Horizontal);
     199    FontPlatformData(HFONT, float size, bool syntheticBold, bool syntheticOblique, bool useGDI);
    200200#if USE(CG)
    201     FontPlatformData(HFONT, CGFontRef, float size, bool syntheticBold, bool syntheticOblique, bool useGDI, FontOrientation = Horizontal);
     201    FontPlatformData(HFONT, CGFontRef, float size, bool syntheticBold, bool syntheticOblique, bool useGDI);
    202202#endif
    203203#endif
  • trunk/Source/WebCore/platform/graphics/win/FontCacheWin.cpp

    r84989 r84996  
    284284    if (hfont) {
    285285        if (!familyName.isEmpty()) {
    286             FontPlatformData* result;
    287             // Take the orientation into consideration. For vertical: add "@" in front of the family name.
    288             // "@" is a built-in behaviour for Windows platform. http://msdn.microsoft.com/en-us/goglobal/bb688137
    289             if (font.fontDescription().orientation() == Vertical && !familyName.startsWith("@"))
    290                 result = getCachedFontPlatformData(font.fontDescription(), "@" + String(familyName));
    291             else
    292                 result = getCachedFontPlatformData(font.fontDescription(), familyName);
    293            
     286            FontPlatformData* result = getCachedFontPlatformData(font.fontDescription(), familyName);
    294287            if (result)
    295288                fontData = getCachedFontData(result);
     
    567560    bool useGDI = fontDescription.renderingMode() == AlternateRenderingMode && !isLucidaGrande;
    568561
    569     // Take the orientation into consideration. For vertical: add "@" in front of the family name.
    570     // "@" is a built-in behaviour for Windows platform. http://msdn.microsoft.com/en-us/goglobal/bb688137
    571     AtomicString updatedFamilyName;
    572     if (fontDescription.orientation() == Vertical && !family.startsWith("@"))
    573         updatedFamilyName = "@" + String(family);
    574     else
    575         updatedFamilyName = family;
    576 
    577562    // The logical size constant is 32. We do this for subpixel precision when rendering using Uniscribe.
    578563    // This masks rounding errors related to the HFONT metrics being  different from the CGFont metrics.
    579564    // FIXME: We will eventually want subpixel precision for GDI mode, but the scaled rendering doesn't
    580565    // look as nice. That may be solvable though.
    581     LONG weight = adjustedGDIFontWeight(toGDIFontWeight(fontDescription.weight()), updatedFamilyName);
    582     HFONT hfont = createGDIFont(updatedFamilyName, weight, fontDescription.italic(),
     566    LONG weight = adjustedGDIFontWeight(toGDIFontWeight(fontDescription.weight()), family);
     567    HFONT hfont = createGDIFont(family, weight, fontDescription.italic(),
    583568                                fontDescription.computedPixelSize() * (useGDI ? 1 : 32), useGDI);
    584 
    585     // Some fonts do not need to be rotated when displayed vertically.
    586     // Or "@font-family-name" is not supported on user's platform.
    587     // (e.g. no "@Times New Romain" or "@Arial"). Try to create hfont with original family name.
    588     if (updatedFamilyName.startsWith("@") && !hfont) {
    589         weight = adjustedGDIFontWeight(toGDIFontWeight(fontDescription.weight()), family);
    590         hfont = createGDIFont(family, weight, fontDescription.italic(),
    591         fontDescription.computedPixelSize() * (useGDI ? 1 : 32), useGDI);
    592     }
    593569
    594570    if (!hfont)
     
    604580    bool synthesizeItalic = fontDescription.italic() && !logFont.lfItalic;
    605581
    606     FontPlatformData* result = new FontPlatformData(hfont, fontDescription.computedPixelSize(), synthesizeBold, synthesizeItalic, useGDI, fontDescription.orientation());
     582    FontPlatformData* result = new FontPlatformData(hfont, fontDescription.computedPixelSize(), synthesizeBold, synthesizeItalic, useGDI);
    607583
    608584#if USE(CG)
  • trunk/Source/WebCore/platform/graphics/win/FontCustomPlatformData.cpp

    r84989 r84996  
    6060}
    6161
    62 FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation orientation, TextOrientation, FontWidthVariant, FontRenderingMode renderingMode)
     62FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation, TextOrientation, FontWidthVariant, FontRenderingMode renderingMode)
    6363{
    6464    ASSERT(m_fontReference);
     
    6666
    6767    LOGFONT& logFont = *static_cast<LOGFONT*>(malloc(sizeof(LOGFONT)));
    68     if (m_name.isNull()) {
     68    if (m_name.isNull())
    6969        TTGetNewFontName(&m_fontReference, logFont.lfFaceName, LF_FACESIZE, 0, 0);
    70         m_name = logFont.lfFaceName;
    71     }
    72 
    73     // Take the orientation into consideration. For vertical: add "@" in front of the family name. (Windows)
    74     String newName;
    75     if (orientation == Vertical && !m_name.startsWith("@"))
    76         newName = "@" + m_name;
    7770    else
    78         newName = m_name;
    79     memcpy(logFont.lfFaceName, newName.charactersWithNullTermination(), sizeof(logFont.lfFaceName[0]) * min(static_cast<size_t>(LF_FACESIZE), 1 + newName.length()));
     71        memcpy(logFont.lfFaceName, m_name.charactersWithNullTermination(), sizeof(logFont.lfFaceName[0]) * min(static_cast<size_t>(LF_FACESIZE), 1 + m_name.length()));
    8072
    8173    logFont.lfHeight = -size;
     
    9789
    9890    RetainPtr<CGFontRef> cgFont(AdoptCF, CGFontCreateWithPlatformFont(&logFont));
    99     return FontPlatformData(hfont, cgFont.get(), size, bold, italic, renderingMode == AlternateRenderingMode, orientation);
     91    return FontPlatformData(hfont, cgFont.get(), size, bold, italic, renderingMode == AlternateRenderingMode);
    10092}
    10193
  • trunk/Source/WebCore/platform/graphics/win/FontPlatformDataCGWin.cpp

    r84989 r84996  
    115115}
    116116
    117 FontPlatformData::FontPlatformData(HFONT hfont, CGFontRef font, float size, bool bold, bool oblique, bool useGDI, FontOrientation orientation)
     117FontPlatformData::FontPlatformData(HFONT hfont, CGFontRef font, float size, bool bold, bool oblique, bool useGDI)
    118118    : m_syntheticBold(bold)
    119119    , m_syntheticOblique(oblique)
    120     , m_orientation(orientation)
     120    , m_orientation(Horizontal)
    121121    , m_textOrientation(TextOrientationVerticalRight)
    122122    , m_size(size)
  • trunk/Source/WebCore/platform/graphics/win/FontPlatformDataWin.cpp

    r84989 r84996  
    3636namespace WebCore {
    3737
    38 FontPlatformData::FontPlatformData(HFONT font, float size, bool bold, bool oblique, bool useGDI, FontOrientation orientation)
     38FontPlatformData::FontPlatformData(HFONT font, float size, bool bold, bool oblique, bool useGDI)
    3939    : m_font(RefCountedGDIHandle<HFONT>::create(font))
    4040    , m_size(size)
    41     , m_orientation(orientation)
     41    , m_orientation(Horizontal)
    4242    , m_textOrientation(TextOrientationVerticalRight)
    4343    , m_widthVariant(RegularWidth)
Note: See TracChangeset for help on using the changeset viewer.