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

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

Issue 285643006: Kill WTF::DecimalNumber class (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Inline single-line function Created 6 years, 7 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/CSSPrimitiveValue.cpp ('k') | Source/core/css/MediaQuerySetTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/MediaQueryExp.cpp
diff --git a/Source/core/css/MediaQueryExp.cpp b/Source/core/css/MediaQueryExp.cpp
index 334f596c71250a0221b189ac7d67abbfdb1b9154..89a08d09cb7397d1cb4613fb203e6e36073d12ee 100644
--- a/Source/core/css/MediaQueryExp.cpp
+++ b/Source/core/css/MediaQueryExp.cpp
@@ -34,7 +34,7 @@
#include "core/css/CSSParserValues.h"
#include "core/css/CSSPrimitiveValue.h"
#include "core/html/parser/HTMLParserIdioms.h"
-#include "wtf/DecimalNumber.h"
+#include "platform/Decimal.h"
#include "wtf/text/StringBuffer.h"
#include "wtf/text/StringBuilder.h"
@@ -298,12 +298,9 @@ String MediaQueryExp::serialize() const
return result.toString();
}
-static String printNumber(double number)
+static inline String printNumber(double number)
{
- DecimalNumber decimal(number);
- StringBuffer<LChar> buffer(decimal.bufferLengthForStringDecimal());
- decimal.toStringDecimal(buffer.characters(), buffer.length());
- return String::adopt(buffer);
+ return Decimal::fromDouble(number).toString();
}
String MediaQueryExpValue::cssText() const
« no previous file with comments | « Source/core/css/CSSPrimitiveValue.cpp ('k') | Source/core/css/MediaQuerySetTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698