| 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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 if (editingState->isAborted()) | 352 if (editingState->isAborted()) |
| 353 return; | 353 return; |
| 354 | 354 |
| 355 // outdentParagraph could move more than one paragraph if the paragraph | 355 // outdentParagraph could move more than one paragraph if the paragraph |
| 356 // is in a list item. As a result, endAfterSelection and endOfNextParagraph | 356 // is in a list item. As a result, endAfterSelection and endOfNextParagraph |
| 357 // could refer to positions no longer in the document. | 357 // could refer to positions no longer in the document. |
| 358 if (endAfterSelection.isNotNull() && !endAfterSelection.isConnected()) | 358 if (endAfterSelection.isNotNull() && !endAfterSelection.isConnected()) |
| 359 break; | 359 break; |
| 360 | 360 |
| 361 document().updateStyleAndLayoutIgnorePendingStylesheets(); | 361 document().updateStyleAndLayoutIgnorePendingStylesheets(); |
| 362 if (endOfNextParagraph.isNotNull() && | 362 if (endOfNextParagraph.isNotNull() && !endOfNextParagraph.isConnected()) { |
| 363 !endOfNextParagraph.position().isConnected()) { | |
| 364 endOfCurrentParagraph = createVisiblePosition(endingSelection().end()); | 363 endOfCurrentParagraph = createVisiblePosition(endingSelection().end()); |
| 365 endOfNextParagraph = endOfParagraph(nextPositionOf(endOfCurrentParagraph)) | 364 endOfNextParagraph = endOfParagraph(nextPositionOf(endOfCurrentParagraph)) |
| 366 .toPositionWithAffinity(); | 365 .toPositionWithAffinity(); |
| 367 } | 366 } |
| 368 endOfCurrentParagraph = createVisiblePosition(endOfNextParagraph); | 367 endOfCurrentParagraph = createVisiblePosition(endOfNextParagraph); |
| 369 } | 368 } |
| 370 } | 369 } |
| 371 | 370 |
| 372 void IndentOutdentCommand::formatSelection( | 371 void IndentOutdentCommand::formatSelection( |
| 373 const VisiblePosition& startOfSelection, | 372 const VisiblePosition& startOfSelection, |
| (...skipping 20 matching lines...) Expand all Loading... |
| 394 else | 393 else |
| 395 indentIntoBlockquote(start, end, blockquoteForNextIndent, editingState); | 394 indentIntoBlockquote(start, end, blockquoteForNextIndent, editingState); |
| 396 } | 395 } |
| 397 | 396 |
| 398 InputEvent::InputType IndentOutdentCommand::inputType() const { | 397 InputEvent::InputType IndentOutdentCommand::inputType() const { |
| 399 return m_typeOfAction == Indent ? InputEvent::InputType::Indent | 398 return m_typeOfAction == Indent ? InputEvent::InputType::Indent |
| 400 : InputEvent::InputType::Outdent; | 399 : InputEvent::InputType::Outdent; |
| 401 } | 400 } |
| 402 | 401 |
| 403 } // namespace blink | 402 } // namespace blink |
| OLD | NEW |