Summary: | Introduce ScriptEventListener to abstract away attribute event listener creation. | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Dimitri Glazkov (Google) <dglazkov> | ||||
Component: | WebCore Misc. | Assignee: | Dimitri Glazkov (Google) <dglazkov> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | ggaren | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Bug Depends on: | 21260 | ||||||
Bug Blocks: | |||||||
Attachments: |
|
Description
Dimitri Glazkov (Google)
2009-04-24 10:52:28 PDT
Created attachment 29749 [details]
Refactor away direct refs to JSLazyEventListener, v1.
WebCore/ChangeLog | 37 +++++++++++
WebCore/GNUmakefile.am | 2 +
WebCore/WebCore.pro | 1 +
WebCore/WebCore.vcproj/WebCore.vcproj | 8 +++
WebCore/WebCore.xcodeproj/project.pbxproj | 8 +++
WebCore/bindings/js/JSDOMGlobalObject.cpp | 1 -
WebCore/bindings/js/JSLazyEventListener.cpp | 47 --------------
WebCore/bindings/js/JSLazyEventListener.h | 4 -
WebCore/bindings/js/ScriptController.cpp | 1 -
WebCore/bindings/js/ScriptEventListener.cpp | 92 +++++++++++++++++++++++++++
WebCore/bindings/js/ScriptEventListener.h | 49 ++++++++++++++
WebCore/bindings/v8/ScriptEventListener.cpp | 61 ++++++++++++++++++
WebCore/bindings/v8/ScriptEventListener.h | 49 ++++++++++++++
WebCore/dom/Document.cpp | 2 +-
WebCore/html/HTMLBodyElement.cpp | 2 +-
WebCore/html/HTMLButtonElement.cpp | 2 +-
WebCore/html/HTMLElement.cpp | 2 +-
WebCore/html/HTMLFormElement.cpp | 2 +-
WebCore/html/HTMLFrameElementBase.cpp | 2 +-
WebCore/html/HTMLFrameSetElement.cpp | 2 +-
WebCore/html/HTMLImageElement.cpp | 2 +-
WebCore/html/HTMLInputElement.cpp | 2 +-
WebCore/html/HTMLObjectElement.cpp | 2 +-
WebCore/html/HTMLScriptElement.cpp | 2 +-
WebCore/html/HTMLSelectElement.cpp | 2 +-
WebCore/html/HTMLTextAreaElement.cpp | 2 +-
WebCore/svg/SVGElement.cpp | 2 +-
WebCore/svg/SVGSVGElement.cpp | 2 +-
28 files changed, 322 insertions(+), 68 deletions(-)
Comment on attachment 29749 [details]
Refactor away direct refs to JSLazyEventListener, v1.
Looks fine to me.
Why are you pulling:
Document* document = node->document();
45
into a local in all these functions. I don't ever see it used (except to take up 3 lines of source) :)
I don't think these will compile for v8:
PassRefPtr<JSLazyEventListener> createAttributeEventListener(Node*, Attribute*);
45 PassRefPtr<JSLazyEventListener> createAttributeEventListener(Frame*, Attribute*);
Since you're returning V8LazyEventListener.
Looks fine to me though, assuming you fix the above (and that you've run the tests).
Issues addressed, landed as http://trac.webkit.org/changeset/42843. |