| Index: third_party/WebKit/Source/core/testing/Internals.cpp
|
| diff --git a/third_party/WebKit/Source/core/testing/Internals.cpp b/third_party/WebKit/Source/core/testing/Internals.cpp
|
| index 474763c1d0db5afb481283dd8391ed70c217415f..7513325166527e7e59d05b38238766a167bc8611 100644
|
| --- a/third_party/WebKit/Source/core/testing/Internals.cpp
|
| +++ b/third_party/WebKit/Source/core/testing/Internals.cpp
|
| @@ -2476,9 +2476,12 @@ String Internals::selectedHTMLForClipboard()
|
|
|
| String Internals::selectedTextForClipboard()
|
| {
|
| - if (!frame())
|
| + if (!frame() || !frame()->document())
|
| return String();
|
|
|
| + // Clean layout is required for extracting plain text from selection.
|
| + frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets();
|
| +
|
| return frame()->selection().selectedTextForClipboard();
|
| }
|
|
|
|
|