Skip to content

Commit

Permalink
2008-09-29 Sam Weinig <sam@webkit.org>
Browse files Browse the repository at this point in the history
        Reviewed by Tim Hatcher.

        Patch for https://bugs.webkit.org/show_bug.cgi?id=21122
        Autogenerate JS event listeners

        - Generate EventTargetNode.

        * DerivedSources.make:
        * GNUmakefile.am:
        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * WebCoreSources.bkl:
        * bindings/js/JSEventListener.cpp:
        * bindings/js/JSEventTarget.cpp: Added.
        (WebCore::toJS):
        * bindings/js/JSEventTarget.h: Added.
        * bindings/js/JSEventTargetBase.cpp: Removed.
        * bindings/js/JSEventTargetBase.h:
        * bindings/js/JSEventTargetNode.cpp: Removed.
        * bindings/js/JSEventTargetNode.h: Removed.
        * bindings/js/JSEventTargetNodeCustom.cpp: Added.
        (WebCore::JSEventTargetNode::addEventListener):
        (WebCore::JSEventTargetNode::removeEventListener):
        (WebCore::JSEventTargetNode::dispatchEvent):
        (WebCore::JSEventTargetNode::getListener):
        (WebCore::JSEventTargetNode::setListener):
        (WebCore::JSEventTargetNode::pushEventHandlerScope):
        * bindings/js/JSEventTargetSVGElementInstance.cpp:
        (WebCore::):
        (WebCore::JSEventTargetSVGElementInstancePrototype::self):
        (WebCore::JSEventTargetSVGElementInstancePrototype::getOwnPropertySlot):
        (jsEventTargetAddEventListener):
        (jsEventTargetRemoveEventListener):
        (jsEventTargetDispatchEvent):
        * bindings/js/JSEventTargetSVGElementInstance.h:
        (WebCore::JSEventTargetSVGElementInstancePrototype::JSEventTargetSVGElementInstancePrototype):
        (WebCore::JSEventTargetSVGElementInstancePrototype::classInfo):
        * bindings/scripts/CodeGeneratorJS.pm:
        * dom/EventTargetNode.idl: Added.



Canonical link: https://commits.webkit.org/29357@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37090 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
weinig committed Sep 30, 2008
1 parent a7555dd commit 1292a43
Show file tree
Hide file tree
Showing 19 changed files with 482 additions and 556 deletions.
43 changes: 43 additions & 0 deletions WebCore/ChangeLog
@@ -1,3 +1,46 @@
2008-09-29 Sam Weinig <sam@webkit.org>

Reviewed by Tim Hatcher.

Patch for https://bugs.webkit.org/show_bug.cgi?id=21122
Autogenerate JS event listeners

- Generate EventTargetNode.

* DerivedSources.make:
* GNUmakefile.am:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* WebCoreSources.bkl:
* bindings/js/JSEventListener.cpp:
* bindings/js/JSEventTarget.cpp: Added.
(WebCore::toJS):
* bindings/js/JSEventTarget.h: Added.
* bindings/js/JSEventTargetBase.cpp: Removed.
* bindings/js/JSEventTargetBase.h:
* bindings/js/JSEventTargetNode.cpp: Removed.
* bindings/js/JSEventTargetNode.h: Removed.
* bindings/js/JSEventTargetNodeCustom.cpp: Added.
(WebCore::JSEventTargetNode::addEventListener):
(WebCore::JSEventTargetNode::removeEventListener):
(WebCore::JSEventTargetNode::dispatchEvent):
(WebCore::JSEventTargetNode::getListener):
(WebCore::JSEventTargetNode::setListener):
(WebCore::JSEventTargetNode::pushEventHandlerScope):
* bindings/js/JSEventTargetSVGElementInstance.cpp:
(WebCore::):
(WebCore::JSEventTargetSVGElementInstancePrototype::self):
(WebCore::JSEventTargetSVGElementInstancePrototype::getOwnPropertySlot):
(jsEventTargetAddEventListener):
(jsEventTargetRemoveEventListener):
(jsEventTargetDispatchEvent):
* bindings/js/JSEventTargetSVGElementInstance.h:
(WebCore::JSEventTargetSVGElementInstancePrototype::JSEventTargetSVGElementInstancePrototype):
(WebCore::JSEventTargetSVGElementInstancePrototype::classInfo):
* bindings/scripts/CodeGeneratorJS.pm:
* dom/EventTargetNode.idl: Added.

2008-09-29 Darin Adler <darin@apple.com>

Reviewed by Sam Weinig.
Expand Down
3 changes: 1 addition & 2 deletions WebCore/DerivedSources.make
Expand Up @@ -88,6 +88,7 @@ DOM_CLASSES = \
EventException \
EventListener \
EventTarget \
EventTargetNode \
File \
FileList \
HTMLAnchorElement \
Expand Down Expand Up @@ -369,8 +370,6 @@ all : \
$(filter-out JSEventListener.h JSRGBColor.h,$(DOM_CLASSES:%=JS%.h)) \
\
JSDOMWindowBase.lut.h \
JSEventTargetBase.lut.h \
JSEventTargetNode.lut.h \
JSEventTargetSVGElementInstance.lut.h \
JSRGBColor.lut.h \
\
Expand Down
14 changes: 6 additions & 8 deletions WebCore/GNUmakefile.am
Expand Up @@ -54,8 +54,6 @@ webcore_built_nosources += \
DerivedSources/tokenizer.cpp \
DerivedSources/ColorData.c \
WebCore/bindings/js/JSDOMWindowBase.lut.h \
WebCore/bindings/js/JSEventTargetBase.lut.h \
WebCore/bindings/js/JSEventTargetNode.lut.h \
WebCore/bindings/js/JSEventTargetSVGElementInstance.lut.h \
WebCore/bindings/js/JSRGBColor.lut.h

