Changeset 55752 in webkit
- Timestamp:
- Mar 9, 2010 3:41:38 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r55748 r55752 1 2010-03-03 Ojan Vafai <ojan@chromium.org> 2 3 Reviewed by Adam Barth. 4 5 undo after smartdelete should select the deleted space 6 https://bugs.webkit.org/show_bug.cgi?id=35713 7 8 * editing/undo/undo-smart-delete-reversed-selection-expected.txt: Added. 9 * editing/undo/undo-smart-delete-reversed-selection.html: Added. 10 * editing/undo/undo-smart-delete-word-expected.txt: Added. 11 * editing/undo/undo-smart-delete-word.html: Added. 12 1 13 2010-03-09 Anton Muhin <antonm@chromium.org> 2 14 -
trunk/WebCore/ChangeLog
r55747 r55752 1 2010-03-03 Ojan Vafai <ojan@chromium.org> 2 3 Reviewed by Adam Barth. 4 5 undo after smartdelete should select the deleted space 6 https://bugs.webkit.org/show_bug.cgi?id=35713 7 8 TextEdit behavior is to select the deleted space after a smartdelete. 9 10 Tests: editing/undo/undo-smart-delete-reversed-selection.html 11 editing/undo/undo-smart-delete-word.html 12 13 * editing/DeleteSelectionCommand.cpp: 14 (WebCore::DeleteSelectionCommand::setStartingSelectionOnSmartDelete): 15 (WebCore::DeleteSelectionCommand::initializePositionData): 16 * editing/DeleteSelectionCommand.h: 17 * editing/VisibleSelection.cpp: 18 (WebCore::VisibleSelection::setWithoutValidation): 19 This assert looks bogus to me. undo-smart-delete-reversed-selection.html hits it 20 but not as a result of the other changes in this patch. The granularity when 21 deleting after making a wordgranularity selection is wordgranularity, not charactergranularity. 22 1 23 2010-03-09 Steve Falkenburg <sfalken@apple.com> 2 24 -
trunk/WebCore/editing/DeleteSelectionCommand.cpp
r53809 r55752 162 162 } 163 163 164 void DeleteSelectionCommand::setStartingSelectionOnSmartDelete(Position& start, Position& end) 165 { 166 VisiblePosition newBase; 167 VisiblePosition newExtent; 168 if (startingSelection().isBaseFirst()) { 169 newBase = start; 170 newExtent = end; 171 } else { 172 newBase = end; 173 newExtent = start; 174 } 175 setStartingSelection(VisibleSelection(newBase, newExtent)); 176 } 177 164 178 void DeleteSelectionCommand::initializePositionData() 165 179 { … … 231 245 m_downstreamStart = pos.downstream(); 232 246 m_leadingWhitespace = m_upstreamStart.leadingWhitespacePosition(visiblePos.affinity()); 247 248 setStartingSelectionOnSmartDelete(m_upstreamStart, m_upstreamEnd); 233 249 } 234 250 … … 242 258 m_downstreamEnd = pos.downstream(); 243 259 m_trailingWhitespace = m_downstreamEnd.trailingWhitespacePosition(VP_DEFAULT_AFFINITY); 260 261 setStartingSelectionOnSmartDelete(m_downstreamStart, m_downstreamEnd); 244 262 } 245 263 } -
trunk/WebCore/editing/DeleteSelectionCommand.h
r43154 r55752 52 52 53 53 void initializeStartEnd(Position&, Position&); 54 void setStartingSelectionOnSmartDelete(Position&, Position&); 54 55 void initializePositionData(); 55 56 void saveTypingStyleState(); -
trunk/WebCore/editing/VisibleSelection.cpp
r52220 r55752 442 442 ASSERT(base != extent); 443 443 ASSERT(m_affinity == DOWNSTREAM); 444 ASSERT(m_granularity == CharacterGranularity);445 444 m_base = base; 446 445 m_extent = extent;
Note: See TracChangeset
for help on using the changeset viewer.