WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
24103
[GTK] Use correct return value for WebView button-release handler
https://bugs.webkit.org/show_bug.cgi?id=24103
Summary
[GTK] Use correct return value for WebView button-release handler
Xan Lopez
Reported
2009-02-23 13:55:36 PST
We are returning whatever the core code tells us it did, but this does not play well with the GTK+ model. GTK+ in general expects it will see a button-release if it saw a button-press and no motion/leave/etc events in between. EventHandler.cpp will, in some cases, not handle press but handle release, confusing the parent container of the WebView. As a workaround return always FALSE for button-release (this is the same than the Windows port does).
Attachments
releaseevent.patch
(3.18 KB, patch)
2009-02-23 13:58 PST
,
Xan Lopez
no flags
Details
Formatted Diff
Diff
releaseevent.patch
(3.23 KB, patch)
2009-02-23 14:01 PST
,
Xan Lopez
ap
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Xan Lopez
Comment 1
2009-02-23 13:58:10 PST
Created
attachment 27892
[details]
releaseevent.patch Fix return value for release-event handler.
Xan Lopez
Comment 2
2009-02-23 14:01:49 PST
Created
attachment 27893
[details]
releaseevent.patch Slightly improve comment, don't confuse event with click.
Christian Dywan
Comment 3
2009-02-24 11:29:17 PST
> Slightly improve comment, don't confuse event with click.
While I would of course prefer to actually fix the event handlers in WebCore that don't play together , I suppose this is a passable compromise. We might want to document somewhere that WebKit won't ever catch button events but still process them. Maybe in the introductory section of WebKitWebView?
Xan Lopez
Comment 4
2009-02-24 11:35:58 PST
(In reply to
comment #3
)
> > Slightly improve comment, don't confuse event with click. > > While I would of course prefer to actually fix the event handlers in WebCore > that don't play together , I suppose this is a passable compromise.
I'm not sure there's anything to fix. The event model and semantics of GTK+ and WebCore do not necesarily need to work OK together in all cases, and it's our responsibility to act as proxies between them. For this case in particular, ap says WebCore is working as it should be, for example.
> > We might want to document somewhere that WebKit won't ever catch button events > but still process them. Maybe in the introductory section of WebKitWebView? >
Yes, I guess this should be documented. Do you think this approach in general makes sense? We could do other things, like catch everything (return TRUE always for both events), catch nothing (return FALSE always for both events)...
Christian Dywan
Comment 5
2009-02-24 11:47:13 PST
(In reply to
comment #4
)
> (In reply to
comment #3
) > > > Slightly improve comment, don't confuse event with click. > > > > While I would of course prefer to actually fix the event handlers in WebCore > > that don't play together , I suppose this is a passable compromise. > > I'm not sure there's anything to fix. The event model and semantics of GTK+ and > WebCore do not necesarily need to work OK together in all cases, and it's our > responsibility to act as proxies between them. For this case in particular, ap > says WebCore is working as it should be, for example.
Yes, I'm not suggesting to change WebCore. If anything, we could try to make sure that a handled button-press is always followed by a handled button-release, i.e. just keep track of what button-press did and do the same in button-release.
> > We might want to document somewhere that WebKit won't ever catch button events > > but still process them. Maybe in the introductory section of WebKitWebView? > > Yes, I guess this should be documented. Do you think this approach in general > makes sense? We could do other things, like catch everything (return TRUE > always for both events), catch nothing (return FALSE always for both events)...
I would think what I described above could be better. If that doesn't work for whatever reason, always returning FALSE is probably the best we can do.
Xan Lopez
Comment 6
2009-02-24 11:54:19 PST
(In reply to
comment #5
)
> > I'm not sure there's anything to fix. The event model and semantics of GTK+ and > > WebCore do not necesarily need to work OK together in all cases, and it's our > > responsibility to act as proxies between them. For this case in particular, ap > > says WebCore is working as it should be, for example. > > Yes, I'm not suggesting to change WebCore. If anything, we could try to make > sure that a handled button-press is always followed by a handled > button-release, i.e. just keep track of what button-press did and do the same > in button-release.
Right, I thought about that too, but I think I prefer trying this first and see if it's enough, like you do.
Alexey Proskuryakov
Comment 7
2009-02-26 05:29:29 PST
Comment on
attachment 27893
[details]
releaseevent.patch Looks reasonable, r=me
Holger Freyther
Comment 8
2009-02-26 08:27:52 PST
Landed in
r41248
.
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