| Index: third_party/WebKit/Source/core/editing/commands/IndentOutdentCommand.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/commands/IndentOutdentCommand.cpp b/third_party/WebKit/Source/core/editing/commands/IndentOutdentCommand.cpp
|
| index 207ede9981a024acec661a57f0a944762b9f96c4..c2fd4ca90b4d36b105dfd6d46ce602051769c8dc 100644
|
| --- a/third_party/WebKit/Source/core/editing/commands/IndentOutdentCommand.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/commands/IndentOutdentCommand.cpp
|
| @@ -295,6 +295,8 @@ void IndentOutdentCommand::outdentParagraph(EditingState* editingState) {
|
| createVisiblePosition(visibleEndOfParagraph.toPositionWithAffinity());
|
| }
|
|
|
| + // TODO(xiaochengh): We should not store a VisiblePosition and later inspect
|
| + // its properties when it is already invalidated.
|
| VisiblePosition startOfParagraphToMove =
|
| startOfParagraph(visibleStartOfParagraph);
|
| VisiblePosition endOfParagraphToMove = endOfParagraph(visibleEndOfParagraph);
|
| @@ -306,6 +308,10 @@ void IndentOutdentCommand::outdentParagraph(EditingState* editingState) {
|
| return;
|
|
|
| document().updateStyleAndLayoutIgnorePendingStylesheets();
|
| + startOfParagraphToMove =
|
| + createVisiblePosition(startOfParagraphToMove.toPositionWithAffinity());
|
| + endOfParagraphToMove =
|
| + createVisiblePosition(endOfParagraphToMove.toPositionWithAffinity());
|
| moveParagraph(startOfParagraphToMove, endOfParagraphToMove,
|
| VisiblePosition::beforeNode(placeholder), editingState,
|
| PreserveSelection);
|
|
|