summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-25 22:49:12 +0000
committerjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-25 22:49:12 +0000
commit0ba58942febb94a47a053a9e33c7ad68d022e0d9 (patch)
tree2148d61d9def758f2b2b51f36031b0350932ee9b /content
parentd4dd6ce29264c6cd5c197ae2f5b2edef8cce06df (diff)
downloadchromium_src-0ba58942febb94a47a053a9e33c7ad68d022e0d9.zip
chromium_src-0ba58942febb94a47a053a9e33c7ad68d022e0d9.tar.gz
chromium_src-0ba58942febb94a47a053a9e33c7ad68d022e0d9.tar.bz2
Fix double clicking on windows
In r213318 I transposed some Xs and Ys. Turns out, they aren't always the same thing. TEST=double click on web content on windows BUG=264172 R=darin@chromium.org Review URL: https://codereview.chromium.org/20499002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213715 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/browser/renderer_host/input/web_input_event_builders_win.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/content/browser/renderer_host/input/web_input_event_builders_win.cc b/content/browser/renderer_host/input/web_input_event_builders_win.cc
index b529bf5..6e693a7 100644
--- a/content/browser/renderer_host/input/web_input_event_builders_win.cc
+++ b/content/browser/renderer_host/input/web_input_event_builders_win.cc
@@ -255,14 +255,14 @@ WebMouseEvent WebMouseEventBuilder::Build(HWND hwnd, UINT message,
// This differs slightly from the WebKit code in WebKit/win/WebView.cpp
// where their original code looks buggy.
static int last_click_position_x;
- static int last_click_position_Y;
+ static int last_click_position_y;
static WebMouseEvent::Button last_click_button = WebMouseEvent::ButtonLeft;
double current_time = result.timeStampSeconds;
bool cancel_previous_click =
(abs(last_click_position_x - result.x) >
(::GetSystemMetrics(SM_CXDOUBLECLK) / 2))
- || (abs(last_click_position_x - result.y) >
+ || (abs(last_click_position_y - result.y) >
(::GetSystemMetrics(SM_CYDOUBLECLK) / 2))
|| ((current_time - g_last_click_time) * 1000.0 > ::GetDoubleClickTime());
@@ -272,7 +272,7 @@ WebMouseEvent WebMouseEventBuilder::Build(HWND hwnd, UINT message,
} else {
g_last_click_count = 1;
last_click_position_x = result.x;
- last_click_position_x = result.y;
+ last_click_position_y = result.y;
}
g_last_click_time = current_time;
last_click_button = result.button;
@@ -281,7 +281,7 @@ WebMouseEvent WebMouseEventBuilder::Build(HWND hwnd, UINT message,
if (cancel_previous_click) {
g_last_click_count = 0;
last_click_position_x = 0;
- last_click_position_x = 0;
+ last_click_position_y = 0;
g_last_click_time = 0;
}
}