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

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

Issue 2620343003: Remove unused parameter from FontFace::loadWithCallback() (Closed)
Patch Set: Created 3 years, 11 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 | « third_party/WebKit/Source/core/css/FontFace.h ('k') | third_party/WebKit/Source/core/css/FontFaceSet.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/FontFace.cpp
diff --git a/third_party/WebKit/Source/core/css/FontFace.cpp b/third_party/WebKit/Source/core/css/FontFace.cpp
index f199686ac84782f0a69d487cd8a31fb09e8d7d5d..2d695fb7ee5ae54eb375ba1103938edbe85116b5 100644
--- a/third_party/WebKit/Source/core/css/FontFace.cpp
+++ b/third_party/WebKit/Source/core/css/FontFace.cpp
@@ -388,13 +388,14 @@ ScriptPromise FontFace::fontStatusPromise(ScriptState* scriptState) {
}
ScriptPromise FontFace::load(ScriptState* scriptState) {
- loadInternal(scriptState->getExecutionContext());
+ if (m_status == Unloaded)
+ m_cssFontFace->load();
return fontStatusPromise(scriptState);
}
-void FontFace::loadWithCallback(LoadFontCallback* callback,
- ExecutionContext* context) {
- loadInternal(context);
+void FontFace::loadWithCallback(LoadFontCallback* callback) {
+ if (m_status == Unloaded)
+ m_cssFontFace->load();
addCallback(callback);
}
@@ -407,13 +408,6 @@ void FontFace::addCallback(LoadFontCallback* callback) {
m_callbacks.push_back(callback);
}
-void FontFace::loadInternal(ExecutionContext* context) {
- if (m_status != Unloaded)
- return;
-
- m_cssFontFace->load();
-}
-
FontTraits FontFace::traits() const {
FontStretch stretch = FontStretchNormal;
if (m_stretch) {
« no previous file with comments | « third_party/WebKit/Source/core/css/FontFace.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