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

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

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 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/Counter.h ('k') | Source/core/css/FontFaceCache.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/FontFace.cpp
diff --git a/Source/core/css/FontFace.cpp b/Source/core/css/FontFace.cpp
index 1e9604955e14a22e588796e4da7d7b5d44d03295..a8e57cbbeed8145ab31019fef962dfe686cb2a42 100644
--- a/Source/core/css/FontFace.cpp
+++ b/Source/core/css/FontFace.cpp
@@ -93,7 +93,7 @@ private:
static PassRefPtrWillBeRawPtr<CSSValue> parseCSSValue(const Document* document, const String& s, CSSPropertyID propertyID)
{
if (s.isEmpty())
- return 0;
+ return nullptr;
RefPtr<MutableStylePropertySet> parsedStyle = MutableStylePropertySet::create();
BisonCSSParser::parseValue(parsedStyle.get(), propertyID, s, true, *document);
return parsedStyle->getPropertyCSSValue(propertyID);
@@ -104,44 +104,44 @@ PassRefPtr<FontFace> FontFace::create(ExecutionContext* context, const AtomicStr
RefPtrWillBeRawPtr<CSSValue> src = parseCSSValue(toDocument(context), source, CSSPropertySrc);
if (!src || !src->isValueList()) {
exceptionState.throwDOMException(SyntaxError, "The source provided ('" + source + "') could not be parsed as a value list.");
- return 0;
+ return nullptr;
}
RefPtr<FontFace> fontFace = adoptRef<FontFace>(new FontFace(src));
fontFace->setFamily(context, family, exceptionState);
if (exceptionState.hadException())
- return 0;
+ return nullptr;
String value;
if (descriptors.get("style", value)) {
fontFace->setStyle(context, value, exceptionState);
if (exceptionState.hadException())
- return 0;
+ return nullptr;
}
if (descriptors.get("weight", value)) {
fontFace->setWeight(context, value, exceptionState);
if (exceptionState.hadException())
- return 0;
+ return nullptr;
}
if (descriptors.get("stretch", value)) {
fontFace->setStretch(context, value, exceptionState);
if (exceptionState.hadException())
- return 0;
+ return nullptr;
}
if (descriptors.get("unicodeRange", value)) {
fontFace->setUnicodeRange(context, value, exceptionState);
if (exceptionState.hadException())
- return 0;
+ return nullptr;
}
if (descriptors.get("variant", value)) {
fontFace->setVariant(context, value, exceptionState);
if (exceptionState.hadException())
- return 0;
+ return nullptr;
}
if (descriptors.get("featureSettings", value)) {
fontFace->setFeatureSettings(context, value, exceptionState);
if (exceptionState.hadException())
- return 0;
+ return nullptr;
}
fontFace->initCSSFontFace(toDocument(context));
@@ -155,10 +155,10 @@ PassRefPtr<FontFace> FontFace::create(Document* document, const StyleRuleFontFac
// Obtain the font-family property and the src property. Both must be defined.
RefPtrWillBeRawPtr<CSSValue> family = properties->getPropertyCSSValue(CSSPropertyFontFamily);
if (!family || !family->isValueList())
- return 0;
+ return nullptr;
RefPtrWillBeRawPtr<CSSValue> src = properties->getPropertyCSSValue(CSSPropertySrc);
if (!src || !src->isValueList())
- return 0;
+ return nullptr;
RefPtr<FontFace> fontFace = adoptRef<FontFace>(new FontFace(src));
@@ -174,7 +174,7 @@ PassRefPtr<FontFace> FontFace::create(Document* document, const StyleRuleFontFac
fontFace->initCSSFontFace(document);
return fontFace;
}
- return 0;
+ return nullptr;
}
FontFace::FontFace(PassRefPtrWillBeRawPtr<CSSValue> src)
« no previous file with comments | « Source/core/css/Counter.h ('k') | Source/core/css/FontFaceCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698