| Index: third_party/WebKit/Source/web/WebViewImpl.cpp
|
| diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp
|
| index 7be5f1006676c7800988794aeae343f3fe494fa6..eecb51a19943301cf1b4ce408876589c3672f2cc 100644
|
| --- a/third_party/WebKit/Source/web/WebViewImpl.cpp
|
| +++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
|
| @@ -42,6 +42,7 @@
|
| #include "core/editing/Editor.h"
|
| #include "core/editing/FrameSelection.h"
|
| #include "core/editing/InputMethodController.h"
|
| +#include "core/editing/SelectionController.h"
|
| #include "core/editing/iterators/TextIterator.h"
|
| #include "core/editing/markers/DocumentMarkerController.h"
|
| #include "core/editing/serializers/HTMLInterchange.h"
|
| @@ -2256,6 +2257,22 @@ WebInputEventResult WebViewImpl::handleInputEvent(const WebInputEvent& inputEven
|
| return WebInputEventResult::NotHandled;
|
| }
|
|
|
| +bool WebViewImpl::selectWordIfAnyAt(const WebPoint& position)
|
| +{
|
| + HitTestResult result = hitTestResultForRootFramePos(position);
|
| + Frame* targetFrame;
|
| + if (result.innerNodeOrImageMapImage())
|
| + targetFrame = result.innerNodeOrImageMapImage()->document().frame();
|
| + else
|
| + targetFrame = m_page->focusController().focusedOrMainFrame();
|
| +
|
| + if (!targetFrame->isLocalFrame())
|
| + return false;
|
| +
|
| + LocalFrame* localFrame = toLocalFrame(targetFrame);
|
| + return localFrame->eventHandler().selectionController().selectWordAtPositionIfAny(result);
|
| +}
|
| +
|
| void WebViewImpl::setCursorVisibilityState(bool isVisible)
|
| {
|
| if (m_page)
|
|
|