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

Unified Diff: Source/core/css/CSSSegmentedFontFaceCache.h

Issue 68933007: Add CSSFontSelector::removeFontFaceRule() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Avoid double hash lookups Created 7 years, 1 month 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 | « Source/core/css/CSSSegmentedFontFace.cpp ('k') | Source/core/css/CSSSegmentedFontFaceCache.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSSegmentedFontFaceCache.h
diff --git a/Source/core/css/CSSSegmentedFontFaceCache.h b/Source/core/css/CSSSegmentedFontFaceCache.h
index 4b005a9fd23c0ad5ea730d2d3c5e95c636235f90..60db488cd81c3de50ae81d37b17e358cc0510326 100644
--- a/Source/core/css/CSSSegmentedFontFaceCache.h
+++ b/Source/core/css/CSSSegmentedFontFaceCache.h
@@ -33,6 +33,7 @@
namespace WebCore {
+class CSSFontFace;
class CSSFontSelector;
class CSSSegmentedFontFace;
class FontData;
@@ -47,15 +48,21 @@ public:
// FIXME: Remove CSSFontSelector as argument. Passing CSSFontSelector here is
// a result of egregious spaghettification in CSSFontFace/FontFaceSet.
void addFontFaceRule(CSSFontSelector*, const StyleRuleFontFace*);
+ void removeFontFaceRule(const StyleRuleFontFace*);
PassRefPtr<FontData> getFontData(Settings*, const FontDescription&, const AtomicString&);
CSSSegmentedFontFace* getFontFace(const FontDescription&, const AtomicString& family);
unsigned version() const { return m_version; }
private:
- HashMap<String, OwnPtr<HashMap<unsigned, RefPtr<CSSSegmentedFontFace> > >, CaseFoldingHash> m_fontFaces;
- HashMap<String, OwnPtr<Vector<RefPtr<CSSSegmentedFontFace> > >, CaseFoldingHash> m_locallyInstalledFontFaces;
- HashMap<String, OwnPtr<HashMap<unsigned, RefPtr<CSSSegmentedFontFace> > >, CaseFoldingHash> m_fonts;
+ typedef HashMap<unsigned, RefPtr<CSSSegmentedFontFace> > TraitsMap;
+ typedef HashMap<String, OwnPtr<TraitsMap>, CaseFoldingHash> FamilyToTraitsMap;
+ typedef HashMap<String, OwnPtr<Vector<RefPtr<CSSSegmentedFontFace> > >, CaseFoldingHash> FamilyToFontFaces;
+ typedef HashMap<const StyleRuleFontFace*, RefPtr<CSSFontFace> > StyleRuleToFontFace;
+ FamilyToTraitsMap m_fontFaces;
+ FamilyToFontFaces m_locallyInstalledFontFaces;
+ FamilyToTraitsMap m_fonts;
+ StyleRuleToFontFace m_styleRuleToFontFace;
// FIXME: See if this could be ditched
// Used to compare Font instances, and the usage seems suspect.
« no previous file with comments | « Source/core/css/CSSSegmentedFontFace.cpp ('k') | Source/core/css/CSSSegmentedFontFaceCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698