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

Unified Diff: third_party/WebKit/Source/core/clipboard/DataTransfer.cpp

Issue 1427733003: Use |FrameSelection::selectedText()| where possible. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/FrameSelection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/clipboard/DataTransfer.cpp
diff --git a/third_party/WebKit/Source/core/clipboard/DataTransfer.cpp b/third_party/WebKit/Source/core/clipboard/DataTransfer.cpp
index 5c9077f6560d8db85602e75bc62f89542e6b70a7..3a04c4fd7db259741b365fce0d89b57ac18ff1f2 100644
--- a/third_party/WebKit/Source/core/clipboard/DataTransfer.cpp
+++ b/third_party/WebKit/Source/core/clipboard/DataTransfer.cpp
@@ -357,9 +357,7 @@ void DataTransfer::writeSelection(const FrameSelection& selection)
return;
if (!enclosingTextFormControl(selection.start())) {
- EphemeralRange selectedRange = selection.selection().toNormalizedEphemeralRange();
- ASSERT(selectedRange.isNotNull());
- m_dataObject->setHTMLAndBaseURL(createMarkup(selectedRange.startPosition(), selectedRange.endPosition(), AnnotateForInterchange, ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs), selectedRange.document().url());
+ m_dataObject->setHTMLAndBaseURL(selection.selectedHTMLForClipboard(), selection.frame()->document()->url());
}
String str = selection.selectedTextForClipboard();
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/FrameSelection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698