Bug 44597 - [GTK] Rework event definition in the DOM bindings
Summary: [GTK] Rework event definition in the DOM bindings
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-25 02:47 PDT by Xan Lopez
Modified: 2010-08-26 02:00 PDT (History)
0 users

See Also:


Attachments
eventdom.diff (5.66 KB, patch)
2010-08-25 02:49 PDT, Xan Lopez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Xan Lopez 2010-08-25 02:47:51 PDT
ATM we are relying in the EventListeners defined in some of the IDL files to define the matching event signals in the GObject classes. This does not really make sense, since any event can be dispatched to any class implementing EventTarget. Rework this to just define all events in our base classes instead.
Comment 1 Xan Lopez 2010-08-25 02:49:28 PDT
Created attachment 65390 [details]
eventdom.diff
Comment 2 Xan Lopez 2010-08-25 02:51:20 PDT
For the future: this is not really complete or totally correct, since we should also be able to create ad-hoc events, dispatch them and connect to them through g_signal_connect. Right now this fails in that we don't create signals for the new events at runtime, so we wouldn't be able to be notified of the dispatch. One solution would be to have a generic "event" signal that has the actual name of the event in the detail, like: g_signal_connect(node, "event::funny-name", ...).
Comment 3 Martin Robinson 2010-08-25 11:31:54 PDT
Comment on attachment 65390 [details]
eventdom.diff

WebCore/bindings/scripts/CodeGeneratorGObject.pm:612
 +          foreach my $attribute (@eventSignalNames) {

I think this temporary variable should be called something like  eventSignalName instead of attribute (copy and paste issue?). r=me with this change.
Comment 4 Xan Lopez 2010-08-26 02:00:10 PDT
Comment on attachment 65390 [details]
eventdom.diff

Landed with the name change in r66090.
Comment 5 Xan Lopez 2010-08-26 02:00:23 PDT
Closing.