Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Issue 155343: Attempt at once-and-for-all fix for bug #2993 (Windows) (Closed)

Created:
11 years, 5 months ago by Roland
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

The patch keeps track of the mouse buttons that are currently pressed. Now, when a mouse drag occurs, it checks the state of the mouse buttons again explicitly to see whether perchance a button was released, but without the corresponding release event. If so, it processes a release event out of order, and remembers this fact, so that the same event isn't fired twice. The code explicitly tracks all 3 buttons, even though currently, just checking a general "button released" would be sufficient (the current code generally isn't concerned WHICH button was released). Tracking the buttons explicitly should be safer for potential future changes, though. Don't know about any reliable way to test this, though. Tested it inside the debugger by setting breakpoints that gave me the chance to release the mouse button out of order. Implemented under Windows only atm. BUG=2993 TEST=none

Patch Set 1 #

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+85 lines, -10 lines) Patch
M views/widget/widget_win.h View 1 2 chunks +15 lines, -0 lines 0 comments Download
M views/widget/widget_win.cc View 1 8 chunks +70 lines, -10 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Roland
Hi Ben, You seemed to be the best person to review this, based on svn ...
11 years, 5 months ago (2009-07-10 05:39:25 UTC) #1
Roland
Oops, just found a bug in my implementation, and another spot where I could make ...
11 years, 5 months ago (2009-07-14 05:16:49 UTC) #2
Roland
Uploaded a modified patch set that removes aforementioned bug, and should be better in corner ...
11 years, 5 months ago (2009-07-15 07:26:27 UTC) #3
Roland
Updated patch for 2993, added reviewers (taken from 'svn blame').
11 years, 5 months ago (2009-07-15 07:28:19 UTC) #4
Peter Kasting
At first glance this fix seems really worrisome. I think we ought to understand how ...
11 years, 5 months ago (2009-07-15 18:55:05 UTC) #5
Ben Goodger (Google)
Hi Roland, Sorry for the delay. I'll look at this tomorrow. -Ben On 2009/07/10 05:39:25, ...
11 years, 5 months ago (2009-07-16 03:09:35 UTC) #6
Roland
I realize this is a hackish fix, but I don't think there is anything wrong ...
11 years, 5 months ago (2009-07-17 07:01:16 UTC) #7
omattos
> At first glance this fix seems really worrisome Agreed. We need to know if ...
11 years, 5 months ago (2009-07-24 03:18:31 UTC) #8
omattos
11 years, 5 months ago (2009-07-24 04:18:11 UTC) #9
Not a directly code related issue, but following on from my last message:

Having used that tool, I see the following messages in the "bad" case:

WM_LBUTTONDOWN  (x,y)
WM_MOUSEMOVE (same x and y)
WM_LBUTTONUP

And I see the following in the "good" case:
WM_LBUTTONDOWN  (x,y)
WM_MOUSEMOVE (same x and y)
WM_LBUTTONUP
WM_LBUTTONUP

No idea what causes the double-button-up messages, but they are clearly
significant...

Debugging tip:  Open 30 tabs per gig of ram of google wave in firefox, chrome,
and IE, and the issue reproduces nicely. (so for 4 gigs of ram, open ~120 tabs
in each browser, expect to need to reboot your PC after testing)

Powered by Google App Engine
This is Rietveld 408576698