summaryrefslogtreecommitdiffstats
path: root/WebCore/svg/SVGFontElement.h
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2008-12-17 18:05:15 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2008-12-17 18:05:15 -0800
commit1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353 (patch)
tree4457a7306ea5acb43fe05bfe0973b1f7faf97ba2 /WebCore/svg/SVGFontElement.h
parent9364f22aed35e1a1e9d07c121510f80be3ab0502 (diff)
downloadexternal_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.zip
external_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.tar.gz
external_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.tar.bz2
Code drop from //branches/cupcake/...@124589
Diffstat (limited to 'WebCore/svg/SVGFontElement.h')
-rw-r--r--WebCore/svg/SVGFontElement.h26
1 files changed, 14 insertions, 12 deletions
diff --git a/WebCore/svg/SVGFontElement.h b/WebCore/svg/SVGFontElement.h
index 1005654..42468da 100644
--- a/WebCore/svg/SVGFontElement.h
+++ b/WebCore/svg/SVGFontElement.h
@@ -24,6 +24,8 @@
#if ENABLE(SVG_FONTS)
#include "SVGExternalResourcesRequired.h"
#include "SVGGlyphElement.h"
+#include "SVGGlyphMap.h"
+#include "SVGHKernElement.h"
#include "SVGStyledElement.h"
namespace WebCore {
@@ -36,29 +38,29 @@ namespace WebCore {
virtual ~SVGFontElement();
virtual bool rendererIsNeeded(RenderStyle*) { return false; }
- virtual const SVGElement* contextElement() const { return this; }
- void addGlyphToCache(SVGGlyphElement*);
- void removeGlyphFromCache(SVGGlyphElement*);
+ void invalidateGlyphCache();
- const Vector<SVGGlyphIdentifier>& glyphIdentifiersForString(const String&) const;
+ void getGlyphIdentifiersForString(const String&, Vector<SVGGlyphIdentifier>&) const;
- // Returns the longest hash key length (the 'unicode' property value with the
- // highest amount of characters) - ie. for <glyph unicode="ffl"/> it will return 3.
- unsigned int maximumHashKeyLength() const { return m_maximumHashKeyLength; }
+ bool getHorizontalKerningPairForStringsAndGlyphs(const String& u1, const String& g1, const String& u2, const String& g2, SVGHorizontalKerningPair& kerningPair) const;
SVGMissingGlyphElement* firstMissingGlyphElement() const;
+ protected:
+ virtual const SVGElement* contextElement() const { return this; }
+
private:
- typedef HashMap<String, Vector<SVGGlyphIdentifier> > GlyphHashMap;
- GlyphHashMap m_glyphMap;
+ void ensureGlyphCache() const;
- unsigned int m_maximumHashKeyLength;
+ typedef Vector<SVGHorizontalKerningPair> KerningPairVector;
+
+ mutable KerningPairVector m_kerningPairs;
+ mutable SVGGlyphMap m_glyphMap;
+ mutable bool m_isGlyphCacheValid;
};
} // namespace WebCore
#endif // ENABLE(SVG_FONTS)
#endif
-
-// vim:ts=4:noet