Bug 25370 - Introduce ScriptEventListener to abstract away attribute event listener creation.
Summary: Introduce ScriptEventListener to abstract away attribute event listener creat...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Dimitri Glazkov (Google)
URL:
Keywords:
Depends on: 21260
Blocks:
  Show dependency treegraph
 
Reported: 2009-04-24 10:52 PDT by Dimitri Glazkov (Google)
Modified: 2009-04-24 15:01 PDT (History)
1 user (show)

See Also:


Attachments
Refactor away direct refs to JSLazyEventListener, v1. (28.58 KB, patch)
2009-04-24 10:54 PDT, Dimitri Glazkov (Google)
eric: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitri Glazkov (Google) 2009-04-24 10:52:28 PDT
Remove direct references to JSLazyEventListener, introduced by http://trac.webkit.org/changeset/42633.
Comment 1 Dimitri Glazkov (Google) 2009-04-24 10:54:24 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 2 Eric Seidel (no email) 2009-04-24 12:41:26 PDT
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).
Comment 3 Dimitri Glazkov (Google) 2009-04-24 15:01:09 PDT
Issues addressed, landed as http://trac.webkit.org/changeset/42843.