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

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

Issue 2628693003: Update layout for mostForward/BackwardCaretPosition in editing/commands (Closed)
Patch Set: Created 3 years, 11 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 244af9b18523595cd0f673b34e8687372f453327..4b7a190bcc8f4fcd7cfb16c21e2298fc69e0996f 100644
--- a/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
@@ -1972,6 +1972,9 @@ Position CompositeEditCommand::positionAvoidingSpecialElementBoundary(
if (!enclosingAnchor)
return original;
}
+
+ document().updateStyleAndLayoutIgnorePendingStylesheets();
yosin_UTC9 2017/01/12 04:52:26 Could you add following comment as same as others:
Xiaocheng 2017/01/12 07:39:43 We don't use to put this notes in editing/commands
yosin_UTC9 2017/01/12 09:39:55 Talk offline. We don't need to have a comment ment
+
// Don't insert outside an anchor if doing so would skip over a line
// break. It would probably be safe to move the line break so that we
// could still avoid the anchor here.
@@ -1984,8 +1987,6 @@ 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