Changeset 96628 in webkit
- Timestamp:
- Oct 4, 2011, 12:02:44 PM (14 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r96626 r96628 1 2011-10-04 Ryosuke Niwa <rniwa@webkit.org> 2 3 REGRESSION(r94274): setting input.value erroneously triggers focus event 4 https://bugs.webkit.org/show_bug.cgi?id=69315 5 6 Reviewed by Kent Tamura. 7 8 Fixed the bug by adding a new flag to setSelection to avoid calling setFocusedNodeIfNeeded 9 when called by nodeWillBeRemoved and textWillBeReplaced. 10 11 Added a manual test. Unfortunately, the test always passes in DRT. 12 13 * editing/FrameSelection.cpp: 14 (WebCore::FrameSelection::setSelection): 15 (WebCore::FrameSelection::respondToNodeModification): 16 (WebCore::FrameSelection::textWillBeReplaced): 17 * editing/FrameSelection.h: 18 * manual-tests/mutate-unfocused-text-with-selection.html: Added. 19 1 20 2011-10-04 Young Han Lee <joybro201@gmail.com> 2 21 -
trunk/Source/WebCore/editing/FrameSelection.cpp
r96257 r96628 275 275 setCaretRectNeedsUpdate(); 276 276 277 if (!s.isNone() )277 if (!s.isNone() && !(options & DoNotSetFocus)) 278 278 setFocusedNodeIfNeeded(); 279 279 … … 394 394 395 395 if (clearDOMTreeSelection) 396 setSelection(VisibleSelection(), 0);396 setSelection(VisibleSelection(), DoNotSetFocus); 397 397 } 398 398 … … 434 434 newSelection.setWithoutValidation(base, extent); 435 435 m_frame->document()->updateLayout(); 436 setSelection(newSelection, 0);436 setSelection(newSelection, DoNotSetFocus); 437 437 } 438 438 } -
trunk/Source/WebCore/editing/FrameSelection.h
r95964 r96628 116 116 ClearTypingStyle = 1 << 2, 117 117 SpellCorrectionTriggered = 1 << 3, 118 DoNotSetFocus = 1 << 4, 118 119 }; 119 120 typedef unsigned SetSelectionOptions; // Union of values in SetSelectionOption and EUserTriggered
Note:
See TracChangeset
for help on using the changeset viewer.