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

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

Issue 2425543003: Ensure clean layout for VisibleSelection::selectionFromContentsOfNode (Closed)
Patch Set: 201610171619 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
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 870c5e892b1d1dd6dc56600d3dd9d7f2ece59f8c..b3b12ac43eb61b64e270f190d3d1071fc1e5d516 100644
--- a/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
@@ -1953,6 +1953,9 @@ Position CompositeEditCommand::positionAvoidingSpecialElementBoundary(
result = Position::inParentAfterNode(*enclosingAnchor);
}
+
+ document().updateStyleAndLayoutIgnorePendingStylesheets();
+
// If visually just before an anchor, insert *outside* the anchor unless
// it's the first VisiblePosition in a paragraph, to match NSTextView.
if (visiblePos.deepEquivalent() == firstInAnchor.deepEquivalent()) {

Powered by Google App Engine
This is Rietveld 408576698