Changeset 128008 in webkit
- Timestamp:
- Sep 9, 2012 5:45:58 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r128006 r128008 1 2012-09-09 Patrick Gansterer <paroga@webkit.org> 2 3 Replace WTF::numberToString() with String::numberToStringECMAScript() 4 https://bugs.webkit.org/show_bug.cgi?id=96130 5 6 Reviewed by Benjamin Poulain. 7 8 The String class provides a nice wrapper for this function 9 in the meantime, so just use it to avoid code duplication. 10 11 * html/parser/HTMLParserIdioms.cpp: 12 (WebCore::serializeForNumberType): 13 * platform/Decimal.cpp: 14 (WebCore::Decimal::fromDouble): 15 1 16 2012-09-09 Emil A Eklund <eae@chromium.org> 2 17 -
trunk/Source/WebCore/html/parser/HTMLParserIdioms.cpp
r124998 r128008 29 29 #include <limits> 30 30 #include <wtf/MathExtras.h> 31 #include <wtf/dtoa.h>32 31 #include <wtf/text/AtomicString.h> 33 32 #include <wtf/text/StringBuilder.h> … … 88 87 // According to HTML5, "the best representation of the number n as a floating 89 88 // point number" is a string produced by applying ToString() to n. 90 NumberToStringBuffer buffer; 91 return String(numberToString(number, buffer)); 89 return String::numberToStringECMAScript(number); 92 90 } 93 91 -
trunk/Source/WebCore/platform/Decimal.cpp
r122928 r128008 38 38 #include <wtf/MathExtras.h> 39 39 #include <wtf/Noncopyable.h> 40 #include <wtf/dtoa.h>41 40 #include <wtf/text/StringBuilder.h> 42 41 … … 682 681 Decimal Decimal::fromDouble(double doubleValue) 683 682 { 684 if (isfinite(doubleValue)) { 685 NumberToStringBuffer buffer; 686 return fromString(numberToString(doubleValue, buffer)); 687 } 683 if (isfinite(doubleValue)) 684 return fromString(String::numberToStringECMAScript(doubleValue)); 688 685 689 686 if (isinf(doubleValue))
Note: See TracChangeset
for help on using the changeset viewer.