| Index: third_party/WebKit/Source/web/ContextMenuClientImpl.cpp
|
| diff --git a/third_party/WebKit/Source/web/ContextMenuClientImpl.cpp b/third_party/WebKit/Source/web/ContextMenuClientImpl.cpp
|
| index f5151fa215c236921294a946d95afa6d4661da0d..60383c4e1eed3b36a131a515dd573a6ced249b55 100644
|
| --- a/third_party/WebKit/Source/web/ContextMenuClientImpl.cpp
|
| +++ b/third_party/WebKit/Source/web/ContextMenuClientImpl.cpp
|
| @@ -402,6 +402,19 @@ bool ContextMenuClientImpl::ShowContextMenu(const ContextMenu* default_menu,
|
| data.input_field_type = WebContextMenuData::kInputFieldTypeNone;
|
| }
|
|
|
| + WebRect focus_webrect;
|
| + WebRect anchor_webrect;
|
| + web_view_->SelectionBounds(focus_webrect, anchor_webrect);
|
| +
|
| + int left = std::min(focus_webrect.x, anchor_webrect.x);
|
| + int top = std::min(focus_webrect.y, anchor_webrect.y);
|
| + int right = std::max(focus_webrect.x + focus_webrect.width,
|
| + anchor_webrect.x + anchor_webrect.width);
|
| + int bottom = std::max(focus_webrect.y + focus_webrect.height,
|
| + anchor_webrect.y + anchor_webrect.height);
|
| +
|
| + data.selection_rect = WebRect(left, top, right - left, bottom - top);
|
| +
|
| if (from_touch && !ShouldShowContextMenuFromTouch(data))
|
| return false;
|
|
|
|
|