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

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

Issue 1412713003: Reland 'Use FrameSelection::selectedText where possible.' Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use SelectionEditor::setWithoutValidation. Created 5 years, 2 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/FrameSelection.cpp
diff --git a/third_party/WebKit/Source/core/editing/FrameSelection.cpp b/third_party/WebKit/Source/core/editing/FrameSelection.cpp
index 12020051c2364d2ad6ab5f0d3b508efe0b0f7bda..f270e07ad70fd8241d85a1227462a03469cdc269 100644
--- a/third_party/WebKit/Source/core/editing/FrameSelection.cpp
+++ b/third_party/WebKit/Source/core/editing/FrameSelection.cpp
@@ -857,6 +857,12 @@ void FrameSelection::selectAll()
notifyLayoutObjectOfSelectionChange(UserTriggered);
}
+void FrameSelection::setSelectionInTextFormControl(const VisibleSelection& selection, SetSelectionOptions options)
+{
+ setSelection(selection, options);
yosin_UTC9 2015/10/29 06:44:48 FrameSelection::setSelection() and SelectionEditor
+ m_selectionEditor->setWithoutValidation(selection.base(), selection.extent());
+}
+
bool FrameSelection::setSelectedRange(Range* range, TextAffinity affinity, SelectionDirectionalMode directional, SetSelectionOptions options)
{
if (!range || !range->startContainer() || !range->endContainer())
@@ -1143,9 +1149,9 @@ String FrameSelection::selectedHTMLForClipboard() const
return extractSelectedHTMLAlgorithm<EditingInComposedTreeStrategy>(*this);
}
-String FrameSelection::selectedText() const
+String FrameSelection::selectedText(TextIteratorBehavior behavior) const
{
- return extractSelectedText(*this, TextIteratorDefaultBehavior);
+ return extractSelectedText(*this, behavior);
}
String FrameSelection::selectedTextForClipboard() const
« no previous file with comments | « third_party/WebKit/Source/core/editing/FrameSelection.h ('k') | third_party/WebKit/Source/core/editing/VisibleSelection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698