diff options
author | varunjain@chromium.org <varunjain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-18 12:31:57 +0000 |
---|---|---|
committer | varunjain@chromium.org <varunjain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-18 12:31:57 +0000 |
commit | f56c7874661fc602acb108ad923b9e7118eba058 (patch) | |
tree | 179cac8e5e137d77156382bd1ceaa4be25e0eca1 /ui/views | |
parent | eadcb258a6261abcbe212639701858b382c80ae2 (diff) | |
download | chromium_src-f56c7874661fc602acb108ad923b9e7118eba058.zip chromium_src-f56c7874661fc602acb108ad923b9e7118eba058.tar.gz chromium_src-f56c7874661fc602acb108ad923b9e7118eba058.tar.bz2 |
Context menu on a webpage should be positioned differently when invoked from
touch editing menu. The requirement here is that the menu should be positioned
such that the anchor point is at the bottom center of the menu, where the anchor
point is the point where the touch editing small menu was shown. We accomplish
this by adding a SourceType field to ContextMenuParams. This field will be set
appropriately when the renderer send the context menu IPC to the browser.
BUG=239110
Review URL: https://chromiumcodereview.appspot.com/17029012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206954 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views')
-rw-r--r-- | ui/views/controls/textfield/native_textfield_views.cc | 2 | ||||
-rw-r--r-- | ui/views/controls/textfield/native_textfield_views.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/ui/views/controls/textfield/native_textfield_views.cc b/ui/views/controls/textfield/native_textfield_views.cc index b6b0d09..a86e5bc 100644 --- a/ui/views/controls/textfield/native_textfield_views.cc +++ b/ui/views/controls/textfield/native_textfield_views.cc @@ -424,7 +424,7 @@ bool NativeTextfieldViews::DrawsHandles() { return false; } -void NativeTextfieldViews::OpenContextMenu(const gfx::Point anchor) { +void NativeTextfieldViews::OpenContextMenu(const gfx::Point& anchor) { touch_selection_controller_.reset(); ShowContextMenu(anchor, false); } diff --git a/ui/views/controls/textfield/native_textfield_views.h b/ui/views/controls/textfield/native_textfield_views.h index 23cd6f2..7e7dd28 100644 --- a/ui/views/controls/textfield/native_textfield_views.h +++ b/ui/views/controls/textfield/native_textfield_views.h @@ -89,7 +89,7 @@ class VIEWS_EXPORT NativeTextfieldViews : public View, virtual void ConvertPointToScreen(gfx::Point* point) OVERRIDE; virtual void ConvertPointFromScreen(gfx::Point* point) OVERRIDE; virtual bool DrawsHandles() OVERRIDE; - virtual void OpenContextMenu(const gfx::Point anchor) OVERRIDE; + virtual void OpenContextMenu(const gfx::Point& anchor) OVERRIDE; // ContextMenuController overrides: virtual void ShowContextMenuForView(View* source, |