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

Unified Diff: Source/core/css/CSSFontSelector.cpp

Issue 103273002: CSSSegmentedFontFaceCache should not know about Document. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years 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/CSSFontSelector.h ('k') | Source/core/css/CSSSegmentedFontFaceCache.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSFontSelector.cpp
diff --git a/Source/core/css/CSSFontSelector.cpp b/Source/core/css/CSSFontSelector.cpp
index d44965d40bdd1a31ebbac5687fc1de577b6816a1..e99417eefdae92dad3db124c512b9d2ed238bd5c 100644
--- a/Source/core/css/CSSFontSelector.cpp
+++ b/Source/core/css/CSSFontSelector.cpp
@@ -153,14 +153,14 @@ void CSSFontSelector::fontCacheInvalidated()
dispatchInvalidationCallbacks();
}
-void CSSFontSelector::addFontFaceRule(const StyleRuleFontFace* fontFaceRule)
+void CSSFontSelector::addFontFaceRule(const StyleRuleFontFace* fontFaceRule, PassRefPtr<CSSFontFace> cssFontFace)
{
- m_cssSegmentedFontFaceCache.addFontFaceRule(this, fontFaceRule);
+ m_cssSegmentedFontFaceCache.add(this, fontFaceRule, cssFontFace);
}
void CSSFontSelector::removeFontFaceRule(const StyleRuleFontFace* fontFaceRule)
{
- m_cssSegmentedFontFaceCache.removeFontFaceRule(fontFaceRule);
+ m_cssSegmentedFontFaceCache.remove(fontFaceRule);
}
static AtomicString familyNameFromSettings(const GenericFontFamilySettings& settings, const FontDescription& fontDescription, const AtomicString& genericFamilyName)
@@ -193,7 +193,7 @@ static AtomicString familyNameFromSettings(const GenericFontFamilySettings& sett
PassRefPtr<FontData> CSSFontSelector::getFontData(const FontDescription& fontDescription, const AtomicString& familyName)
{
- if (CSSSegmentedFontFace* face = m_cssSegmentedFontFaceCache.getFontFace(fontDescription, familyName))
+ if (CSSSegmentedFontFace* face = m_cssSegmentedFontFaceCache.get(fontDescription, familyName))
return face->getFontData(fontDescription);
// Try to return the correct font based off our settings, in case we were handed the generic font family name.
@@ -206,7 +206,7 @@ PassRefPtr<FontData> CSSFontSelector::getFontData(const FontDescription& fontDes
CSSSegmentedFontFace* CSSFontSelector::getFontFace(const FontDescription& fontDescription, const AtomicString& familyName)
{
- return m_cssSegmentedFontFaceCache.getFontFace(fontDescription, familyName);
+ return m_cssSegmentedFontFaceCache.get(fontDescription, familyName);
}
void CSSFontSelector::willUseFontData(const FontDescription& fontDescription, const AtomicString& family)
« no previous file with comments | « Source/core/css/CSSFontSelector.h ('k') | Source/core/css/CSSSegmentedFontFaceCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698