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

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

Issue 975933002: Return reference from styleEngine() accessor. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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
« no previous file with comments | « Source/core/css/FontFace.cpp ('k') | Source/core/css/SelectorChecker.cpp » ('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 766c80edee0f4b628e3f74cf31408e7f0e76468a..3d1a18d16a9658e802299bfc558bc732b6dbc5a1 100644
--- a/Source/core/css/FontFaceSet.cpp
+++ b/Source/core/css/FontFaceSet.cpp
@@ -293,7 +293,7 @@ void FontFaceSet::add(FontFace* fontFace, ExceptionState& exceptionState)
exceptionState.throwDOMException(InvalidModificationError, "Cannot add a CSS-connected FontFace.");
return;
}
- CSSFontSelector* fontSelector = document()->styleEngine()->fontSelector();
+ CSSFontSelector* fontSelector = document()->styleEngine().fontSelector();
m_nonCSSConnectedFaces.add(fontFace);
fontSelector->fontFaceCache()->addFontFace(fontSelector, fontFace, false);
if (fontFace->loadStatus() == FontFace::Loading)
@@ -305,7 +305,7 @@ void FontFaceSet::clear()
{
if (!inActiveDocumentContext() || m_nonCSSConnectedFaces.isEmpty())
return;
- CSSFontSelector* fontSelector = document()->styleEngine()->fontSelector();
+ CSSFontSelector* fontSelector = document()->styleEngine().fontSelector();
FontFaceCache* fontFaceCache = fontSelector->fontFaceCache();
for (const auto& fontFace : m_nonCSSConnectedFaces) {
fontFaceCache->removeFontFace(fontFace.get(), false);
@@ -327,7 +327,7 @@ bool FontFaceSet::remove(FontFace* fontFace, ExceptionState& exceptionState)
WillBeHeapListHashSet<RefPtrWillBeMember<FontFace> >::iterator it = m_nonCSSConnectedFaces.find(fontFace);
if (it != m_nonCSSConnectedFaces.end()) {
m_nonCSSConnectedFaces.remove(it);
- CSSFontSelector* fontSelector = document()->styleEngine()->fontSelector();
+ CSSFontSelector* fontSelector = document()->styleEngine().fontSelector();
fontSelector->fontFaceCache()->removeFontFace(fontFace, false);
if (fontFace->loadStatus() == FontFace::Loading)
removeFromLoadingFonts(fontFace);
@@ -354,7 +354,7 @@ const WillBeHeapListHashSet<RefPtrWillBeMember<FontFace> >& FontFaceSet::cssConn
{
Document* d = document();
d->ensureStyleResolver(); // Flush pending style changes.
- return d->styleEngine()->fontSelector()->fontFaceCache()->cssConnectedFontFaces();
+ return d->styleEngine().fontSelector()->fontFaceCache()->cssConnectedFontFaces();
}
bool FontFaceSet::isCSSConnectedFontFace(FontFace* fontFace) const
@@ -449,7 +449,7 @@ ScriptPromise FontFaceSet::load(ScriptState* scriptState, const String& fontStri
return promise;
}
- FontFaceCache* fontFaceCache = document()->styleEngine()->fontSelector()->fontFaceCache();
+ FontFaceCache* fontFaceCache = document()->styleEngine().fontSelector()->fontFaceCache();
FontFaceArray faces;
for (const FontFamily* f = &font.fontDescription().family(); f; f = f->next()) {
CSSSegmentedFontFace* segmentedFontFace = fontFaceCache->get(font.fontDescription(), f->family());
@@ -474,7 +474,7 @@ bool FontFaceSet::check(const String& fontString, const String& text, ExceptionS
return false;
}
- CSSFontSelector* fontSelector = document()->styleEngine()->fontSelector();
+ CSSFontSelector* fontSelector = document()->styleEngine().fontSelector();
FontFaceCache* fontFaceCache = fontSelector->fontFaceCache();
bool hasLoadedFaces = false;
@@ -538,7 +538,7 @@ bool FontFaceSet::resolveFontStyle(const String& fontString, Font& font)
styleResolver.applyPropertiesToStyle(properties, WTF_ARRAY_LENGTH(properties), style.get());
font = style->font();
- font.update(document()->styleEngine()->fontSelector());
+ font.update(document()->styleEngine().fontSelector());
return true;
}
« no previous file with comments | « Source/core/css/FontFace.cpp ('k') | Source/core/css/SelectorChecker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698