| Index: third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp b/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
|
| index cccd76bdb4c065c70d8a1c58622a1df747e35f1e..2fbed19343f414d28a0291b4e908133f4e3e9581 100644
|
| --- a/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
|
| @@ -1629,10 +1629,11 @@ void CompositeEditCommand::moveParagraphs(
|
| beforeParagraph.deepEquivalent(), editingState);
|
| if (editingState->isAborted())
|
| return;
|
| - // Need an updateLayout here in case inserting the br has split a text node.
|
| - document().updateStyleAndLayoutIgnorePendingStylesheets();
|
| }
|
|
|
| + // TextIterator::rangeLength requires clean layout.
|
| + document().updateStyleAndLayoutIgnorePendingStylesheets();
|
| +
|
| destinationIndex = TextIterator::rangeLength(
|
| Position::firstPositionInNode(document().documentElement()),
|
| destination.toParentAnchoredPosition(), true);
|
|
|