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()) && |