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

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

Issue 2175163004: Add a plain space instead of   between text nodes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix a test fail in Win Created 4 years, 5 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/Source/core/editing/EditingUtilities.cpp ('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 2b3ebd30879ddeb4dced95717d26069075b5666c..1f06a43d829685ddb5229108c049e24ee0464d79 100644
--- a/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
@@ -735,7 +735,8 @@ void CompositeEditCommand::rebalanceWhitespaceOnTextSubstring(Text* textNode, in
// doesn't get all surrounding whitespace, just the whitespace in the
// current text node.
isStartOfParagraph(visibleUpstreamPos) || upstream == 0,
- isEndOfParagraph(visibleDownstreamPos) || (unsigned)downstream == text.length());
+ (isEndOfParagraph(visibleDownstreamPos) || (unsigned)downstream == text.length())
+ && !(textNode->nextSibling() && textNode->nextSibling()->isTextNode()));
if (string != rebalancedString)
replaceTextInNodePreservingMarkers(textNode, upstream, length, rebalancedString);
« no previous file with comments | « third_party/WebKit/Source/core/editing/EditingUtilities.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698