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) |