Changeset 87204 in webkit
- Timestamp:
- May 24, 2011 2:22:27 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r87203 r87204 1 2011-05-24 Ryosuke Niwa <rniwa@webkit.org> 2 3 Reviewed by Darin Adler. 4 5 Undo gets broken in contenteditable area when a text field's value is set by script 6 https://bugs.webkit.org/show_bug.cgi?id=61340 7 8 Added a test to ensure WebKit does not clear undo stack when setting the value of input or textarea. 9 10 * editing/undo/undo-after-setting-value-expected.txt: Added. 11 * editing/undo/undo-after-setting-value.html: Added. 12 1 13 2011-05-24 Adam Klein <adamk@chromium.org> 2 14 -
trunk/Source/WebCore/ChangeLog
r87201 r87204 1 2011-05-24 Ryosuke Niwa <rniwa@webkit.org> 2 3 Reviewed by Darin Adler. 4 5 Undo gets broken in contenteditable area when a text field's value is set by script 6 https://bugs.webkit.org/show_bug.cgi?id=61340 7 8 The bug was caused by RenderTextControl::setInnerTextValue's clearing undo stack by 9 calling clearUndoRedoOperations whenever script sets new value to input or textarea. 10 11 Fixed the bug by removing the offending call to clearUndoRedoOperations. While this call 12 was added by r15565 to fix a crash, SimpleEditCommands have since become much more robust 13 and the test added by r15565 (fast/forms/text-field-setvalue-crash.html) still passes. 14 15 Test: editing/undo/undo-after-setting-value.html 16 17 * rendering/RenderTextControl.cpp: 18 (WebCore::RenderTextControl::setInnerTextValue): 19 1 20 2011-05-24 Dan Bernstein <mitz@apple.com> 2 21 -
trunk/Source/WebCore/rendering/RenderTextControl.cpp
r87152 r87204 148 148 String value = innerTextValue; 149 149 if (value != text() || !innerTextElement()->hasChildNodes()) { 150 if (value != text()) { 151 if (Frame* frame = this->frame()) { 152 frame->editor()->clearUndoRedoOperations(); 153 154 if (AXObjectCache::accessibilityEnabled()) 155 document()->axObjectCache()->postNotification(this, AXObjectCache::AXValueChanged, false); 156 } 157 } 150 if (value != text() && document() && AXObjectCache::accessibilityEnabled()) 151 document()->axObjectCache()->postNotification(this, AXObjectCache::AXValueChanged, false); 158 152 159 153 ExceptionCode ec = 0;
Note: See TracChangeset
for help on using the changeset viewer.