Changeset 86926 in webkit


Ignore:
Timestamp:
May 19, 2011 11:37:01 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-05-19 Naoki Takano <takano.naoki@gmail.com>

Reviewed by Kent Tamura.

Fix a problem that updating HTMLInputElement::value sets the cursor to a wrong position.
https://bugs.webkit.org/show_bug.cgi?id=61163

Manual test input-number-localization.html.
Because we can't assume any number formats in various WebKit ports.

  • html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setValue): The cursor must be the last position of visibleValue(), not m_value.
  • manual-tests/input-number-localization.html: Added manual test to check the cursor correctly moved to the last poisition of the input.
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r86924 r86926  
     12011-05-19  Naoki Takano  <takano.naoki@gmail.com>
     2
     3        Reviewed by Kent Tamura.
     4
     5        Fix a problem that updating HTMLInputElement::value sets the cursor to a wrong position.
     6        https://bugs.webkit.org/show_bug.cgi?id=61163
     7
     8        Manual test input-number-localization.html.
     9        Because we can't assume any number formats in various WebKit ports.
     10
     11        * html/HTMLInputElement.cpp:
     12        (WebCore::HTMLInputElement::setValue): The cursor must be the last position of visibleValue(), not m_value.
     13        * manual-tests/input-number-localization.html: Added manual test to check the cursor correctly moved to the last poisition of the input.
     14
    1152011-05-19  Jer Noble  <jer.noble@apple.com>
    216
  • trunk/Source/WebCore/html/HTMLInputElement.cpp

    r86832 r86926  
    944944
    945945    if (isTextField()) {
    946         unsigned max = m_value.length();
     946        unsigned max = visibleValue().length();
    947947        if (document()->focusedNode() == this)
    948948            WebCore::setSelectionRange(this, max, max);
  • trunk/Source/WebCore/manual-tests/input-number-localization.html

    r81649 r86926  
    2222<div>Standard format: <output id=output></output></div>
    2323
     24<p>Input test: Type the number text "1234" into the the followin number field.
     25The number string will be "1,234" and the cursor position must be the last position.
     26</p>
     27<div><input type="number" onkeyup="this.value=this.value" /></div>
     28
    2429<script>
    2530function handleInput() {
Note: See TracChangeset for help on using the changeset viewer.