Ignore:
Timestamp:
Dec 4, 2012, 9:58:44 AM (12 years ago)
Author:
[email protected]
Message:

FontPlatformData has unnecessary m_textOrientation member
https://bugs.webkit.org/show_bug.cgi?id=103971

Reviewed by Darin Adler.

Nothing in SimpleFontData depends on the FontPlatformData’s textOrientation, so we don’t
need separate data for vertical-right and upright. We simply choose between
verticalRightOrientationFontData() and uprightOrientationFontData() based on the
textOrientation in the FontDescription.

  • WebCore.exp.in: Updated FontPlatformData constructor exports.
  • css/CSSFontFaceSource.cpp:

(WebCore::CSSFontFaceSource::getFontData): Removed the text orientation bit from the hash key,
and updated for the removal of the TextOrientation parameter to
CachedFont::platformDataFromCustomData().

  • loader/cache/CachedFont.cpp:

(WebCore::CachedFont::platformDataFromCustomData): Removed the TextOrientation parameter.

  • loader/cache/CachedFont.h:
  • platform/graphics/FontCache.cpp:

(WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey): Removed the TextOrientation
parameter and initializer.
(WebCore::FontPlatformDataCacheKey::operator==): Updated for removal of m_textOrientation
member variable.
(FontPlatformDataCacheKey): Removed m_textOrientation member variable.
(WebCore::computeHash): Removed text orientation bit from the hash.
(WebCore::FontCache::getCachedFontPlatformData): Updated for FontPlatformDataCacheKey
change.

  • platform/graphics/FontPlatformData.cpp:

(WebCore::FontPlatformData::FontPlatformData): Removed TextOrientation parameters and
initializers.
(WebCore::FontPlatformData::operator=): Updated for removal of m_textOrientation
member variable.

  • platform/graphics/FontPlatformData.h:

(FontPlatformData): Removed m_textOrientation member variable, removed TextOrientation
parameters from constructors.
(WebCore::FontPlatformData::hash): Removed text orientation bit.
(WebCore::FontPlatformData::operator==): Updated for removed member variable.

  • platform/graphics/cairo/FontCustomPlatformData.h:

(FontCustomPlatformData::fontPlatformData): Removed TextOrientation parameter.

  • platform/graphics/chromium/FontCacheAndroid.cpp:

(WebCore::FontCache::createFontPlatformData): Updated for FontPlatformData change.

  • platform/graphics/cocoa/FontPlatformDataCocoa.mm:

(WebCore::FontPlatformData::FontPlatformData): Removed TextOrientation parameter and
initializer.

  • platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:

(WebCore::FontCustomPlatformData::fontPlatformData): Removed TextOrientation parameter.

  • platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp:

(WebCore::FontPlatformData::FontPlatformData): Removed TextOrientation parameter and
initializers.
(WebCore::FontPlatformData::operator=): Updated for removed member variable.
(WebCore::FontPlatformData::operator==): Ditto.
(WebCore::FontPlatformData::hash): Removed text orientation bit.

  • platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h:

(FontPlatformData): Removed TextOrientation parameter from the constructor declaration.

  • platform/graphics/mac/FontCacheMac.mm:

(WebCore::FontCache::createFontPlatformData): Updated for FontPlatformData change.

  • platform/graphics/mac/FontCustomPlatformData.cpp:

(WebCore::FontCustomPlatformData::fontPlatformData): Removed TextOrientation parameter.

  • platform/graphics/mac/FontCustomPlatformData.h:

(FontCustomPlatformData): Removed TextOrientation parameter from declaration of
fontPlatformData().

  • platform/graphics/mac/SimpleFontDataMac.mm:

(WebCore::SimpleFontData::getCompositeFontReferenceFontData): Updated for FontPlatformData
change.

  • platform/graphics/pango/FontCustomPlatformDataPango.cpp:

(WebCore::FontCustomPlatformData::fontPlatformData): Removed TextOrientation parameter.

  • platform/graphics/qt/FontCustomPlatformData.h:
  • platform/graphics/qt/FontCustomPlatformDataQt.cpp:

(WebCore::FontCustomPlatformData::fontPlatformData): Ditto.

  • platform/graphics/skia/FontCacheSkia.cpp:

(WebCore::FontCache::createFontPlatformData): Updated for FontPlatformData change.

  • platform/graphics/skia/FontCustomPlatformData.cpp:

(WebCore::FontCustomPlatformData::fontPlatformData): Removed TextOrientation parameter.

  • platform/graphics/skia/FontCustomPlatformData.h:
  • platform/graphics/win/FontCustomPlatformData.cpp:

(WebCore::FontCustomPlatformData::fontPlatformData): Removed TextOrientation parameter.

  • platform/graphics/win/FontCustomPlatformData.h:
  • platform/graphics/win/FontCustomPlatformDataCairo.cpp:

(WebCore::FontCustomPlatformData::fontPlatformData): Removed TextOrientation parameter.

  • platform/graphics/win/FontCustomPlatformDataCairo.h:
  • platform/graphics/win/FontPlatformDataCGWin.cpp:

(WebCore::FontPlatformData::FontPlatformData): Removed m_textOrientation initializer.

  • platform/graphics/win/FontPlatformDataCairoWin.cpp:

(WebCore::FontPlatformData::FontPlatformData): Ditto.

  • platform/graphics/win/FontPlatformDataWin.cpp:

(WebCore::FontPlatformData::FontPlatformData): Ditto.

  • platform/graphics/wince/FontCustomPlatformData.cpp:

(WebCore::FontCustomPlatformData::fontPlatformData): Removed TextOrientation parameter.

  • platform/graphics/wince/FontCustomPlatformData.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/css/CSSFontFaceSource.cpp

    r132969 r136520  
    112112
    113113    // See if we have a mapping in our FontData cache.
    114     unsigned hashKey = (fontDescription.computedPixelSize() + 1) << 6 | fontDescription.widthVariant() << 4
    115                        | (fontDescription.textOrientation() == TextOrientationUpright ? 8 : 0) | (fontDescription.orientation() == Vertical ? 4 : 0) | (syntheticBold ? 2 : 0) | (syntheticItalic ? 1 : 0);
     114    unsigned hashKey = (fontDescription.computedPixelSize() + 1) << 5 | fontDescription.widthVariant() << 3
     115                       | (fontDescription.orientation() == Vertical ? 4 : 0) | (syntheticBold ? 2 : 0) | (syntheticItalic ? 1 : 0);
    116116
    117117    RefPtr<SimpleFontData>& fontData = m_fontDataTable.add(hashKey, 0).iterator->value;
     
    166166
    167167                fontData = SimpleFontData::create(m_font->platformDataFromCustomData(fontDescription.computedPixelSize(), syntheticBold, syntheticItalic,
    168                     fontDescription.orientation(), fontDescription.textOrientation(), fontDescription.widthVariant(), fontDescription.renderingMode()), true, false);
     168                    fontDescription.orientation(), fontDescription.widthVariant(), fontDescription.renderingMode()), true, false);
    169169            }
    170170        } else {
Note: See TracChangeset for help on using the changeset viewer.