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

Unified Diff: third_party/WebKit/Source/core/css/FontFaceCache.cpp

Issue 2620293002: Remove CSSFontSelector argument and member from CSSSegmentedFontFace (Closed)
Patch Set: Update test for CL comments Created 3 years, 10 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
Index: third_party/WebKit/Source/core/css/FontFaceCache.cpp
diff --git a/third_party/WebKit/Source/core/css/FontFaceCache.cpp b/third_party/WebKit/Source/core/css/FontFaceCache.cpp
index fbc561c03f87bad7349039328e116b39577b82a5..eeaf9a12a5e244b275edf04e424a3de0b2a714d2 100644
--- a/third_party/WebKit/Source/core/css/FontFaceCache.cpp
+++ b/third_party/WebKit/Source/core/css/FontFaceCache.cpp
@@ -26,7 +26,6 @@
#include "core/css/FontFaceCache.h"
-#include "core/css/CSSFontSelector.h"
#include "core/css/CSSSegmentedFontFace.h"
#include "core/css/CSSValueList.h"
#include "core/css/FontFace.h"
@@ -44,17 +43,14 @@ static unsigned s_version = 0;
FontFaceCache::FontFaceCache() : m_version(0) {}
-void FontFaceCache::add(CSSFontSelector* cssFontSelector,
- const StyleRuleFontFace* fontFaceRule,
+void FontFaceCache::add(const StyleRuleFontFace* fontFaceRule,
FontFace* fontFace) {
if (!m_styleRuleToFontFace.insert(fontFaceRule, fontFace).isNewEntry)
return;
- addFontFace(cssFontSelector, fontFace, true);
+ addFontFace(fontFace, true);
}
-void FontFaceCache::addFontFace(CSSFontSelector* cssFontSelector,
- FontFace* fontFace,
- bool cssConnected) {
+void FontFaceCache::addFontFace(FontFace* fontFace, bool cssConnected) {
FamilyToTraitsMap::AddResult traitsResult =
m_fontFaces.insert(fontFace->family(), nullptr);
if (!traitsResult.storedValue->value)
@@ -63,9 +59,10 @@ void FontFaceCache::addFontFace(CSSFontSelector* cssFontSelector,
TraitsMap::AddResult segmentedFontFaceResult =
traitsResult.storedValue->value->insert(fontFace->traits().bitfield(),
nullptr);
- if (!segmentedFontFaceResult.storedValue->value)
+ if (!segmentedFontFaceResult.storedValue->value) {
segmentedFontFaceResult.storedValue->value =
- CSSSegmentedFontFace::create(cssFontSelector, fontFace->traits());
+ CSSSegmentedFontFace::create(fontFace->traits());
+ }
segmentedFontFaceResult.storedValue->value->addFontFace(fontFace,
cssConnected);
« no previous file with comments | « third_party/WebKit/Source/core/css/FontFaceCache.h ('k') | third_party/WebKit/Source/core/css/FontFaceSet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698