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

Unified Diff: Source/core/editing/markup.cpp

Issue 165083002: Issue 318925: Copy and paste sometimes removes spaces between words (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Issue 318925: Copy and paste sometimes removes spaces between words Created 6 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 | « Source/core/editing/TextIterator.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/markup.cpp
diff --git a/Source/core/editing/markup.cpp b/Source/core/editing/markup.cpp
index ce7484641725632a31205dbabf8cb6e86c49a584..3e575fb6a9e27cdd0ca33d068cecaa23d7c2f445 100644
--- a/Source/core/editing/markup.cpp
+++ b/Source/core/editing/markup.cpp
@@ -248,14 +248,17 @@ String StyledMarkupAccumulator::renderedText(Node& node, const Range* range)
unsigned startOffset = 0;
unsigned endOffset = textNode.length();
+ TextIteratorBehavior behavior = TextIteratorDefaultBehavior;
tyoshino (SeeGerritForStatus) 2014/02/17 09:20:51 Move to right above L254?
if (range && node == range->startContainer())
startOffset = range->startOffset();
tyoshino (SeeGerritForStatus) 2014/02/17 09:20:51 have one blank line here?
if (range && node == range->endContainer())
endOffset = range->endOffset();
+ else if (range)
+ behavior = TextIteratorBehavesAsIfNodesFollowing;
tyoshino (SeeGerritForStatus) 2014/02/17 09:20:51 let's factor out |range| checking into outer if-cl
Position start = createLegacyEditingPosition(&node, startOffset);
Position end = createLegacyEditingPosition(&node, endOffset);
- return plainText(Range::create(node.document(), start, end).get());
+ return plainText(Range::create(node.document(), start, end).get(), behavior);
}
String StyledMarkupAccumulator::stringValueForRange(const Node& node, const Range* range)
« no previous file with comments | « Source/core/editing/TextIterator.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698