Bug 52880 - [GTK] Implement PlatformKeyboardEvent::getCurrentModifierState()
Summary: [GTK] Implement PlatformKeyboardEvent::getCurrentModifierState()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-21 03:17 PST by Carlos Garcia Campos
Modified: 2011-02-20 01:28 PST (History)
2 users (show)

See Also:


Attachments
Patch implementing getCurrentModifierState() (1.39 KB, patch)
2011-01-21 03:20 PST, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2011-01-21 03:17:42 PST
While working on bug #52878 I noticed that PlatformKeyboardEvent::getCurrentModifierState() is currently unimplemented in the gtk port. I don't know if any test is failing because of this, but it could be easily implemented.
Comment 1 Carlos Garcia Campos 2011-01-21 03:20:36 PST
Created attachment 79719 [details]
Patch implementing getCurrentModifierState()
Comment 2 Martin Robinson 2011-01-22 14:17:40 PST
I grepped the entire source tree an only found implementations with no callers. Perhaps it makes more sense just to remove this method, as it appears to be dead code.
Comment 3 Eric Seidel (no email) 2011-01-22 15:04:02 PST
Comment on attachment 79719 [details]
Patch implementing getCurrentModifierState()

This does the current global event, not the actual object in question, right?
Comment 4 Carlos Garcia Campos 2011-01-23 23:57:55 PST
(In reply to comment #3)
> (From update of attachment 79719 [details])
> This does the current global event, not the actual object in question, right?

Yes, it takes the event from the global event list
Comment 5 Andreas Kling 2011-01-30 15:34:49 PST
(In reply to comment #2)
> I grepped the entire source tree an only found implementations with no callers. Perhaps it makes more sense just to remove this method, as it appears to be dead code.

Sounds like a good idea to me.

About this patch.. is the MOD1 key guaranteed to be Alt?
Comment 6 Carlos Garcia Campos 2011-01-30 23:40:51 PST
(In reply to comment #5)
> (In reply to comment #2)
> > I grepped the entire source tree an only found implementations with no callers. Perhaps it makes more sense just to remove this method, as it appears to be dead code.
> 
> Sounds like a good idea to me.
> 
> About this patch.. is the MOD1 key guaranteed to be Alt?

GTK docs says:

"It depends on the modifier mapping of the X server which key is interpreted as this modifier, but normally it is the Alt key"

we are currently using it everywhere in gtk port, in MouseEventGtk.cpp we have a FIXME comment though:

// FIXME: Would be even better to figure out which modifier is Alt instead of always using GDK_MOD1_MASK.
Comment 7 Martin Robinson 2011-02-17 15:13:47 PST
Comment on attachment 79719 [details]
Patch implementing getCurrentModifierState()

Seems this is used in DragController.cpp for createMouseEvent.
Comment 8 Carlos Garcia Campos 2011-02-20 01:28:25 PST
Committed r79151: <http://trac.webkit.org/changeset/79151>