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

Unified Diff: Source/core/editing/commands/InsertLineBreakCommand.cpp

Issue 1286993006: Introduce isRenderedCharacter(Position) function (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-19T12:39:43 Created 5 years, 4 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: Source/core/editing/commands/InsertLineBreakCommand.cpp
diff --git a/Source/core/editing/commands/InsertLineBreakCommand.cpp b/Source/core/editing/commands/InsertLineBreakCommand.cpp
index da3d3a21df0d7420f2b2035fdcf5d856122e211c..4539d2996449ce9a809c698429a543ce1665f563 100644
--- a/Source/core/editing/commands/InsertLineBreakCommand.cpp
+++ b/Source/core/editing/commands/InsertLineBreakCommand.cpp
@@ -123,7 +123,9 @@ void InsertLineBreakCommand::doApply()
// Handle whitespace that occurs after the split
document().updateLayoutIgnorePendingStylesheets();
- if (!endingPosition.isRenderedCharacter()) {
+ // TODO(yosin) |isRenderedCharacter()| should be removed, and we should
+ // use |VisiblePosition::characterAfter()|.
+ if (!isRenderedCharacter(endingPosition)) {
Position positionBeforeTextNode(positionInParentBeforeNode(*textNode));
// Clear out all whitespace and insert one non-breaking space
deleteInsignificantTextDownstream(endingPosition);

Powered by Google App Engine
This is Rietveld 408576698