Skip to content
  • tkent@chromium.org's avatar
    Do not localize numbers in scientific notation · 08aa5432
    tkent@chromium.org authored
    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: http://svn.webkit.org/repository/webkit/trunk@107196 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    08aa5432