Do not localize numbers in scientific notation
authortkent@chromium.org <tkent@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Feb 2012 09:33:54 +0000 (09:33 +0000)
committertkent@chromium.org <tkent@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Feb 2012 09:33:54 +0000 (09:33 +0000)
commit1499fe57fc38c9aa7e5f38ffa2ebb24e39f5d55c
tree43ef4f2021a73c2dd7f9f709dae14ede76cff220
parent7174117761d4b420dc3f44f8a4586b7392538c02
Do not localize numbers in scientific notation
https://bugs.webkit.org/show_bug.cgi?id=78208

Reviewed by Hajime Morita.

.:

* ManualTests/input-number-localization.html: Updated for scientific notation.

Source/WebCore:

For a preparation of fixing http://wkb.ug/62939, we stop supporting
localized numbers in scientific notation in <input type=number>.

We're going to change number localization processing so that it replaces
letters one by one. It will be very hard to support scientific notation.

* html/NumberInputType.cpp:
(WebCore::isE): A helper functio for String::find() to detect scientific notation.
(WebCore::NumberInputType::visibleValue): Avoid localization for scientific notation.
(WebCore::NumberInputType::convertFromVisibleValue): ditto.
(WebCore::NumberInputType::isAcceptableValue):
Use convertFromVisibleValue, also stop accepting a standard format as a fallback.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@107196 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ChangeLog
ManualTests/input-number-localization.html
Source/WebCore/ChangeLog
Source/WebCore/html/NumberInputType.cpp