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

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

Issue 100463004: Make calls to AtomicString(const String&) explicit in css/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Make MediaQuery::mediaType() return an AtomicString 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
Index: Source/core/css/FontFace.cpp
diff --git a/Source/core/css/FontFace.cpp b/Source/core/css/FontFace.cpp
index c8121ce9e53f6fa5863e83a1d958b44aceea77de..d170b957b0c2a9d8fdf86c361a1ccee83693a26e 100644
--- a/Source/core/css/FontFace.cpp
+++ b/Source/core/css/FontFace.cpp
@@ -98,7 +98,7 @@ static PassRefPtr<CSSValue> parseCSSValue(const String& s, CSSPropertyID propert
return parsedStyle->getPropertyCSSValue(propertyID);
}
-PassRefPtr<FontFace> FontFace::create(const String& family, const String& source, const Dictionary& descriptors, ExceptionState& exceptionState)
+PassRefPtr<FontFace> FontFace::create(const AtomicString& family, const String& source, const Dictionary& descriptors, ExceptionState& exceptionState)
{
RefPtr<CSSValue> src = parseCSSValue(source, CSSPropertySrc);
if (!src || !src->isValueList()) {
@@ -291,9 +291,9 @@ bool FontFace::setFamilyValue(CSSValueList* familyList)
return false;
CSSPrimitiveValue* familyValue = toCSSPrimitiveValue(familyList->itemWithoutBoundsCheck(0));
- String family;
+ AtomicString family;
if (familyValue->isString()) {
- family = familyValue->getStringValue();
+ family = AtomicString(familyValue->getStringValue());
} else if (familyValue->isValueID()) {
// We need to use the raw text for all the generic family types, since @font-face is a way of actually
// defining what font to use for those types.

Powered by Google App Engine
This is Rietveld 408576698