Changeset 136520 in webkit
- Timestamp:
- Dec 4, 2012, 9:58:44 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 33 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/Source/WebCore/ChangeLog ¶
r136516 r136520 1 2012-12-04 Dan Bernstein <mitz@apple.com> 2 3 FontPlatformData has unnecessary m_textOrientation member 4 https://bugs.webkit.org/show_bug.cgi?id=103971 5 6 Reviewed by Darin Adler. 7 8 Nothing in SimpleFontData depends on the FontPlatformData’s textOrientation, so we don’t 9 need separate data for vertical-right and upright. We simply choose between 10 verticalRightOrientationFontData() and uprightOrientationFontData() based on the 11 textOrientation in the FontDescription. 12 13 * WebCore.exp.in: Updated FontPlatformData constructor exports. 14 15 * css/CSSFontFaceSource.cpp: 16 (WebCore::CSSFontFaceSource::getFontData): Removed the text orientation bit from the hash key, 17 and updated for the removal of the TextOrientation parameter to 18 CachedFont::platformDataFromCustomData(). 19 20 * loader/cache/CachedFont.cpp: 21 (WebCore::CachedFont::platformDataFromCustomData): Removed the TextOrientation parameter. 22 * loader/cache/CachedFont.h: 23 24 * platform/graphics/FontCache.cpp: 25 (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey): Removed the TextOrientation 26 parameter and initializer. 27 (WebCore::FontPlatformDataCacheKey::operator==): Updated for removal of m_textOrientation 28 member variable. 29 (FontPlatformDataCacheKey): Removed m_textOrientation member variable. 30 (WebCore::computeHash): Removed text orientation bit from the hash. 31 (WebCore::FontCache::getCachedFontPlatformData): Updated for FontPlatformDataCacheKey 32 change. 33 34 * platform/graphics/FontPlatformData.cpp: 35 (WebCore::FontPlatformData::FontPlatformData): Removed TextOrientation parameters and 36 initializers. 37 (WebCore::FontPlatformData::operator=): Updated for removal of m_textOrientation 38 member variable. 39 * platform/graphics/FontPlatformData.h: 40 (FontPlatformData): Removed m_textOrientation member variable, removed TextOrientation 41 parameters from constructors. 42 (WebCore::FontPlatformData::hash): Removed text orientation bit. 43 (WebCore::FontPlatformData::operator==): Updated for removed member variable. 44 45 * platform/graphics/cairo/FontCustomPlatformData.h: 46 (FontCustomPlatformData::fontPlatformData): Removed TextOrientation parameter. 47 48 * platform/graphics/chromium/FontCacheAndroid.cpp: 49 (WebCore::FontCache::createFontPlatformData): Updated for FontPlatformData change. 50 51 * platform/graphics/cocoa/FontPlatformDataCocoa.mm: 52 (WebCore::FontPlatformData::FontPlatformData): Removed TextOrientation parameter and 53 initializer. 54 55 * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp: 56 (WebCore::FontCustomPlatformData::fontPlatformData): Removed TextOrientation parameter. 57 * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp: 58 (WebCore::FontPlatformData::FontPlatformData): Removed TextOrientation parameter and 59 initializers. 60 (WebCore::FontPlatformData::operator=): Updated for removed member variable. 61 (WebCore::FontPlatformData::operator==): Ditto. 62 (WebCore::FontPlatformData::hash): Removed text orientation bit. 63 64 * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h: 65 (FontPlatformData): Removed TextOrientation parameter from the constructor declaration. 66 67 * platform/graphics/mac/FontCacheMac.mm: 68 (WebCore::FontCache::createFontPlatformData): Updated for FontPlatformData change. 69 70 * platform/graphics/mac/FontCustomPlatformData.cpp: 71 (WebCore::FontCustomPlatformData::fontPlatformData): Removed TextOrientation parameter. 72 73 * platform/graphics/mac/FontCustomPlatformData.h: 74 (FontCustomPlatformData): Removed TextOrientation parameter from declaration of 75 fontPlatformData(). 76 77 * platform/graphics/mac/SimpleFontDataMac.mm: 78 (WebCore::SimpleFontData::getCompositeFontReferenceFontData): Updated for FontPlatformData 79 change. 80 81 * platform/graphics/pango/FontCustomPlatformDataPango.cpp: 82 (WebCore::FontCustomPlatformData::fontPlatformData): Removed TextOrientation parameter. 83 * platform/graphics/qt/FontCustomPlatformData.h: 84 85 * platform/graphics/qt/FontCustomPlatformDataQt.cpp: 86 (WebCore::FontCustomPlatformData::fontPlatformData): Ditto. 87 88 * platform/graphics/skia/FontCacheSkia.cpp: 89 (WebCore::FontCache::createFontPlatformData): Updated for FontPlatformData change. 90 91 * platform/graphics/skia/FontCustomPlatformData.cpp: 92 (WebCore::FontCustomPlatformData::fontPlatformData): Removed TextOrientation parameter. 93 * platform/graphics/skia/FontCustomPlatformData.h: 94 95 * platform/graphics/win/FontCustomPlatformData.cpp: 96 (WebCore::FontCustomPlatformData::fontPlatformData): Removed TextOrientation parameter. 97 * platform/graphics/win/FontCustomPlatformData.h: 98 99 * platform/graphics/win/FontCustomPlatformDataCairo.cpp: 100 (WebCore::FontCustomPlatformData::fontPlatformData): Removed TextOrientation parameter. 101 * platform/graphics/win/FontCustomPlatformDataCairo.h: 102 103 * platform/graphics/win/FontPlatformDataCGWin.cpp: 104 (WebCore::FontPlatformData::FontPlatformData): Removed m_textOrientation initializer. 105 106 * platform/graphics/win/FontPlatformDataCairoWin.cpp: 107 (WebCore::FontPlatformData::FontPlatformData): Ditto. 108 109 * platform/graphics/win/FontPlatformDataWin.cpp: 110 (WebCore::FontPlatformData::FontPlatformData): Ditto. 111 112 * platform/graphics/wince/FontCustomPlatformData.cpp: 113 (WebCore::FontCustomPlatformData::fontPlatformData): Removed TextOrientation parameter. 114 * platform/graphics/wince/FontCustomPlatformData.h: 115 1 116 2012-12-04 Charlie Reis <creis@chromium.org> 2 117 -
TabularUnified trunk/Source/WebCore/WebCore.exp.in ¶
r136370 r136520 1632 1632 __ZN7WebCore13toDeviceSpaceERKNS_9FloatRectEP8NSWindow 1633 1633 __ZN7WebCore15GraphicsContextC1EP9CGContext 1634 __ZN7WebCore16FontPlatformDataC1EP6NSFontfbbbNS_15FontOrientationENS_1 5TextOrientationENS_16FontWidthVariantE1635 __ZN7WebCore16FontPlatformDataC2EP6NSFontfbbbNS_15FontOrientationENS_1 5TextOrientationENS_16FontWidthVariantE1634 __ZN7WebCore16FontPlatformDataC1EP6NSFontfbbbNS_15FontOrientationENS_16FontWidthVariantE 1635 __ZN7WebCore16FontPlatformDataC2EP6NSFontfbbbNS_15FontOrientationENS_16FontWidthVariantE 1636 1636 __ZN7WebCore16colorFromNSColorEP7NSColor 1637 1637 __ZN7WebCore16enclosingIntRectERK7_NSRect … … 1928 1928 __ZN7WebCore15startOfDocumentERKNS_15VisiblePositionE 1929 1929 __ZN7WebCore15startOfSentenceERKNS_15VisiblePositionE 1930 __ZN7WebCore16FontPlatformDataC1EP8__GSFontfbbbNS_15FontOrientationENS_1 5TextOrientationENS_16FontWidthVariantE1930 __ZN7WebCore16FontPlatformDataC1EP8__GSFontfbbbNS_15FontOrientationENS_16FontWidthVariantE 1931 1931 __ZN7WebCore16ThreadGlobalData26sharedMainThreadStaticDataE 1932 1932 __ZN7WebCore16VisibleSelection27selectionFromContentsOfNodeEPNS_4NodeE -
TabularUnified trunk/Source/WebCore/css/CSSFontFaceSource.cpp ¶
r132969 r136520 112 112 113 113 // See if we have a mapping in our FontData cache. 114 unsigned hashKey = (fontDescription.computedPixelSize() + 1) << 6 | fontDescription.widthVariant() << 4115 | (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); 116 116 117 117 RefPtr<SimpleFontData>& fontData = m_fontDataTable.add(hashKey, 0).iterator->value; … … 166 166 167 167 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); 169 169 } 170 170 } else { -
TabularUnified trunk/Source/WebCore/loader/cache/CachedFont.cpp ¶
r130983 r136520 116 116 } 117 117 118 FontPlatformData CachedFont::platformDataFromCustomData(float size, bool bold, bool italic, FontOrientation orientation, TextOrientation textOrientation,FontWidthVariant widthVariant, FontRenderingMode renderingMode)118 FontPlatformData CachedFont::platformDataFromCustomData(float size, bool bold, bool italic, FontOrientation orientation, FontWidthVariant widthVariant, FontRenderingMode renderingMode) 119 119 { 120 120 #if ENABLE(SVG_FONTS) … … 124 124 #ifdef STORE_FONT_CUSTOM_PLATFORM_DATA 125 125 ASSERT(m_fontData); 126 return m_fontData->fontPlatformData(static_cast<int>(size), bold, italic, orientation, textOrientation,widthVariant, renderingMode);126 return m_fontData->fontPlatformData(static_cast<int>(size), bold, italic, orientation, widthVariant, renderingMode); 127 127 #else 128 128 return FontPlatformData(); -
TabularUnified trunk/Source/WebCore/loader/cache/CachedFont.h ¶
r130983 r136520 32 32 #include "FontRenderingMode.h" 33 33 #include "FontWidthVariant.h" 34 #include "TextOrientation.h"35 34 36 35 namespace WebCore { … … 57 56 58 57 bool ensureCustomFontData(); 59 FontPlatformData platformDataFromCustomData(float size, bool bold, bool italic, FontOrientation = Horizontal, TextOrientation = TextOrientationVerticalRight,FontWidthVariant = RegularWidth, FontRenderingMode = NormalRenderingMode);58 FontPlatformData platformDataFromCustomData(float size, bool bold, bool italic, FontOrientation = Horizontal, FontWidthVariant = RegularWidth, FontRenderingMode = NormalRenderingMode); 60 59 61 60 #if ENABLE(SVG_FONTS) -
TabularUnified trunk/Source/WebCore/platform/graphics/FontCache.cpp ¶
r134871 r136520 63 63 FontPlatformDataCacheKey(const AtomicString& family = AtomicString(), unsigned size = 0, unsigned weight = 0, bool italic = false, 64 64 bool isPrinterFont = false, FontRenderingMode renderingMode = NormalRenderingMode, FontOrientation orientation = Horizontal, 65 TextOrientation textOrientation = TextOrientationVerticalRight,FontWidthVariant widthVariant = RegularWidth)65 FontWidthVariant widthVariant = RegularWidth) 66 66 : m_size(size) 67 67 , m_weight(weight) … … 71 71 , m_renderingMode(renderingMode) 72 72 , m_orientation(orientation) 73 , m_textOrientation(textOrientation)74 73 , m_widthVariant(widthVariant) 75 74 { … … 83 82 return equalIgnoringCase(m_family, other.m_family) && m_size == other.m_size && 84 83 m_weight == other.m_weight && m_italic == other.m_italic && m_printerFont == other.m_printerFont && 85 m_renderingMode == other.m_renderingMode && m_orientation == other.m_orientation && m_ textOrientation == other.m_textOrientation && m_widthVariant == other.m_widthVariant;84 m_renderingMode == other.m_renderingMode && m_orientation == other.m_orientation && m_widthVariant == other.m_widthVariant; 86 85 } 87 86 … … 93 92 FontRenderingMode m_renderingMode; 94 93 FontOrientation m_orientation; 95 TextOrientation m_textOrientation;96 94 FontWidthVariant m_widthVariant; 97 95 … … 107 105 fontKey.m_weight, 108 106 fontKey.m_widthVariant, 109 static_cast<unsigned>(fontKey.m_ textOrientation) << 4 | static_cast<unsigned>(fontKey.m_orientation) << 3 | static_cast<unsigned>(fontKey.m_italic) << 2 | static_cast<unsigned>(fontKey.m_printerFont) << 1 | static_cast<unsigned>(fontKey.m_renderingMode)107 static_cast<unsigned>(fontKey.m_orientation) << 3 | static_cast<unsigned>(fontKey.m_italic) << 2 | static_cast<unsigned>(fontKey.m_printerFont) << 1 | static_cast<unsigned>(fontKey.m_renderingMode) 110 108 }; 111 109 return StringHasher::hashMemory<sizeof(hashCodes)>(hashCodes); … … 202 200 FontPlatformDataCacheKey key(familyName, fontDescription.computedPixelSize(), fontDescription.weight(), fontDescription.italic(), 203 201 fontDescription.usePrinterFont(), fontDescription.renderingMode(), fontDescription.orientation(), 204 fontDescription. textOrientation(), fontDescription.widthVariant());202 fontDescription.widthVariant()); 205 203 FontPlatformData* result = 0; 206 204 bool foundResult; -
TabularUnified trunk/Source/WebCore/platform/graphics/FontPlatformData.cpp ¶
r127757 r136520 40 40 , m_syntheticOblique(false) 41 41 , m_orientation(Horizontal) 42 , m_textOrientation(TextOrientationVerticalRight)43 42 , m_size(0) 44 43 , m_widthVariant(RegularWidth) … … 68 67 , m_syntheticOblique(false) 69 68 , m_orientation(Horizontal) 70 , m_textOrientation(TextOrientationVerticalRight)71 69 , m_size(0) 72 70 , m_widthVariant(RegularWidth) … … 90 88 } 91 89 92 FontPlatformData::FontPlatformData(float size, bool syntheticBold, bool syntheticOblique, FontOrientation orientation, TextOrientation textOrientation,FontWidthVariant widthVariant)90 FontPlatformData::FontPlatformData(float size, bool syntheticBold, bool syntheticOblique, FontOrientation orientation, FontWidthVariant widthVariant) 93 91 : m_syntheticBold(syntheticBold) 94 92 , m_syntheticOblique(syntheticOblique) 95 93 , m_orientation(orientation) 96 , m_textOrientation(textOrientation)97 94 , m_size(size) 98 95 , m_widthVariant(widthVariant) … … 117 114 118 115 #if OS(DARWIN) && (USE(CG) || USE(SKIA_ON_MAC_CHROMIUM)) 119 FontPlatformData::FontPlatformData(CGFontRef cgFont, float size, bool syntheticBold, bool syntheticOblique, FontOrientation orientation, 120 TextOrientation textOrientation, FontWidthVariant widthVariant) 116 FontPlatformData::FontPlatformData(CGFontRef cgFont, float size, bool syntheticBold, bool syntheticOblique, FontOrientation orientation, FontWidthVariant widthVariant) 121 117 : m_syntheticBold(syntheticBold) 122 118 , m_syntheticOblique(syntheticOblique) 123 119 , m_orientation(orientation) 124 , m_textOrientation(textOrientation)125 120 , m_size(size) 126 121 , m_widthVariant(widthVariant) … … 138 133 , m_syntheticOblique(source.m_syntheticOblique) 139 134 , m_orientation(source.m_orientation) 140 , m_textOrientation(source.m_textOrientation)141 135 , m_size(source.m_size) 142 136 , m_widthVariant(source.m_widthVariant) … … 159 153 m_syntheticOblique = other.m_syntheticOblique; 160 154 m_orientation = other.m_orientation; 161 m_textOrientation = other.m_textOrientation;162 155 m_size = other.m_size; 163 156 m_widthVariant = other.m_widthVariant; -
TabularUnified trunk/Source/WebCore/platform/graphics/FontPlatformData.h ¶
r132925 r136520 43 43 #include "FontOrientation.h" 44 44 #include "FontWidthVariant.h" 45 #include "TextOrientation.h"46 45 47 46 #if PLATFORM(WIN) … … 107 106 FontPlatformData(const FontPlatformData&); 108 107 FontPlatformData(const FontDescription&, const AtomicString& family); 109 FontPlatformData(float size, bool syntheticBold, bool syntheticOblique, FontOrientation = Horizontal, 110 TextOrientation = TextOrientationVerticalRight, FontWidthVariant = RegularWidth); 108 FontPlatformData(float size, bool syntheticBold, bool syntheticOblique, FontOrientation = Horizontal, FontWidthVariant = RegularWidth); 111 109 112 110 #if OS(DARWIN) 113 111 FontPlatformData(NSFont*, float size, bool isPrinterFont = false, bool syntheticBold = false, bool syntheticOblique = false, 114 FontOrientation = Horizontal, TextOrientation = TextOrientationVerticalRight, FontWidthVariant = RegularWidth); 115 #if USE(CG) || USE(SKIA_ON_MAC_CHROMIUM) 116 FontPlatformData(CGFontRef, float size, bool syntheticBold, bool syntheticOblique, FontOrientation, 117 TextOrientation, FontWidthVariant); 112 FontOrientation = Horizontal, FontWidthVariant = RegularWidth); 113 #if USE(CG) || USE(SKIA_ON_MAC_CHROMIUM) 114 FontPlatformData(CGFontRef, float size, bool syntheticBold, bool syntheticOblique, FontOrientation, FontWidthVariant); 118 115 #endif 119 116 #endif … … 161 158 #endif 162 159 FontOrientation orientation() const { return m_orientation; } 163 TextOrientation textOrientation() const { return m_textOrientation; }164 160 FontWidthVariant widthVariant() const { return m_widthVariant; } 165 161 … … 182 178 ASSERT(m_font || !m_cgFont); 183 179 #endif 184 uintptr_t hashCodes[3] = { (uintptr_t)m_font, m_widthVariant, static_cast<uintptr_t>(m_isPrinterFont << 4 | m_textOrientation <<3 | m_orientation << 2 | m_syntheticBold << 1 | m_syntheticOblique) };180 uintptr_t hashCodes[3] = { (uintptr_t)m_font, m_widthVariant, static_cast<uintptr_t>(m_isPrinterFont << 3 | m_orientation << 2 | m_syntheticBold << 1 | m_syntheticOblique) }; 185 181 return StringHasher::hashMemory<sizeof(hashCodes)>(hashCodes); 186 182 #elif USE(CAIRO) … … 203 199 #endif 204 200 && m_orientation == other.m_orientation 205 && m_textOrientation == other.m_textOrientation206 201 && m_widthVariant == other.m_widthVariant; 207 202 } … … 251 246 bool m_syntheticOblique; 252 247 FontOrientation m_orientation; 253 TextOrientation m_textOrientation;254 248 float m_size; 255 249 FontWidthVariant m_widthVariant; -
TabularUnified trunk/Source/WebCore/platform/graphics/cairo/FontCustomPlatformData.h ¶
r80582 r136520 26 26 #include "FontRenderingMode.h" 27 27 #include "FontWidthVariant.h" 28 #include "TextOrientation.h"29 28 #include <wtf/Forward.h> 30 29 #include <wtf/Noncopyable.h> … … 43 42 FontCustomPlatformData(FT_Face, SharedBuffer*); 44 43 ~FontCustomPlatformData(); 45 FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal, TextOrientation = TextOrientationVerticalRight,FontWidthVariant = RegularWidth, FontRenderingMode = NormalRenderingMode);44 FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal, FontWidthVariant = RegularWidth, FontRenderingMode = NormalRenderingMode); 46 45 static bool supportsFormat(const String&); 47 46 -
TabularUnified trunk/Source/WebCore/platform/graphics/chromium/FontCacheAndroid.cpp ¶
r133976 r136520 179 179 (style & SkTypeface::kBold) && !typeface->isBold(), 180 180 (style & SkTypeface::kItalic) && !typeface->isItalic(), 181 fontDescription.orientation(), 182 fontDescription.textOrientation()); 181 fontDescription.orientation()); 183 182 } else { 184 183 typeface = SkTypeface::CreateFromName(name, SkTypeface::kNormal); … … 204 203 (style & SkTypeface::kBold) && !typeface->isBold(), 205 204 (style & SkTypeface::kItalic) && !typeface->isItalic(), 206 fontDescription.orientation(), 207 fontDescription.textOrientation()); 205 fontDescription.orientation()); 208 206 } 209 207 } -
TabularUnified trunk/Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm ¶
r127757 r136520 46 46 #endif // PLATFORM(MAC) 47 47 48 FontPlatformData::FontPlatformData(NSFont *nsFont, float size, bool isPrinterFont, bool syntheticBold, bool syntheticOblique, FontOrientation orientation, 49 TextOrientation textOrientation, FontWidthVariant widthVariant) 48 FontPlatformData::FontPlatformData(NSFont *nsFont, float size, bool isPrinterFont, bool syntheticBold, bool syntheticOblique, FontOrientation orientation, FontWidthVariant widthVariant) 50 49 : m_syntheticBold(syntheticBold) 51 50 , m_syntheticOblique(syntheticOblique) 52 51 , m_orientation(orientation) 53 , m_textOrientation(textOrientation)54 52 , m_size(size) 55 53 , m_widthVariant(widthVariant) -
TabularUnified trunk/Source/WebCore/platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp ¶
r80582 r136520 60 60 } 61 61 62 FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation, TextOrientation,FontWidthVariant, FontRenderingMode)62 FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation, FontWidthVariant, FontRenderingMode) 63 63 { 64 64 return FontPlatformData(m_fontFace, size, bold, italic); -
TabularUnified trunk/Source/WebCore/platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp ¶
r134871 r136520 98 98 , m_fakeItalic(false) 99 99 , m_orientation(Horizontal) 100 , m_textOrientation(TextOrientationVerticalRight)101 100 { 102 101 } … … 109 108 , m_fakeItalic(false) 110 109 , m_orientation(Horizontal) 111 , m_textOrientation(TextOrientationVerticalRight)112 110 { 113 111 } … … 120 118 , m_fakeItalic(fakeItalic) 121 119 , m_orientation(Horizontal) 122 , m_textOrientation(TextOrientationVerticalRight)123 120 { 124 121 } … … 132 129 , m_fakeItalic(src.m_fakeItalic) 133 130 , m_orientation(src.m_orientation) 134 , m_textOrientation(src.m_textOrientation)135 131 , m_style(src.m_style) 136 132 , m_harfbuzzFace(src.m_harfbuzzFace) … … 139 135 } 140 136 141 FontPlatformData::FontPlatformData(SkTypeface* tf, const char* family, float textSize, bool fakeBold, bool fakeItalic, FontOrientation orientation , TextOrientation textOrientation)137 FontPlatformData::FontPlatformData(SkTypeface* tf, const char* family, float textSize, bool fakeBold, bool fakeItalic, FontOrientation orientation) 142 138 : m_typeface(tf) 143 139 , m_family(family) … … 147 143 , m_fakeItalic(fakeItalic) 148 144 , m_orientation(orientation) 149 , m_textOrientation(textOrientation)150 145 { 151 146 SkSafeRef(m_typeface); … … 161 156 , m_fakeItalic(src.m_fakeItalic) 162 157 , m_orientation(src.m_orientation) 163 , m_textOrientation(src.m_textOrientation)164 158 , m_harfbuzzFace(src.m_harfbuzzFace) 165 159 { … … 202 196 m_harfbuzzFace = src.m_harfbuzzFace; 203 197 m_orientation = src.m_orientation; 204 m_textOrientation = src.m_textOrientation;205 198 m_style = src.m_style; 206 199 m_emSizeInFontUnits = src.m_emSizeInFontUnits; … … 257 250 && m_fakeItalic == a.m_fakeItalic 258 251 && m_orientation == a.m_orientation 259 && m_textOrientation == a.m_textOrientation260 252 && m_style == a.m_style; 261 253 } … … 264 256 { 265 257 unsigned h = SkTypeface::UniqueID(m_typeface); 266 h ^= 0x01010101 * ((static_cast<int>(m_ textOrientation) << 3) | (static_cast<int>(m_orientation) << 2) | (static_cast<int>(m_fakeBold) << 1) | static_cast<int>(m_fakeItalic));258 h ^= 0x01010101 * ((static_cast<int>(m_orientation) << 2) | (static_cast<int>(m_fakeBold) << 1) | static_cast<int>(m_fakeItalic)); 267 259 268 260 // This memcpy is to avoid a reinterpret_cast that breaks strict-aliasing -
TabularUnified trunk/Source/WebCore/platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h ¶
r134871 r136520 37 37 #include "SharedBuffer.h" 38 38 #include "SkPaint.h" 39 #include "TextOrientation.h"40 39 #include <wtf/Forward.h> 41 40 #include <wtf/RefPtr.h> … … 72 71 FontPlatformData(float textSize, bool fakeBold, bool fakeItalic); 73 72 FontPlatformData(const FontPlatformData&); 74 FontPlatformData(SkTypeface*, const char* name, float textSize, bool fakeBold, bool fakeItalic, FontOrientation = Horizontal , TextOrientation = TextOrientationVerticalRight);73 FontPlatformData(SkTypeface*, const char* name, float textSize, bool fakeBold, bool fakeItalic, FontOrientation = Horizontal); 75 74 FontPlatformData(const FontPlatformData& src, float textSize); 76 75 ~FontPlatformData(); … … 145 144 bool m_fakeItalic; 146 145 FontOrientation m_orientation; 147 TextOrientation m_textOrientation;148 146 FontRenderStyle m_style; 149 147 #if USE(HARFBUZZ_NG) -
TabularUnified trunk/Source/WebCore/platform/graphics/mac/FontCacheMac.mm ¶
r133976 r136520 239 239 // FontPlatformData::font() can be null for the case of Chromium out-of-process font loading. 240 240 // In that case, we don't want to use the platformData. 241 OwnPtr<FontPlatformData> platformData = adoptPtr(new FontPlatformData(platformFont, size, fontDescription.usePrinterFont(), syntheticBold, syntheticOblique, fontDescription.orientation(), fontDescription. textOrientation(), fontDescription.widthVariant()));241 OwnPtr<FontPlatformData> platformData = adoptPtr(new FontPlatformData(platformFont, size, fontDescription.usePrinterFont(), syntheticBold, syntheticOblique, fontDescription.orientation(), fontDescription.widthVariant())); 242 242 if (!platformData->font()) 243 243 return 0; -
TabularUnified trunk/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.cpp ¶
r122670 r136520 89 89 } 90 90 91 FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation orientation, TextOrientation textOrientation,FontWidthVariant widthVariant, FontRenderingMode)91 FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation orientation, FontWidthVariant widthVariant, FontRenderingMode) 92 92 { 93 return FontPlatformData(m_cgFont, size, bold, italic, orientation, textOrientation,widthVariant);93 return FontPlatformData(m_cgFont, size, bold, italic, orientation, widthVariant); 94 94 } 95 95 -
TabularUnified trunk/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.h ¶
r121582 r136520 25 25 #include "FontRenderingMode.h" 26 26 #include "FontWidthVariant.h" 27 #include "TextOrientation.h"28 27 #include <CoreFoundation/CFBase.h> 29 28 #include <wtf/Forward.h> … … 57 56 ~FontCustomPlatformData(); 58 57 59 FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal, TextOrientation = TextOrientationVerticalRight,FontWidthVariant = RegularWidth, FontRenderingMode = NormalRenderingMode);58 FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal, FontWidthVariant = RegularWidth, FontRenderingMode = NormalRenderingMode); 60 59 61 60 static bool supportsFormat(const String&); -
TabularUnified trunk/Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm ¶
r133362 r136520 128 128 bool syntheticOblique = platformData().syntheticOblique() && !(traits & kCTFontItalicTrait); 129 129 130 FontPlatformData substitutePlatform(substituteFont, platformData().size(), isUsingPrinterFont, syntheticBold, syntheticOblique, platformData().orientation(), platformData(). textOrientation(), platformData().widthVariant());130 FontPlatformData substitutePlatform(substituteFont, platformData().size(), isUsingPrinterFont, syntheticBold, syntheticOblique, platformData().orientation(), platformData().widthVariant()); 131 131 SimpleFontData* value = new SimpleFontData(substitutePlatform, isCustomFont()); 132 132 if (value) { -
TabularUnified trunk/Source/WebCore/platform/graphics/pango/FontCustomPlatformDataPango.cpp ¶
r95901 r136520 31 31 } 32 32 33 FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation, TextOrientation,FontWidthVariant, FontRenderingMode)33 FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation, FontWidthVariant, FontRenderingMode) 34 34 { 35 35 return FontPlatformData(m_fontFace, size, bold, italic); -
TabularUnified trunk/Source/WebCore/platform/graphics/qt/FontCustomPlatformData.h ¶
r129647 r136520 26 26 #include "FontRenderingMode.h" 27 27 #include "FontWidthVariant.h" 28 #include "TextOrientation.h"29 28 #include <QRawFont> 30 29 #include <wtf/FastAllocBase.h> … … 42 41 FontCustomPlatformData() { } 43 42 44 FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal, TextOrientation = TextOrientationVerticalRight,43 FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal, 45 44 FontWidthVariant = RegularWidth, FontRenderingMode = NormalRenderingMode); 46 45 -
TabularUnified trunk/Source/WebCore/platform/graphics/qt/FontCustomPlatformDataQt.cpp ¶
r125766 r136520 29 29 namespace WebCore { 30 30 31 FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation, TextOrientation,FontWidthVariant, FontRenderingMode)31 FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation, FontWidthVariant, FontRenderingMode) 32 32 { 33 33 Q_ASSERT(m_rawFont.isValid()); -
TabularUnified trunk/Source/WebCore/platform/graphics/skia/FontCacheSkia.cpp ¶
r133976 r136520 181 181 (style & SkTypeface::kBold) && !tf->isBold(), 182 182 (style & SkTypeface::kItalic) && !tf->isItalic(), 183 fontDescription.orientation(), 184 fontDescription.textOrientation()); 183 fontDescription.orientation()); 185 184 tf->unref(); 186 185 return result; -
TabularUnified trunk/Source/WebCore/platform/graphics/skia/FontCustomPlatformData.cpp ¶
r126312 r136520 67 67 68 68 FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation orientation, 69 TextOrientation textOrientation,FontWidthVariant, FontRenderingMode mode)69 FontWidthVariant, FontRenderingMode mode) 70 70 { 71 71 #if OS(WINDOWS) … … 104 104 #elif OS(UNIX) 105 105 ASSERT(m_fontReference); 106 return FontPlatformData(m_fontReference, "", size, bold && !m_fontReference->isBold(), italic && !m_fontReference->isItalic(), orientation , textOrientation);106 return FontPlatformData(m_fontReference, "", size, bold && !m_fontReference->isBold(), italic && !m_fontReference->isItalic(), orientation); 107 107 #else 108 108 notImplemented(); -
TabularUnified trunk/Source/WebCore/platform/graphics/skia/FontCustomPlatformData.h ¶
r127757 r136520 36 36 #include "FontRenderingMode.h" 37 37 #include "FontWidthVariant.h" 38 #include "TextOrientation.h"39 38 #include <wtf/Forward.h> 40 39 #include <wtf/Noncopyable.h> … … 68 67 ~FontCustomPlatformData(); 69 68 70 FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal, TextOrientation = TextOrientationVerticalRight,69 FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal, 71 70 FontWidthVariant = RegularWidth, FontRenderingMode = NormalRenderingMode); 72 71 -
TabularUnified trunk/Source/WebCore/platform/graphics/win/FontCustomPlatformData.cpp ¶
r122652 r136520 60 60 } 61 61 62 FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation, TextOrientation,FontWidthVariant, FontRenderingMode renderingMode)62 FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation, FontWidthVariant, FontRenderingMode renderingMode) 63 63 { 64 64 ASSERT(m_fontReference); -
TabularUnified trunk/Source/WebCore/platform/graphics/win/FontCustomPlatformData.h ¶
r127757 r136520 25 25 #include "FontRenderingMode.h" 26 26 #include "FontWidthVariant.h" 27 #include "TextOrientation.h"28 27 #include <windows.h> 29 28 #include <wtf/Forward.h> … … 49 48 ~FontCustomPlatformData(); 50 49 51 FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal, TextOrientation = TextOrientationVerticalRight,50 FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal, 52 51 FontWidthVariant = RegularWidth, FontRenderingMode = NormalRenderingMode); 53 52 -
TabularUnified trunk/Source/WebCore/platform/graphics/win/FontCustomPlatformDataCairo.cpp ¶
r95901 r136520 36 36 } 37 37 38 FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation, TextOrientation,FontWidthVariant)38 FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation, FontWidthVariant) 39 39 { 40 40 return FontPlatformData(m_fontFace, size, bold, italic); -
TabularUnified trunk/Source/WebCore/platform/graphics/win/FontCustomPlatformDataCairo.h ¶
r95901 r136520 43 43 ~FontCustomPlatformData(); 44 44 45 FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal, TextOrientation = TextOrientationVerticalRight,FontWidthVariant = RegularWidth);45 FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal, FontWidthVariant = RegularWidth); 46 46 47 47 static bool supportsFormat(const String&); -
TabularUnified trunk/Source/WebCore/platform/graphics/win/FontPlatformDataCGWin.cpp ¶
r127757 r136520 119 119 , m_syntheticOblique(oblique) 120 120 , m_orientation(Horizontal) 121 , m_textOrientation(TextOrientationVerticalRight)122 121 , m_size(size) 123 122 , m_widthVariant(RegularWidth) -
TabularUnified trunk/Source/WebCore/platform/graphics/win/FontPlatformDataCairoWin.cpp ¶
r127757 r136520 61 61 , m_size(size) 62 62 , m_orientation(Horizontal) 63 , m_textOrientation(TextOrientationVerticalRight)64 63 , m_widthVariant(RegularWidth) 65 64 , m_scaledFont(0) -
TabularUnified trunk/Source/WebCore/platform/graphics/win/FontPlatformDataWin.cpp ¶
r127757 r136520 42 42 , m_size(size) 43 43 , m_orientation(Horizontal) 44 , m_textOrientation(TextOrientationVerticalRight)45 44 , m_widthVariant(RegularWidth) 46 45 #if USE(CG) -
TabularUnified trunk/Source/WebCore/platform/graphics/wince/FontCustomPlatformData.cpp ¶
r122652 r136520 46 46 } 47 47 48 FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation, TextOrientation,FontWidthVariant, FontRenderingMode renderingMode)48 FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation, FontWidthVariant, FontRenderingMode renderingMode) 49 49 { 50 50 FontDescription fontDesc; -
TabularUnified trunk/Source/WebCore/platform/graphics/wince/FontCustomPlatformData.h ¶
r127757 r136520 25 25 #include "FontRenderingMode.h" 26 26 #include "FontWidthVariant.h" 27 #include "TextOrientation.h"28 27 #include <wtf/Noncopyable.h> 29 28 #include <wtf/text/WTFString.h> … … 51 50 ~FontCustomPlatformData(); 52 51 53 FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal, TextOrientation = TextOrientationVerticalRight,FontWidthVariant = RegularWidth, FontRenderingMode = NormalRenderingMode);52 FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal, FontWidthVariant = RegularWidth, FontRenderingMode = NormalRenderingMode); 54 53 55 54 static bool supportsFormat(const String&);
Note:
See TracChangeset
for help on using the changeset viewer.