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

Unified Diff: Source/platform/graphics/Color.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/platform/JSONValues.cpp ('k') | Source/wtf/DecimalNumber.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/Color.cpp
diff --git a/Source/platform/graphics/Color.cpp b/Source/platform/graphics/Color.cpp
index 938e12cced410985b6be9c820ac5fb701b47fa33..3c0b7429750012fd7d9ff5b98a511972a5c3900d 100644
--- a/Source/platform/graphics/Color.cpp
+++ b/Source/platform/graphics/Color.cpp
@@ -26,10 +26,11 @@
#include "config.h"
#include "platform/graphics/Color.h"
+#include "platform/Decimal.h"
#include "wtf/Assertions.h"
-#include "wtf/DecimalNumber.h"
#include "wtf/HexNumber.h"
#include "wtf/MathExtras.h"
+#include "wtf/dtoa.h"
#include "wtf/text/StringBuilder.h"
using namespace std;
@@ -243,9 +244,7 @@ String Color::serialized() const
if (!alpha())
result.append('0');
else {
- NumberToLStringBuffer buffer;
- unsigned length = DecimalNumber(alpha() / 255.0).toStringDecimal(buffer, WTF::NumberToStringBufferLength);
- result.append(buffer, length);
+ result.append(Decimal::fromDouble(alpha() / 255.0).toString());
}
result.append(')');
« no previous file with comments | « Source/platform/JSONValues.cpp ('k') | Source/wtf/DecimalNumber.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698