Source/WebCore: Add String::numberToFixedPrecisionString()
authorparoga@webkit.org <paroga@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Sep 2012 21:03:56 +0000 (21:03 +0000)
committerparoga@webkit.org <paroga@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Sep 2012 21:03:56 +0000 (21:03 +0000)
commit7506e9ee3606542a49fabfad57bffe9f644d3df6
treeff5373a5c872d50571aeabcf0424f5098f9cdf56
parent0c490c1ff15bc4bc16280ed9130b8933a99ea232
Source/WebCore: Add String::numberToFixedPrecisionString()
https://bugs.webkit.org/show_bug.cgi?id=96330

Reviewed by Benjamin Poulain.

* platform/text/TextStream.cpp:
(WebCore::TextStream::operator<<): Use the new function instead of String::number() with flags.

Source/WebKit2: Add String::numberToStringFixedWidth()
https://bugs.webkit.org/show_bug.cgi?id=96330

Reviewed by Benjamin Poulain.

* win/WebKit2.def:
* win/WebKit2CFLite.def:

Source/WTF: Add String::numberToStringFixedWidth()
https://bugs.webkit.org/show_bug.cgi?id=96330

Reviewed by Benjamin Poulain.

Add this new function as replacement for the ShouldRoundDecimalPlaces flag of String::number()
and remove the now unnecessary branch in String::number() for the old flags.

* wtf/text/WTFString.cpp:
(WTF::String::number):
(WTF::String::numberToStringFixedWidth):
* wtf/text/WTFString.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@129165 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WTF/ChangeLog
Source/WTF/wtf/text/WTFString.cpp
Source/WTF/wtf/text/WTFString.h
Source/WebCore/ChangeLog
Source/WebCore/platform/text/TextStream.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/win/WebKit2.def
Source/WebKit2/win/WebKit2CFLite.def