| Index: pdf/instance.cc
|
| diff --git a/pdf/instance.cc b/pdf/instance.cc
|
| index a71d071ba9cb7fc5e1a104c0424251770dd8cdce..8ec4a9e7e365c4243da41af98ee536c936c7ec83 100644
|
| --- a/pdf/instance.cc
|
| +++ b/pdf/instance.cc
|
| @@ -76,6 +76,7 @@ const char kJSGetHeight[] = "getHeight";
|
| const char kJSGetHorizontalScrollbarThickness[] =
|
| "getHorizontalScrollbarThickness";
|
| const char kJSGetPageLocationNormalized[] = "getPageLocationNormalized";
|
| +const char kJSGetSelectedText[] = "getSelectedText";
|
| const char kJSGetVerticalScrollbarThickness[] = "getVerticalScrollbarThickness";
|
| const char kJSGetWidth[] = "getWidth";
|
| const char kJSGetZoomLevel[] = "getZoomLevel";
|
| @@ -1683,6 +1684,7 @@ bool Instance::HasScriptableMethod(const pp::Var& method, pp::Var* exception) {
|
| method_str == kJSGetHeight ||
|
| method_str == kJSGetHorizontalScrollbarThickness ||
|
| method_str == kJSGetPageLocationNormalized ||
|
| + method_str == kJSGetSelectedText ||
|
| method_str == kJSGetVerticalScrollbarThickness ||
|
| method_str == kJSGetWidth ||
|
| method_str == kJSGetZoomLevel ||
|
| @@ -1806,6 +1808,9 @@ pp::Var Instance::CallScriptableMethod(const pp::Var& method,
|
| return pp::Var(
|
| v_scrollbar_.get() ? GetScrollbarReservedThickness() : 0);
|
| }
|
| + if (method_str == kJSGetSelectedText) {
|
| + return GetSelectedText(false);
|
| + }
|
| if (method_str == kJSDocumentLoadComplete) {
|
| return pp::Var((document_load_state_ != LOAD_STATE_LOADING));
|
| }
|
|
|