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

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

Issue 2684973005: Check if the next text node has a leading white space (Closed)
Patch Set: add test case Created 3 years, 10 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 | « third_party/WebKit/LayoutTests/editing/inserting/insert-space.html ('k') | 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 af6c1ccb216cf50e0383e7f1a008ac30903ad383..c9d245114588a09065e5d4913f9fb2fff3045f9a 100644
--- a/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
@@ -763,7 +763,7 @@ void CompositeEditCommand::rebalanceWhitespaceOnTextSubstring(Text* textNode,
const bool nextSiblingIsTextNode =
textNode->nextSibling() && textNode->nextSibling()->isTextNode() &&
toText(textNode->nextSibling())->data().length() &&
- toText(textNode->nextSibling())->data()[0] != ' ';
+ !isWhitespace(toText(textNode->nextSibling())->data()[0]);
const bool shouldEmitNBSPbeforeEnd =
(isEndOfParagraph(visibleDownstreamPos) ||
(unsigned)downstream == text.length()) &&
« no previous file with comments | « third_party/WebKit/LayoutTests/editing/inserting/insert-space.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698