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

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

Issue 540223002: Move FontFaceSet.{check,load}'s argument default into IDL file (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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 | « no previous file | Source/core/css/FontFaceSet.idl » ('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 698b5ecbaf408053659f83f2b08b937c4df0c902..333da9736cb468749d275c51d8a3667c2d5d48cf 100644
--- a/Source/core/css/FontFaceSet.cpp
+++ b/Source/core/css/FontFaceSet.cpp
@@ -431,12 +431,6 @@ void FontFaceSet::fireDoneEventIfPossible()
}
}
-static const String& nullToSpace(const String& s)
-{
- DEFINE_STATIC_LOCAL(String, space, (" "));
- return s.isNull() ? space : s;
-}
-
ScriptPromise FontFaceSet::load(ScriptState* scriptState, const String& fontString, const String& text)
{
if (!inActiveDocumentContext())
@@ -455,7 +449,7 @@ ScriptPromise FontFaceSet::load(ScriptState* scriptState, const String& fontStri
for (const FontFamily* f = &font.fontDescription().family(); f; f = f->next()) {
CSSSegmentedFontFace* segmentedFontFace = fontFaceCache->get(font.fontDescription(), f->family());
if (segmentedFontFace)
- segmentedFontFace->match(nullToSpace(text), faces);
+ segmentedFontFace->match(text, faces);
}
RefPtrWillBeRawPtr<LoadFontPromiseResolver> resolver = LoadFontPromiseResolver::create(faces, scriptState);
@@ -482,7 +476,7 @@ bool FontFaceSet::check(const String& fontString, const String& text, ExceptionS
for (const FontFamily* f = &font.fontDescription().family(); f; f = f->next()) {
CSSSegmentedFontFace* face = fontFaceCache->get(font.fontDescription(), f->family());
if (face) {
- if (!face->checkFont(nullToSpace(text)))
+ if (!face->checkFont(text))
return false;
hasLoadedFaces = true;
}
« no previous file with comments | « no previous file | Source/core/css/FontFaceSet.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698