Expand Down Expand Up @@ -147,6 +145,8 @@ webcore_built_sources += \
DerivedSources/JSEvent.h \
DerivedSources/JSEventException.cpp \
DerivedSources/JSEventException.h \
DerivedSources/JSEventTargetNode.cpp \
DerivedSources/JSEventTargetNode.h \
DerivedSources/JSFile.cpp \
DerivedSources/JSFile.h \
DerivedSources/JSFileList.cpp \
Expand Down Expand Up @@ -643,13 +643,13 @@ webcore_sources += \
WebCore/bindings/js/JSEventCustom.cpp \
WebCore/bindings/js/JSEventListener.cpp \
WebCore/bindings/js/JSEventListener.h \
WebCore/bindings/js/JSEventTargetBase.cpp \
WebCore/bindings/js/JSEventTarget.cpp \
WebCore/bindings/js/JSEventTarget.h \
WebCore/bindings/js/JSEventTargetBase.h \
WebCore/bindings/js/JSEventTargetNode.cpp \
WebCore/bindings/js/JSHTMLAllCollection.cpp \
WebCore/bindings/js/JSEventTargetNode.h \
WebCore/bindings/js/JSEventTargetNodeCustom.cpp \
WebCore/bindings/js/JSEventTargetSVGElementInstance.cpp \
WebCore/bindings/js/JSEventTargetSVGElementInstance.h \
WebCore/bindings/js/JSHTMLAllCollection.cpp \
WebCore/bindings/js/JSHTMLAllCollection.h \
WebCore/bindings/js/JSHTMLAppletElementCustom.cpp \
WebCore/bindings/js/JSHTMLAppletElementCustom.h \
Expand Down Expand Up @@ -3563,8 +3563,6 @@ webcore_dist += \
# Clean rules for WebCore

CLEANFILES += \
WebCore/bindings/js/JSEventTargetBase.lut.h \
WebCore/bindings/js/JSEventTargetNode.lut.h \
WebCore/bindings/js/JSEventTargetSVGElementInstance.lut.h \
WebCore/bindings/js/JSDOMWindowBase.lut.h \
WebCore/bindings/js/JSRGBColor.lut.h
Expand Down
7 changes: 3 additions & 4 deletions WebCore/WebCore.pro
Expand Up @@ -201,8 +201,6 @@ STYLESHEETS_EMBED = $$PWD/css/html4.css

LUT_FILES += \
bindings/js/JSDOMWindowBase.cpp \
bindings/js/JSEventTargetBase.cpp \
bindings/js/JSEventTargetNode.cpp \
bindings/js/JSEventTargetSVGElementInstance.cpp \
bindings/js/JSRGBColor.cpp

Expand Down Expand Up @@ -247,6 +245,7 @@ IDL_BINDINGS += \
dom/EventException.idl \
# dom/EventListener.idl \
# dom/EventTarget.idl \
dom/EventTargetNode.idl \
dom/KeyboardEvent.idl \
dom/MouseEvent.idl \
dom/MessageChannel.idl \
Expand Down Expand Up @@ -380,8 +379,8 @@ SOURCES += \
bindings/js/JSDOMWindowShell.cpp \
bindings/js/JSElementCustom.cpp \
bindings/js/JSEventCustom.cpp \
bindings/js/JSEventTargetBase.cpp \
bindings/js/JSEventTargetNode.cpp \
bindings/js/JSEventTarget.cpp \
bindings/js/JSEventTargetNodeCustom.cpp \
bindings/js/JSEventTargetSVGElementInstance.cpp \
bindings/js/JSHTMLAllCollection.cpp \
bindings/js/JSHistoryCustom.cpp \
Expand Down
14 changes: 5 additions & 9 deletions WebCore/WebCore.vcproj/WebCore.vcproj
Expand Up @@ -688,11 +688,7 @@
>
</File>
<File
RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSEventTargetBase.lut.h"
>
</File>
<File
RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSEventTargetNode.lut.h"
RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSEventTargetNode.h"
>
</File>
<File
Expand Down Expand Up @@ -13417,19 +13413,19 @@
>
</File>
<File
RelativePath="..\bindings\js\JSEventTargetBase.cpp"
RelativePath="..\bindings\js\JSEventTarget.cpp"
>
</File>
<File
RelativePath="..\bindings\js\JSEventTargetBase.h"
RelativePath="..\bindings\js\JSEventTarget.h"
>
</File>
<File
RelativePath="..\bindings\js\JSEventTargetNode.cpp"
RelativePath="..\bindings\js\JSEventTargetBase.h"
>
</File>
<File
RelativePath="..\bindings\js\JSEventTargetNode.h"
RelativePath="..\bindings\js\JSEventTargetNodeCustom.cpp"
>
</File>
<File
Expand Down

0 comments on commit 1292a43

Please sign in to comment.