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

Unified Diff: Source/core/editing/commands/InsertParagraphSeparatorCommand.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
« no previous file with comments | « Source/core/editing/commands/InsertLineBreakCommand.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/commands/InsertParagraphSeparatorCommand.cpp
diff --git a/Source/core/editing/commands/InsertParagraphSeparatorCommand.cpp b/Source/core/editing/commands/InsertParagraphSeparatorCommand.cpp
index d914179bc8615d06365059870b9678122542cc98..4032caa787348beb8f575961b56112db753f929b 100644
--- a/Source/core/editing/commands/InsertParagraphSeparatorCommand.cpp
+++ b/Source/core/editing/commands/InsertParagraphSeparatorCommand.cpp
@@ -417,7 +417,9 @@ void InsertParagraphSeparatorCommand::doApply()
// Handle whitespace that occurs after the split
if (positionAfterSplit.isNotNull()) {
document().updateLayoutIgnorePendingStylesheets();
- if (!positionAfterSplit.isRenderedCharacter()) {
+ // TODO(yosin) |isRenderedCharacter()| should be removed, and we should
+ // use |VisiblePosition::characterAfter()|.
+ if (!isRenderedCharacter(positionAfterSplit)) {
// Clear out all whitespace and insert one non-breaking space
ASSERT(!positionAfterSplit.computeContainerNode()->layoutObject() || positionAfterSplit.computeContainerNode()->layoutObject()->style()->collapseWhiteSpace());
deleteInsignificantTextDownstream(positionAfterSplit);
« no previous file with comments | « Source/core/editing/commands/InsertLineBreakCommand.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698