Changeset 25188 in webkit
- Timestamp:
- Aug 22, 2007 1:10:40 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r25186 r25188 1 2007-08-22 Kevin McCullough <kmccullough@apple.com> 2 3 Reviewed by Adele. 4 5 - rdar:5423067 Reapplying the change but only when the text area is in focus. 6 7 * fast/forms/cursor-position-expected.txt: 8 * fast/forms/cursor-position.html: 9 1 10 2007-08-22 Kevin McCullough <kmccullough@apple.com> 2 11 -
trunk/LayoutTests/fast/forms/cursor-position-expected.txt
r25186 r25188 1 This test sets a non-standard line endings, sets selection, then sets a standard line ending string, and checks selection.1 This test used to check that the selection start was the same before and after a change to the contents of a textarea. 2 2 3 If this test succeeded, you should see 2 lines saying "10, 10" below. 3 However now, in order to match the behavior of the other major browsers, selection is moved to the end of the text value when a change occurs to the contents of a text area. 4 5 Because this would invalidate the previous test, and that the previous test now perfectly shows the new behavior, we repurposed it. 4 6 5 7 6 10, 10 7 10, 10 8 rdar://problem/5423067 gmail is super annoying when trying to add a new name to the TO, CC or BCC fields 8 9 10 11 25, 25 12 24, 24 13 -
trunk/LayoutTests/fast/forms/cursor-position.html
r25186 r25188 13 13 layoutTestController.dumpAsText(); 14 14 } 15 15 16 var elt = document.getElementById("text"); 16 17 txt = "this is\ra test\rof cursor"; … … 36 37 </head> 37 38 <body onload="test();"> 38 <p>This test sets a non-standard line endings, sets selection, then sets a standard line ending string, and checks selection.</p> 39 <p>If this test succeeded, you should see 2 lines saying "10, 10" below.</p> 39 <p>This test used to check that the selection start was the same before and after a change to the contents of a textarea.</p> 40 <p>However now, in order to match the behavior of the other major browsers, selection is moved to the end of the text value when a change occurs to the contents of a text area.</p> 41 <p>Because this would invalidate the previous test, and that the previous test now perfectly shows the new behavior, we repurposed it.</p> 42 <br /> 43 <p>rdar://problem/5423067 gmail is super annoying when trying to add a new name to the TO, CC or BCC fields</p> 40 44 <hr /> 41 45 <form> -
trunk/WebCore/ChangeLog
r25187 r25188 1 2007-08-22 Kevin McCullough <kmccullough@apple.com> 2 3 Reviewed by Adele. 4 5 - rdar:5423067 Reapplyingthe change but only when the text area is in focus. 6 7 * html/HTMLTextAreaElement.cpp: 8 (WebCore::HTMLTextAreaElement::setValue): 9 1 10 2007-08-21 David Hyatt <hyatt@apple.com> 2 11 -
trunk/WebCore/html/HTMLTextAreaElement.cpp
r25186 r25188 253 253 if (renderer()) 254 254 renderer()->updateFromElement(); 255 256 // Restore a caret at the starting point of the old selection. 257 // This matches Safari 2.0 behavior. 258 if (document()->focusedNode() == this && cachedSelStart != -1) { 259 ASSERT(cachedSelEnd != -1); 260 setSelectionRange(cachedSelStart, cachedSelStart); 255 256 // Set the caret to the end of the text value. 257 if (document()->focusedNode() == this) { 258 unsigned endOfString = m_value.length(); 259 setSelectionRange(endOfString, endOfString); 261 260 } 261 262 262 setChanged(); 263 263 }
Note: See TracChangeset
for help on using the changeset viewer.