Conversion from localized numbers to HTML numbers should accept not only localized numbers but also HTML numbers
https://bugs.webkit.org/show_bug.cgi?id=109160

Reviewed by Kentaro Hara.

Source/WebCore:

For example, A French user needs to specify a number to a number input
field. He might use a local decimal point, like 3,141592, or he might
use the standard decimal point like 3.141592. We had better accept both
of them.

We accepted both last year, but we changed the behavior so that we
accept only localized numbers because we had some cases where an input
string can be recognized as both of a localized number and the standard
number. e.g. 3.141 is 3141 in French locale and 3.141 in the
standard. Now we introduce a simple rule that we don't accept group
separator at all. So users won't confuse even if we accept both of
decimal points.

Test: fast/forms/number/number-l10n-input.html

* platform/text/PlatformLocale.cpp:
(WebCore::Locale::convertFromLocalizedNumber):
If the specified string contains invalid characters including group
separators, just return the specified string.

LayoutTests:

* fast/forms/number/number-l10n-input-expected.txt: Added.
* fast/forms/number/number-l10n-input.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142122 268f45cc-cd09-0410-ab3c-d52691b4dbfc