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

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

Issue 137293005: One more instance of StringBuilder::Append replacing String::Append. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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 | « no previous file | Source/core/dom/CharacterData.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/MediaList.cpp
diff --git a/Source/core/css/MediaList.cpp b/Source/core/css/MediaList.cpp
index 1bc518164f897f3e22ad0bb6a62fd465bc990920..ce9e25841c43d91511c2b09db590566e062b16fe 100644
--- a/Source/core/css/MediaList.cpp
+++ b/Source/core/css/MediaList.cpp
@@ -239,17 +239,17 @@ static void addResolutionWarningMessageToConsole(Document* document, const Strin
DEFINE_STATIC_LOCAL(String, lengthUnitInch, ("inch"));
DEFINE_STATIC_LOCAL(String, lengthUnitCentimeter, ("centimeter"));
- String message;
+ StringBuilder message;
if (value->isDotsPerInch())
- message = String(mediaQueryMessage).replace("%replacementUnits%", mediaValueDPI).replace("%lengthUnit%", lengthUnitInch);
+ message.append(String(mediaQueryMessage).replace("%replacementUnits%", mediaValueDPI).replace("%lengthUnit%", lengthUnitInch));
else if (value->isDotsPerCentimeter())
- message = String(mediaQueryMessage).replace("%replacementUnits%", mediaValueDPCM).replace("%lengthUnit%", lengthUnitCentimeter);
+ message.append(String(mediaQueryMessage).replace("%replacementUnits%", mediaValueDPCM).replace("%lengthUnit%", lengthUnitCentimeter));
else
ASSERT_NOT_REACHED();
message.append(serializedExpression);
- document->addConsoleMessage(CSSMessageSource, DebugMessageLevel, message);
+ document->addConsoleMessage(CSSMessageSource, DebugMessageLevel, message.toString());
}
static inline bool isResolutionMediaFeature(const AtomicString& mediaFeature)
« no previous file with comments | « no previous file | Source/core/dom/CharacterData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698