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

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

Issue 87503003: Moving fontSelector from StyleResolver to StyleEngine. (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 | « no previous file | Source/core/css/resolver/StyleResolver.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/FontFaceSet.cpp
diff --git a/Source/core/css/FontFaceSet.cpp b/Source/core/css/FontFaceSet.cpp
index 7d6a552fdf067dfb1ab0e40dc1f67109a8e9b313..38165b8a9aafd457656b6710caaaf636b2cad4ce 100644
--- a/Source/core/css/FontFaceSet.cpp
+++ b/Source/core/css/FontFaceSet.cpp
@@ -310,7 +310,7 @@ Vector<RefPtr<FontFace> > FontFaceSet::match(const String& fontString, const Str
}
for (const FontFamily* f = &font.family(); f; f = f->next()) {
- CSSSegmentedFontFace* face = document()->ensureStyleResolver().fontSelector()->getFontFace(font.fontDescription(), f->family());
+ CSSSegmentedFontFace* face = document()->styleEngine()->fontSelector()->getFontFace(font.fontDescription(), f->family());
if (face)
matchedFonts.append(face->fontFaces(nullToSpace(text)));
}
@@ -329,7 +329,7 @@ ScriptPromise FontFaceSet::load(const String& fontString, const String& text, Ex
ScriptPromise promise = ScriptPromise::createPending(executionContext());
RefPtr<LoadFontPromiseResolver> resolver = LoadFontPromiseResolver::create(font.family(), promise, executionContext());
for (const FontFamily* f = &font.family(); f; f = f->next()) {
- CSSSegmentedFontFace* face = d->ensureStyleResolver().fontSelector()->getFontFace(font.fontDescription(), f->family());
+ CSSSegmentedFontFace* face = d->styleEngine()->fontSelector()->getFontFace(font.fontDescription(), f->family());
if (!face) {
resolver->error(d);
continue;
@@ -348,7 +348,7 @@ bool FontFaceSet::check(const String& fontString, const String& text, ExceptionS
}
for (const FontFamily* f = &font.family(); f; f = f->next()) {
- CSSSegmentedFontFace* face = document()->ensureStyleResolver().fontSelector()->getFontFace(font.fontDescription(), f->family());
+ CSSSegmentedFontFace* face = document()->styleEngine()->fontSelector()->getFontFace(font.fontDescription(), f->family());
if (!face || !face->checkFont(nullToSpace(text)))
return false;
}
@@ -397,7 +397,7 @@ bool FontFaceSet::resolveFontStyle(const String& fontString, Font& font)
styleResolver.applyPropertiesToStyle(properties, WTF_ARRAY_LENGTH(properties), style.get());
font = style->font();
- font.update(styleResolver.fontSelector());
+ font.update(document()->styleEngine()->fontSelector());
return true;
}
« no previous file with comments | « no previous file | Source/core/css/resolver/StyleResolver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698