WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
20865
Kill JSSVGLazyEventListener and cleanup event handling
https://bugs.webkit.org/show_bug.cgi?id=20865
Summary
Kill JSSVGLazyEventListener and cleanup event handling
Nikolas Zimmermann
Reported
2008-09-15 16:22:16 PDT
Kill JSSVGLazyEventListener, merge with JSLazyEventListener. Cleanup all event handling related functions, rename & generalize the functions (dispatchHTMLEvent, setHTMLWindowEventListener etc..)
Attachments
Initial patch
(94.38 KB, patch)
2008-09-15 16:22 PDT
,
Nikolas Zimmermann
eric
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Nikolas Zimmermann
Comment 1
2008-09-15 16:22:59 PDT
Created
attachment 23450
[details]
Initial patch
Eric Seidel (no email)
Comment 2
2008-09-15 16:46:44 PDT
Comment on
attachment 23450
[details]
Initial patch I'm not really sure ForType and ForTypeAndAtrribute are really worth the extra characters. I think they're probably just as clear w/o the extra typing. I think it's strange that a bool flips between "attached to a node" and "attached to the window". That could also be a 2-value enum (and might be clearer that way). Seems fine. Certainly better than what we have today. We'll probably go through another round of cleanup yet.
Nikolas Zimmermann
Comment 3
2008-09-15 16:52:41 PDT
(In reply to
comment #2
)
> (From update of
attachment 23450
[details]
[edit]) > I'm not really sure ForType and ForTypeAndAtrribute are really worth the extra > characters. I think they're probably just as clear w/o the extra typing.
I agree the name is weak, we should eventually find a nicer one, before landing. Though some extra characters should be preserved to differentiate between the DOM dispatchEvent/addEV/removeEV methods and our version.
> > I think it's strange that a bool flips between "attached to a node" and > "attached to the window". That could also be a 2-value enum (and might be > clearer that way).
Yeah, I should talk to Sam, about that.
> Seems fine. Certainly better than what we have today. We'll probably go > through another round of cleanup yet.
Definately. Thanks for r+ :-)
Nikolas Zimmermann
Comment 4
2008-09-15 17:03:16 PDT
Landed in
r36466
.
Darin Adler
Comment 5
2008-09-15 17:04:00 PDT
(In reply to
comment #3
)
> (In reply to
comment #2
) > > I'm not really sure ForType and ForTypeAndAtrribute are really worth the extra > > characters. I think they're probably just as clear w/o the extra typing.
>
> I agree the name is weak, we should eventually find a nicer one, before > landing. Though some extra characters should be preserved to differentiate > between the DOM dispatchEvent/addEV/removeEV methods and our version.
Don't the extra arguments differentiate the function enough? Do we really need the different name? When function names get that long it starts to really hurt readability.
> > I think it's strange that a bool flips between "attached to a node" and > > "attached to the window". That could also be a 2-value enum (and might be > > clearer that way).
>
> Yeah, I should talk to Sam, about that.
I think an enum would be better than a bool. But how about two separate functions?
Nikolas Zimmermann
Comment 6
2008-09-15 17:38:22 PDT
> Don't the extra arguments differentiate the function enough? Do we really need > the different name? When function names get that long it starts to really hurt > readability.
The arguments are indeed sufficient to differentiate, I could prepare a new patch, if you like. Proposal: setEventListenerForType -> setEventListener setEventListenerForTypeAndAttribute -> setEventListenerByAttribute removeEventListenerForType -> removeEventListener eventListenerForType -> getEventListener I don't really like getEventListener, maybe retrieve/cached/whatever as prefix? I'm open for any suggestions.
> > > I think it's strange that a bool flips between "attached to a node" and > > > "attached to the window". That could also be a 2-value enum (and might be > > > clearer that way). > > > > Yeah, I should talk to Sam, about that. > > I think an enum would be better than a bool. But how about two separate > functions?
That's definately possible, but we'd need to store the enum anyways to differentiate between "attached to node" / "attached to window".
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