Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(466)

Unified Diff: third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp

Issue 2410513003: Update layout in CompositeEditCommand::moveParagraphs for TextIterator::rangeLength (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698