WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
UNCONFIRMED
13298
Widget needs a virtual method to be notified of mouse capture changes
https://bugs.webkit.org/show_bug.cgi?id=13298
Summary
Widget needs a virtual method to be notified of mouse capture changes
Matt Perry
Reported
2007-04-06 14:42:13 PDT
On Windows, mouse capture can be changed externally from the application. In these situations, the porting layer needs to notify the widget that it's capture has changed, in a way that can be handled differently for different widgets. Patch coming.
Attachments
add captureChanged virtual method
(2.00 KB, patch)
2007-04-06 14:43 PDT
,
Matt Perry
hyatt
: review-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Matt Perry
Comment 1
2007-04-06 14:43:27 PDT
Created
attachment 13982
[details]
add captureChanged virtual method
Dave Hyatt
Comment 2
2007-04-06 14:49:41 PDT
Comment on
attachment 13982
[details]
add captureChanged virtual method I do not understand why this is necessary.
Dave Hyatt
Comment 3
2007-04-06 15:15:21 PDT
See checkin for
bug 13274
. I eliminated the notion of Widget-level capture.
Dave Hyatt
Comment 4
2007-04-06 15:26:51 PDT
If this was for scrollbar, as part of 13274 I made EventHandler smart enough to handle scrollbar capture too.
Matt Perry
Comment 5
2007-04-06 16:05:23 PDT
Sorry, I hadn't updated to the latest revision. I see that the Windows-specific capture methods are now gone. However, I think we still need a way to notify WebCore (maybe the EventHandler, or the capturing widget itself?) that capture has been removed. It will not always happen on mouse-up. On Windows, if a window has capture, and (for example) you press Alt+Tab, capture is removed and a WM_CANCELMODE message is sent to that window. Widgets will need to be notified of this.
Dave Hyatt
Comment 6
2007-04-06 16:07:49 PDT
I think my preference would be to synthesize a mouse up event and send it in to WebCore when that happens.
Dave Hyatt
Comment 7
2007-04-06 16:08:19 PDT
Is Alt+Tab the only example? It seems pretty unlikely that a user would hit those keys while holding down the mouse. :)
Matt Perry
Comment 8
2007-04-06 16:22:25 PDT
I think capture can be stolen in other cases as well. Perhaps if a new window pops up and takes focus. A mouse-up event seems reasonable, as long as it's unlikely to interfere with pages that watch for mouse-up javascript events.
David Kilzer (:ddkilzer)
Comment 9
2007-04-06 18:17:59 PDT
Reopening bug as discussion is ongoing.
Dave Hyatt
Comment 10
2007-04-06 18:21:15 PDT
The reason I say do a mouse up is that a page that is using JS events to do its own "capturing" sort of behavior would also get stuck if it doesn't get the up.
Oliver Hunt
Comment 11
2007-04-06 19:04:56 PDT
We'd need to be careful when synthesizing the mouse up event, eg. take the case where a weebpage uses js to implement buttons manually (because we all want to do that), if we send a mouse up when we lose focus it could be interpreted as a "click" and then badness could ensue.
Dave Hyatt
Comment 12
2007-04-06 20:33:50 PDT
Lowering priority, since none of these cases are critical.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug