| Index: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
|
| diff --git a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
|
| index 16f3f9202ef864bab64936b924b6ec4ae2e2895c..56619e311285df3bc84cb4858f117d5a55c5e954 100644
|
| --- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
|
| +++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
|
| @@ -1241,7 +1241,11 @@
|
| if (pluginContainer)
|
| return pluginContainer->plugin()->selectionAsText();
|
|
|
| - String text = frame()->selection().selectedText(TextIteratorEmitsObjectReplacementCharacter);
|
| + const EphemeralRange range = frame()->selection().selection().toNormalizedEphemeralRange();
|
| + if (range.isNull())
|
| + return WebString();
|
| +
|
| + String text = plainText(range, TextIteratorEmitsObjectReplacementCharacter);
|
| #if OS(WIN)
|
| replaceNewlinesWithWindowsStyleNewlines(text);
|
| #endif
|
| @@ -1255,7 +1259,11 @@
|
| if (pluginContainer)
|
| return pluginContainer->plugin()->selectionAsMarkup();
|
|
|
| - return frame()->selection().selectedHTMLForClipboard();
|
| + const EphemeralRange range = frame()->selection().selection().toNormalizedEphemeralRange();
|
| + if (range.isNull())
|
| + return WebString();
|
| +
|
| + return createMarkup(range.startPosition(), range.endPosition(), AnnotateForInterchange, ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs);
|
| }
|
|
|
| void WebLocalFrameImpl::selectWordAroundPosition(LocalFrame* frame, VisiblePosition position)
|
|
|