diff options
author | mustaq <mustaq@chromium.org> | 2015-07-27 07:54:39 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-27 14:55:11 +0000 |
commit | 0587853ebbb4a79937fe05ff57d6847d50660b95 (patch) | |
tree | 25fec12f6ca30b58edee8343f25cfada690043f0 | |
parent | 2a36d2921ea55b58eb1c385a679d4fea2766a42b (diff) | |
download | chromium_src-0587853ebbb4a79937fe05ff57d6847d50660b95.zip chromium_src-0587853ebbb4a79937fe05ff57d6847d50660b95.tar.gz chromium_src-0587853ebbb4a79937fe05ff57d6847d50660b95.tar.bz2 |
Remove .windowX from ChromePluginPlaceholder & web_input_event_traits.cc
All uses of the affected values are for window coordinates, see the
bug for details. One apparent exception was ShellWindowDelegateView but
it turns out that the coordinate there is actually a window coodinate;
we renamed a variable to clarify.
This CL is on our way to nuke the redundant WebMouseEvent.windowX and
.windowY fields.
BUG=507787
Review URL: https://codereview.chromium.org/1248383002
Cr-Commit-Position: refs/heads/master@{#340463}
-rw-r--r-- | chrome/renderer/plugins/chrome_plugin_placeholder.cc | 4 | ||||
-rw-r--r-- | content/common/input/web_input_event_traits.cc | 6 | ||||
-rw-r--r-- | content/shell/browser/shell_views.cc | 6 |
3 files changed, 7 insertions, 9 deletions
diff --git a/chrome/renderer/plugins/chrome_plugin_placeholder.cc b/chrome/renderer/plugins/chrome_plugin_placeholder.cc index 5633e93..13091ae 100644 --- a/chrome/renderer/plugins/chrome_plugin_placeholder.cc +++ b/chrome/renderer/plugins/chrome_plugin_placeholder.cc @@ -328,8 +328,8 @@ void ChromePluginPlaceholder::ShowContextMenu( hide_item.label = l10n_util::GetStringUTF16(IDS_CONTENT_CONTEXT_PLUGIN_HIDE); params.custom_items.push_back(hide_item); - params.x = event.windowX; - params.y = event.windowY; + params.x = event.x; + params.y = event.y; context_menu_request_id_ = render_frame()->ShowContextMenu(this, params); g_last_active_menu = this; diff --git a/content/common/input/web_input_event_traits.cc b/content/common/input/web_input_event_traits.cc index 5472907..f580ecd 100644 --- a/content/common/input/web_input_event_traits.cc +++ b/content/common/input/web_input_event_traits.cc @@ -40,13 +40,11 @@ void ApppendEventDetails(const WebKeyboardEvent& event, std::string* result) { void ApppendEventDetails(const WebMouseEvent& event, std::string* result) { StringAppendF(result, - "{\n Button: %d\n Pos: (%d, %d)\n WindowPos: (%d, %d)\n" - " GlobalPos: (%d, %d)\n Movement: (%d, %d)\n Clicks: %d\n}", + "{\n Button: %d\n Pos: (%d, %d)\n GlobalPos: (%d, %d)\n" + " Movement: (%d, %d)\n Clicks: %d\n}", event.button, event.x, event.y, - event.windowX, - event.windowY, event.globalX, event.globalY, event.movementX, diff --git a/content/shell/browser/shell_views.cc b/content/shell/browser/shell_views.cc index 4ce0fa6..c4037aa 100644 --- a/content/shell/browser/shell_views.cc +++ b/content/shell/browser/shell_views.cc @@ -166,7 +166,7 @@ class ShellWindowDelegateView : public views::WidgetDelegateView, } void ShowWebViewContextMenu(const content::ContextMenuParams& params) { - gfx::Point screen_point(params.x, params.y); + gfx::Point point(params.x, params.y); // Convert from content coordinates to window coordinates. // This code copied from chrome_web_contents_view_delegate_views.cc @@ -177,7 +177,7 @@ class ShellWindowDelegateView : public views::WidgetDelegateView, aura::client::GetScreenPositionClient(root_window); if (screen_position_client) { screen_position_client->ConvertPointToScreen(web_contents_window, - &screen_point); + &point); } context_menu_model_.reset(new ContextMenuModel(shell_, params)); @@ -186,7 +186,7 @@ class ShellWindowDelegateView : public views::WidgetDelegateView, if (context_menu_runner_->RunMenuAt(web_view_->GetWidget(), NULL, - gfx::Rect(screen_point, gfx::Size()), + gfx::Rect(point, gfx::Size()), views::MENU_ANCHOR_TOPRIGHT, ui::MENU_SOURCE_NONE) == views::MenuRunner::MENU_DELETED) { |