Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1209)

Unified Diff: third_party/WebKit/WebCore/platform/graphics/SimpleFontData.h

Issue 18529: Removing unneeded code from SimpleFontData. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/WebCore/platform/graphics/SimpleFontData.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/WebCore/platform/graphics/SimpleFontData.h
===================================================================
--- third_party/WebKit/WebCore/platform/graphics/SimpleFontData.h (revision 8457)
+++ third_party/WebKit/WebCore/platform/graphics/SimpleFontData.h (working copy)
@@ -52,8 +52,6 @@
class SharedBuffer;
class SVGFontData;
class WidthMap;
-class ZeroWidthFontData;
-class CJKWidthFontData;
enum Pitch { UnknownPitch, FixedPitch, VariablePitch };
@@ -62,10 +60,6 @@
SimpleFontData(const FontPlatformData&, bool customFont = false, bool loading = false, SVGFontData* data = 0);
virtual ~SimpleFontData();
-protected:
- // sub-class constructor
- SimpleFontData();
-
public:
const FontPlatformData& platformData() const { return m_font; }
SimpleFontData* smallCapsFontData(const FontDescription& fontDescription) const;
@@ -81,7 +75,7 @@
float xHeight() const { return m_xHeight; }
unsigned unitsPerEm() const { return m_unitsPerEm; }
- virtual float widthForGlyph(Glyph) const;
+ float widthForGlyph(Glyph) const;
float platformWidthForGlyph(Glyph) const;
virtual const SimpleFontData* fontDataForCharacter(UChar32) const;
@@ -90,8 +84,6 @@
void determinePitch();
Pitch pitch() const { return m_treatAsFixedPitch ? FixedPitch : VariablePitch; }
- static bool isCJKCodePoint(UChar32 c);
-
#if ENABLE(SVG_FONTS)
SVGFontData* svgFontData() const { return m_svgFontData.get(); }
bool isSVGFont() const { return m_svgFontData; }
@@ -145,9 +137,6 @@
wxFont getWxFont() const { return m_font.font(); }
#endif
- const SimpleFontData* zeroWidthFontData() const;
- const SimpleFontData* cjkWidthFontData() const;
-
private:
void platformInit();
void platformGlyphInit();
@@ -220,36 +209,8 @@
mutable SCRIPT_CACHE m_scriptCache;
mutable SCRIPT_FONTPROPERTIES* m_scriptFontProperties;
#endif
-
-private:
- OwnPtr<ZeroWidthFontData> m_zeroWidthFontData;
- OwnPtr<CJKWidthFontData> m_cjkWidthFontData;
};
-// SimpleFontData sub-classes:
-
-// Has a single zero-width glyph, used for ZWS and
-// UCHAR_DEFAULT_IGNORABLE_CODE_POINT characters
-class ZeroWidthFontData : public SimpleFontData {
-public:
- void init(SimpleFontData*);
- virtual float widthForGlyph(Glyph) const { return 0.0f; }
-};
-
-// Monospaced, single glyph and width, used for CJK characters
-// The assumption made here can break for some high-quality CJK fonts with
-// proportional CJK glyphs.
-class CJKWidthFontData : public ZeroWidthFontData {
-public:
- CJKWidthFontData();
-
- virtual float widthForGlyph(Glyph) const;
-
-private:
- // Optimization for CJK glyphs
- mutable float m_cjkGlyphWidth;
-};
-
} // namespace WebCore
#endif // SimpleFontData_h
« no previous file with comments | « no previous file | third_party/WebKit/WebCore/platform/graphics/SimpleFontData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698