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

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

Issue 1377963004: Use FrameSelection::selectedText where possible. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Check whether selection is range. Created 5 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
Index: third_party/WebKit/Source/core/editing/DOMSelection.cpp
diff --git a/third_party/WebKit/Source/core/editing/DOMSelection.cpp b/third_party/WebKit/Source/core/editing/DOMSelection.cpp
index cdf2139e15e666ddb5e024e5484200cc124a96b3..35883c5bd6abb88ad114662e9bf7fd1d05eed359 100644
--- a/third_party/WebKit/Source/core/editing/DOMSelection.cpp
+++ b/third_party/WebKit/Source/core/editing/DOMSelection.cpp
@@ -513,8 +513,7 @@ String DOMSelection::toString()
if (!m_frame)
return String();
- const EphemeralRange range = m_frame->selection().selection().toNormalizedEphemeralRange();
- return plainText(range, TextIteratorForSelectionToString);
+ return m_frame->selection().selectedText(TextIteratorForSelectionToString);
}
Node* DOMSelection::shadowAdjustedNode(const Position& position) const

Powered by Google App Engine
This is Rietveld 408576698