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

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

Issue 544083002: Avoid allocating temporary ranges in connection with text and character iterators. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address review comments. Created 6 years, 3 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/dom/DocumentMarkerController.cpp ('k') | Source/core/editing/SpellChecker.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/PlainTextRange.cpp
diff --git a/Source/core/editing/PlainTextRange.cpp b/Source/core/editing/PlainTextRange.cpp
index 986799b8d47d5d01c8aacb92d14991c471168388..736e500df8fd9b0c5f671580b309f27b49798fcd 100644
--- a/Source/core/editing/PlainTextRange.cpp
+++ b/Source/core/editing/PlainTextRange.cpp
@@ -85,11 +85,8 @@ PassRefPtrWillBeRawPtr<Range> PlainTextRange::createRangeFor(const ContainerNode
// FIXME: the atEnd() check shouldn't be necessary, workaround for <http://bugs.webkit.org/show_bug.cgi?id=6289>.
if (!start() && !length() && it.atEnd()) {
- textRunRange = it.range();
-
- resultRange->setStart(textRunRange->startContainer(), 0, ASSERT_NO_EXCEPTION);
- resultRange->setEnd(textRunRange->startContainer(), 0, ASSERT_NO_EXCEPTION);
-
+ resultRange->setStart(it.startContainer(), 0, ASSERT_NO_EXCEPTION);
+ resultRange->setEnd(it.startContainer(), 0, ASSERT_NO_EXCEPTION);
return resultRange.release();
}
« no previous file with comments | « Source/core/dom/DocumentMarkerController.cpp ('k') | Source/core/editing/SpellChecker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698