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

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

Issue 2668903003: Replace WTF::emptyString{16Bit}() with a static global (Closed)
Patch Set: Replace WTF::emptyString{16Bit}() with a static global 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
Index: third_party/WebKit/Source/core/css/StylePropertySerializer.cpp
diff --git a/third_party/WebKit/Source/core/css/StylePropertySerializer.cpp b/third_party/WebKit/Source/core/css/StylePropertySerializer.cpp
index 3693f7efbb8feae9428f27da174bb1c6e37357cb..9314b06ae97423589b461c50200d0c9f4609b704 100644
--- a/third_party/WebKit/Source/core/css/StylePropertySerializer.cpp
+++ b/third_party/WebKit/Source/core/css/StylePropertySerializer.cpp
@@ -351,7 +351,7 @@ String StylePropertySerializer::commonShorthandChecks(
for (int i = 0; i < longhandCount; i++) {
int index = m_propertySet.findPropertyIndex(shorthand.properties()[i]);
if (index == -1)
- return emptyString();
+ return emptyString;
PropertyValueForSerializer value = m_propertySet.propertyAt(index);
hasImportant |= value.isImportant();
@@ -360,14 +360,14 @@ String StylePropertySerializer::commonShorthandChecks(
}
if (hasImportant && hasNonImportant)
- return emptyString();
+ return emptyString;
if (longhands[0]->isCSSWideKeyword() ||
longhands[0]->isPendingSubstitutionValue()) {
bool success = true;
for (int i = 1; i < longhandCount; i++) {
if (!longhands[i]->equals(*longhands[0])) {
- // This should just return emptyString() but some shorthands currently
+ // This should just return emptyString but some shorthands currently
// allow 'initial' for their longhands.
success = false;
break;
@@ -386,12 +386,12 @@ String StylePropertySerializer::commonShorthandChecks(
for (int i = 0; i < longhandCount; i++) {
const CSSValue& value = *longhands[i];
if (!allowInitial && value.isInitialValue())
- return emptyString();
+ return emptyString;
if (value.isInheritedValue() || value.isUnsetValue() ||
value.isPendingSubstitutionValue())
- return emptyString();
+ return emptyString;
if (value.isVariableReferenceValue())
- return emptyString();
+ return emptyString;
}
return String();
@@ -600,7 +600,7 @@ String StylePropertySerializer::fontValue() const {
(numericValue->isIdentifierValue() &&
toCSSIdentifierValue(numericValue)->getValueID() != CSSValueNormal) ||
numericValue->isValueList())
- return emptyString();
+ return emptyString;
StringBuilder result;
appendFontLonghandValueIfNotNormal(CSSPropertyFontStyle, result);
@@ -609,7 +609,7 @@ String StylePropertySerializer::fontValue() const {
if (val->isIdentifierValue() &&
(toCSSIdentifierValue(val)->getValueID() != CSSValueSmallCaps &&
toCSSIdentifierValue(val)->getValueID() != CSSValueNormal))
- return emptyString();
+ return emptyString;
appendFontLonghandValueIfNotNormal(CSSPropertyFontVariantCaps, result);
appendFontLonghandValueIfNotNormal(CSSPropertyFontWeight, result);
« no previous file with comments | « third_party/WebKit/Source/core/css/FontFace.cpp ('k') | third_party/WebKit/Source/core/css/parser/CSSParserContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698