Chromium Code Reviews| 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 63214655706a8c3468d99ef8c4ad55f781be68cd..6afec50f940a8eeda4538ba95a5e8ff38cfa3099 100644 |
| --- a/third_party/WebKit/Source/web/ContextMenuClientImpl.cpp |
| +++ b/third_party/WebKit/Source/web/ContextMenuClientImpl.cpp |
| @@ -402,6 +402,13 @@ 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); |
| + data.selection_rect = WebRect(focus_webrect.x, focus_webrect.y, |
| + anchor_webrect.x + anchor_webrect.width, |
|
aelias_OOO_until_Jul13
2017/05/04 20:48:56
C++ rects have different format from Java Rects, s
amaralp
2017/05/05 01:14:32
Done, also fixed an issue when anchor comes before
|
| + anchor_webrect.y + anchor_webrect.height); |
| + |
| if (from_touch && !ShouldShowContextMenuFromTouch(data)) |
| return false; |