| 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 74496ba8aa75966a2bc24c1cc4a04e1198fbe180..0b531a01bd6ac9f54d208fbd7c4aba01d462b94a 100644
|
| --- a/third_party/WebKit/Source/core/editing/FrameSelection.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/FrameSelection.cpp
|
| @@ -1071,6 +1071,13 @@ String FrameSelection::selectedHTMLForClipboard() const
|
|
|
| String FrameSelection::selectedText(TextIteratorBehavior behavior) const
|
| {
|
| + if (!isAvailable())
|
| + return emptyString();
|
| +
|
| + // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets
|
| + // needs to be audited. See http://crbug.com/590369 for more details.
|
| + m_document->updateStyleAndLayoutIgnorePendingStylesheets();
|
| +
|
| return extractSelectedText(*this, behavior);
|
| }
|
|
|
| @@ -1078,7 +1085,7 @@ String FrameSelection::selectedTextForClipboard() const
|
| {
|
| if (m_frame->settings() && m_frame->settings()->selectionIncludesAltImageText())
|
| return extractSelectedText(*this, TextIteratorEmitsImageAltText);
|
| - return selectedText();
|
| + return extractSelectedText(*this, TextIteratorDefaultBehavior);
|
| }
|
|
|
| LayoutRect FrameSelection::bounds() const
|
|
|