| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 outdentParagraph(editingState); | 243 outdentParagraph(editingState); |
| 244 return; | 244 return; |
| 245 } | 245 } |
| 246 | 246 |
| 247 Position originalSelectionEnd = endingSelection().end(); | 247 Position originalSelectionEnd = endingSelection().end(); |
| 248 VisiblePosition endAfterSelection = endOfParagraphDeprecated(nextPositionOf(
endOfLastParagraph)); | 248 VisiblePosition endAfterSelection = endOfParagraphDeprecated(nextPositionOf(
endOfLastParagraph)); |
| 249 | 249 |
| 250 while (endOfCurrentParagraph.deepEquivalent() != endAfterSelection.deepEquiv
alent()) { | 250 while (endOfCurrentParagraph.deepEquivalent() != endAfterSelection.deepEquiv
alent()) { |
| 251 VisiblePosition endOfNextParagraph = endOfParagraphDeprecated(nextPositi
onOfDeprecated(endOfCurrentParagraph)); | 251 VisiblePosition endOfNextParagraph = endOfParagraphDeprecated(nextPositi
onOfDeprecated(endOfCurrentParagraph)); |
| 252 if (endOfCurrentParagraph.deepEquivalent() == endOfLastParagraph.deepEqu
ivalent()) | 252 if (endOfCurrentParagraph.deepEquivalent() == endOfLastParagraph.deepEqu
ivalent()) |
| 253 setEndingSelection(VisibleSelection(originalSelectionEnd, TextAffini
ty::Downstream)); | 253 setEndingSelection(createVisibleSelectionDeprecated(originalSelectio
nEnd, TextAffinity::Downstream)); |
| 254 else | 254 else |
| 255 setEndingSelection(endOfCurrentParagraph); | 255 setEndingSelection(endOfCurrentParagraph); |
| 256 | 256 |
| 257 outdentParagraph(editingState); | 257 outdentParagraph(editingState); |
| 258 if (editingState->isAborted()) | 258 if (editingState->isAborted()) |
| 259 return; | 259 return; |
| 260 | 260 |
| 261 // outdentParagraph could move more than one paragraph if the paragraph | 261 // outdentParagraph could move more than one paragraph if the paragraph |
| 262 // is in a list item. As a result, endAfterSelection and endOfNextParagr
aph | 262 // is in a list item. As a result, endAfterSelection and endOfNextParagr
aph |
| 263 // could refer to positions no longer in the document. | 263 // could refer to positions no longer in the document. |
| (...skipping 26 matching lines...) Expand all Loading... |
| 290 else | 290 else |
| 291 indentIntoBlockquote(start, end, blockquoteForNextIndent, editingState); | 291 indentIntoBlockquote(start, end, blockquoteForNextIndent, editingState); |
| 292 } | 292 } |
| 293 | 293 |
| 294 InputEvent::InputType IndentOutdentCommand::inputType() const | 294 InputEvent::InputType IndentOutdentCommand::inputType() const |
| 295 { | 295 { |
| 296 return m_typeOfAction == Indent ? InputEvent::InputType::Indent : InputEvent
::InputType::Outdent; | 296 return m_typeOfAction == Indent ? InputEvent::InputType::Indent : InputEvent
::InputType::Outdent; |
| 297 } | 297 } |
| 298 | 298 |
| 299 } // namespace blink | 299 } // namespace blink |
| OLD | NEW |