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

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

Issue 576073003: Removal of more temporary Range objects. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix build; accidentally removed .get() call 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/editing/CompositeEditCommand.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/DOMSelection.cpp
diff --git a/Source/core/editing/DOMSelection.cpp b/Source/core/editing/DOMSelection.cpp
index d4eaa607884304371ecd154f480bf656ea4e36e6..b05ba0ffcd36d2cf05b771bf00a9503465c06d1b 100644
--- a/Source/core/editing/DOMSelection.cpp
+++ b/Source/core/editing/DOMSelection.cpp
@@ -505,7 +505,10 @@ String DOMSelection::toString()
if (!m_frame)
return String();
- return plainText(m_frame->selection().selection().toNormalizedRange().get());
+ Position start, end;
+ if (m_frame->selection().selection().toNormalizedPositions(start, end))
+ return plainText(start, end);
+ return emptyString();
}
Node* DOMSelection::shadowAdjustedNode(const Position& position) const
« no previous file with comments | « Source/core/editing/CompositeEditCommand.cpp ('k') | Source/core/editing/SpellChecker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698