diff options
Diffstat (limited to 'chromium/third_party/WebKit/Source/platform/fonts/SimpleFontData.h')
-rw-r--r-- | chromium/third_party/WebKit/Source/platform/fonts/SimpleFontData.h | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/chromium/third_party/WebKit/Source/platform/fonts/SimpleFontData.h b/chromium/third_party/WebKit/Source/platform/fonts/SimpleFontData.h index bd2201676d5..8768872d8b9 100644 --- a/chromium/third_party/WebKit/Source/platform/fonts/SimpleFontData.h +++ b/chromium/third_party/WebKit/Source/platform/fonts/SimpleFontData.h @@ -30,7 +30,6 @@ #include "platform/fonts/FontData.h" #include "platform/fonts/FontMetrics.h" #include "platform/fonts/FontPlatformData.h" -#include "platform/fonts/GlyphBuffer.h" #include "platform/fonts/GlyphMetricsMap.h" #include "platform/fonts/GlyphPageTreeNode.h" #include "platform/fonts/TypesettingFeatures.h" @@ -57,7 +56,7 @@ enum Pitch { UnknownPitch, FixedPitch, VariablePitch }; class PLATFORM_EXPORT SimpleFontData : public FontData { public: // Used to create platform fonts. - static PassRefPtr<SimpleFontData> create(const FontPlatformData& platformData, PassRefPtr<CustomFontData> customData = 0, bool isTextOrientationFallback = false) + static PassRefPtr<SimpleFontData> create(const FontPlatformData& platformData, PassRefPtr<CustomFontData> customData = nullptr, bool isTextOrientationFallback = false) { return adoptRef(new SimpleFontData(platformData, customData, isTextOrientationFallback)); } @@ -136,7 +135,6 @@ public: void setZeroGlyph(Glyph zeroGlyph) { m_zeroGlyph = zeroGlyph; } virtual const SimpleFontData* fontDataForCharacter(UChar32) const OVERRIDE; - virtual bool containsCharacters(const UChar*, int length) const OVERRIDE; Glyph glyphForCharacter(UChar32) const; @@ -148,12 +146,13 @@ public: virtual bool isLoading() const OVERRIDE { return m_customFontData ? m_customFontData->isLoading() : false; } virtual bool isLoadingFallback() const OVERRIDE { return m_customFontData ? m_customFontData->isLoadingFallback() : false; } virtual bool isSegmented() const OVERRIDE; + virtual bool shouldSkipDrawing() const OVERRIDE { return m_customFontData && m_customFontData->shouldSkipDrawing(); } const GlyphData& missingGlyphData() const { return m_missingGlyphData; } void setMissingGlyphData(const GlyphData& glyphData) { m_missingGlyphData = glyphData; } #ifndef NDEBUG - virtual String description() const; + virtual String description() const OVERRIDE; #endif #if OS(MACOSX) @@ -165,22 +164,19 @@ public: CFDictionaryRef getCFStringAttributes(TypesettingFeatures, FontOrientation) const; #endif -#if OS(MACOSX) || USE(HARFBUZZ) bool canRenderCombiningCharacterSequence(const UChar*, size_t) const; -#endif - - bool applyTransforms(GlyphBufferGlyph*, GlyphBufferAdvance*, size_t, TypesettingFeatures) const - { - return false; - } PassRefPtr<CustomFontData> customFontData() const { return m_customFontData; } -private: + // Implemented by the platform. + virtual bool fillGlyphPage(GlyphPage* pageToFill, unsigned offset, unsigned length, UChar* buffer, unsigned bufferLength) const; + +protected: SimpleFontData(const FontPlatformData&, PassRefPtr<CustomFontData> customData, bool isTextOrientationFallback = false); SimpleFontData(PassRefPtr<CustomFontData> customData, float fontSize, bool syntheticBold, bool syntheticItalic); +private: void platformInit(); void platformGlyphInit(); void platformCharWidthInit(); @@ -249,9 +245,7 @@ private: mutable HashMap<unsigned, RetainPtr<CFDictionaryRef> > m_CFStringAttributes; #endif -#if OS(MACOSX) || USE(HARFBUZZ) mutable OwnPtr<HashMap<String, bool> > m_combiningCharacterSequenceSupport; -#endif }; ALWAYS_INLINE FloatRect SimpleFontData::boundsForGlyph(Glyph glyph) const |