Remove all custom constructors of Events in V8
authorharaken@chromium.org <haraken@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Nov 2011 08:27:48 +0000 (08:27 +0000)
committerharaken@chromium.org <haraken@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Nov 2011 08:27:48 +0000 (08:27 +0000)
https://bugs.webkit.org/show_bug.cgi?id=72074

Reviewed by Adam Barth.

V8 has [ConstructorTemplate=Event] IDL, which generates
Event constructors. This patch removes all the custom constructors
in V8EventConstructors.cpp and generates them using
[ConstructorTemplate=Event] IDL.

Tests: fast/events/constructors/before-load-event-constructor.html
       fast/events/constructors/close-event-constructor.html
       fast/events/constructors/custom-event-constructor.html
       fast/events/constructors/error-event-constructor.html
       fast/events/constructors/event-constructors.html
       fast/events/constructors/hash-change-event-constructor.html
       fast/events/constructors/message-event-constructor.html
       fast/events/constructors/overflow-event-constructor.html
       fast/events/constructors/page-transition-event-constructor.html
       fast/events/constructors/pop-state-event-constructor.html
       fast/events/constructors/progress-event-constructor.html
       fast/events/constructors/track-event-constructor.html
       fast/events/constructors/webkit-animation-event-constructor.html
       fast/events/constructors/webkit-transition-event-constructor.html

* Target.pri: Removed V8EventConstructors.cpp.
* WebCore.gypi: Ditto.
* bindings/v8/custom/V8EventConstructors.cpp: Removed.
* dom/BeforeLoadEvent.idl: Replaced [V8CustomConstructor] with [V8ConstructorTemplate=Event]. Added [InitializedByConstructor] IDL to attributes that can be initialized by the generated constructor.
* dom/CustomEvent.idl: Ditto.
* dom/ErrorEvent.idl: Ditto.
* dom/HashChangeEvent.idl: Ditto.
* dom/MessageEvent.idl: Ditto.
* dom/OverflowEvent.idl: Ditto.
* dom/PageTransitionEvent.idl: Ditto.
* dom/PopStateEvent.idl: Ditto.
* dom/ProgressEvent.idl: Ditto.
* dom/WebKitAnimationEvent.idl: Ditto.
* dom/WebKitTransitionEvent.idl: Ditto.
* html/track/TrackEvent.idl: Ditto.
* websockets/CloseEvent.idl: Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@100108 268f45cc-cd09-0410-ab3c-d52691b4dbfc

17 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Target.pri
Source/WebCore/WebCore.gypi
Source/WebCore/bindings/v8/custom/V8EventConstructors.cpp [deleted file]
Source/WebCore/dom/BeforeLoadEvent.idl
Source/WebCore/dom/CustomEvent.idl
Source/WebCore/dom/ErrorEvent.idl
Source/WebCore/dom/HashChangeEvent.idl
Source/WebCore/dom/MessageEvent.idl
Source/WebCore/dom/OverflowEvent.idl
Source/WebCore/dom/PageTransitionEvent.idl
Source/WebCore/dom/PopStateEvent.idl
Source/WebCore/dom/ProgressEvent.idl
Source/WebCore/dom/WebKitAnimationEvent.idl
Source/WebCore/dom/WebKitTransitionEvent.idl
Source/WebCore/html/track/TrackEvent.idl
Source/WebCore/websockets/CloseEvent.idl

index f80de42..59fc214 100644 (file)
@@ -1,3 +1,47 @@
+2011-11-14  Kentaro Hara  <haraken@chromium.org>
+
+        Remove all custom constructors of Events in V8
+        https://bugs.webkit.org/show_bug.cgi?id=72074
+
+        Reviewed by Adam Barth.
+
+        V8 has [ConstructorTemplate=Event] IDL, which generates
+        Event constructors. This patch removes all the custom constructors
+        in V8EventConstructors.cpp and generates them using
+        [ConstructorTemplate=Event] IDL.
+
+        Tests: fast/events/constructors/before-load-event-constructor.html
+               fast/events/constructors/close-event-constructor.html
+               fast/events/constructors/custom-event-constructor.html
+               fast/events/constructors/error-event-constructor.html
+               fast/events/constructors/event-constructors.html
+               fast/events/constructors/hash-change-event-constructor.html
+               fast/events/constructors/message-event-constructor.html
+               fast/events/constructors/overflow-event-constructor.html
+               fast/events/constructors/page-transition-event-constructor.html
+               fast/events/constructors/pop-state-event-constructor.html
+               fast/events/constructors/progress-event-constructor.html
+               fast/events/constructors/track-event-constructor.html
+               fast/events/constructors/webkit-animation-event-constructor.html
+               fast/events/constructors/webkit-transition-event-constructor.html
+
+        * Target.pri: Removed V8EventConstructors.cpp.
+        * WebCore.gypi: Ditto.
+        * bindings/v8/custom/V8EventConstructors.cpp: Removed.
+        * dom/BeforeLoadEvent.idl: Replaced [V8CustomConstructor] with [V8ConstructorTemplate=Event]. Added [InitializedByConstructor] IDL to attributes that can be initialized by the generated constructor.
+        * dom/CustomEvent.idl: Ditto.
+        * dom/ErrorEvent.idl: Ditto.
+        * dom/HashChangeEvent.idl: Ditto.
+        * dom/MessageEvent.idl: Ditto.
+        * dom/OverflowEvent.idl: Ditto.
+        * dom/PageTransitionEvent.idl: Ditto.
+        * dom/PopStateEvent.idl: Ditto.
+        * dom/ProgressEvent.idl: Ditto.
+        * dom/WebKitAnimationEvent.idl: Ditto.
+        * dom/WebKitTransitionEvent.idl: Ditto.
+        * html/track/TrackEvent.idl: Ditto.
+        * websockets/CloseEvent.idl: Ditto.
+
 2011-11-13  Patrick Gansterer  <paroga@webkit.org>
 
         [WX] Make FontPlatformData::m_size private
index 01e9d5c..b6afc16 100644 (file)
@@ -92,7 +92,6 @@ v8 {
         bindings/v8/custom/V8DataViewCustom.cpp \
         bindings/v8/custom/V8DeviceMotionEventCustom.cpp \
         bindings/v8/custom/V8DeviceOrientationEventCustom.cpp \
-        bindings/v8/custom/V8EventConstructors.cpp \
         bindings/v8/custom/V8Float32ArrayCustom.cpp \
         bindings/v8/custom/V8Float64ArrayCustom.cpp \
         bindings/v8/custom/V8Int8ArrayCustom.cpp \
index 66e3fae..f110da9 100644 (file)
             'bindings/v8/custom/V8ElementCustom.cpp',
             'bindings/v8/custom/V8EntryCustom.cpp',
             'bindings/v8/custom/V8EntrySyncCustom.cpp',
-            'bindings/v8/custom/V8EventConstructors.cpp',
             'bindings/v8/custom/V8EventCustom.cpp',
             'bindings/v8/custom/V8FileReaderCustom.cpp',
             'bindings/v8/custom/V8Float32ArrayCustom.cpp',
diff --git a/Source/WebCore/bindings/v8/custom/V8EventConstructors.cpp b/Source/WebCore/bindings/v8/custom/V8EventConstructors.cpp
deleted file mode 100644 (file)
index 5b28992..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "EventConstructors.h"
-
-#include "BeforeLoadEvent.h"
-#include "CloseEvent.h"
-#include "CustomEvent.h"
-#include "Document.h"
-#include "DocumentFragment.h"
-#include "ErrorEvent.h"
-#include "HashChangeEvent.h"
-#include "MessageEvent.h"
-#include "Node.h"
-#include "OverflowEvent.h"
-#include "PageTransitionEvent.h"
-#include "PopStateEvent.h"
-#include "ProgressEvent.h"
-#include "WebKitAnimationEvent.h"
-#include "WebKitTransitionEvent.h"
-
-#include "OptionsObject.h"
-#include "V8BeforeLoadEvent.h"
-#include "V8Binding.h"
-#include "V8BindingMacros.h"
-#include "V8CloseEvent.h"
-#include "V8CustomEvent.h"
-#include "V8Document.h"
-#include "V8ErrorEvent.h"
-#include "V8Event.h"
-#include "V8HashChangeEvent.h"
-#include "V8MessageEvent.h"
-#include "V8Node.h"
-#include "V8OverflowEvent.h"
-#include "V8PageTransitionEvent.h"
-#include "V8PopStateEvent.h"
-#include "V8ProgressEvent.h"
-#include "V8Proxy.h"
-#include "V8WebKitAnimationEvent.h"
-#include "V8WebKitTransitionEvent.h"
-
-#if ENABLE(VIDEO_TRACK)
-#include "TrackEvent.h"
-#include "V8TrackEvent.h"
-#endif
-
-#include <wtf/RefPtr.h>
-
-namespace WebCore {
-
-template<typename EventType, typename EventInitType>
-static v8::Handle<v8::Value> constructV8Event(const v8::Arguments& args, bool (*filler)(EventInitType&, const OptionsObject&), WrapperTypeInfo* info)
-{
-    INC_STATS("DOM.Event.Constructor");
-
-    if (!args.IsConstructCall())
-        return throwError("DOM object constructor cannot be called as a function.", V8Proxy::TypeError);
-
-    if (ConstructorMode::current() == ConstructorMode::WrapExistingObject)
-        return args.Holder();
-
-    if (args.Length() < 1)
-        return throwError("Not enough arguments", V8Proxy::TypeError);
-
-    STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, type, args[0]);
-    EventInitType eventInit;
-    if (args.Length() >= 2) {
-        EXCEPTION_BLOCK(OptionsObject, options, args[1]);
-        if (!filler(eventInit, options))
-            return v8::Undefined();
-    }
-
-    RefPtr<EventType> event = EventType::create(type, eventInit);
-
-    V8DOMWrapper::setDOMWrapper(args.Holder(), info, event.get());
-    return toV8(event.release(), args.Holder());
-}
-
-#define DICTIONARY_START(EventType) \
-    static bool fill##EventType##Init(EventType##Init& eventInit, const OptionsObject& options) \
-    {
-
-#define DICTIONARY_END(EventType) \
-        return true; \
-    } \
-    \
-    v8::Handle<v8::Value> V8##EventType::constructorCallback(const v8::Arguments& args) \
-    { \
-        return constructV8Event<EventType, EventType##Init>(args, fill##EventType##Init, &info); \
-    }
-
-#define FILL_PARENT_PROPERTIES(parentEventType) \
-    if (!fill##parentEventType##Init(eventInit, options)) \
-        return false;
-
-#define FILL_PROPERTY(propertyName) \
-    options.get(#propertyName, eventInit.propertyName); // This can fail but it is OK.
-
-INSTANTIATE_INITIALIZING_CONSTRUCTOR_FOR_CUSTOM_EVENT(DICTIONARY_START, DICTIONARY_END, FILL_PARENT_PROPERTIES, FILL_PROPERTY)
-INSTANTIATE_INITIALIZING_CONSTRUCTOR_FOR_PROGRESS_EVENT(DICTIONARY_START, DICTIONARY_END, FILL_PARENT_PROPERTIES, FILL_PROPERTY)
-INSTANTIATE_INITIALIZING_CONSTRUCTOR_FOR_WEBKIT_ANIMATION_EVENT(DICTIONARY_START, DICTIONARY_END, FILL_PARENT_PROPERTIES, FILL_PROPERTY)
-INSTANTIATE_INITIALIZING_CONSTRUCTOR_FOR_HASH_CHANGE_EVENT(DICTIONARY_START, DICTIONARY_END, FILL_PARENT_PROPERTIES, FILL_PROPERTY)
-INSTANTIATE_INITIALIZING_CONSTRUCTOR_FOR_CLOSE_EVENT(DICTIONARY_START, DICTIONARY_END, FILL_PARENT_PROPERTIES, FILL_PROPERTY)
-INSTANTIATE_INITIALIZING_CONSTRUCTOR_FOR_PAGE_TRANSITION_EVENT(DICTIONARY_START, DICTIONARY_END, FILL_PARENT_PROPERTIES, FILL_PROPERTY)
-INSTANTIATE_INITIALIZING_CONSTRUCTOR_FOR_ERROR_EVENT(DICTIONARY_START, DICTIONARY_END, FILL_PARENT_PROPERTIES, FILL_PROPERTY)
-INSTANTIATE_INITIALIZING_CONSTRUCTOR_FOR_POP_STATE_EVENT(DICTIONARY_START, DICTIONARY_END, FILL_PARENT_PROPERTIES, FILL_PROPERTY)
-INSTANTIATE_INITIALIZING_CONSTRUCTOR_FOR_WEBKIT_TRANSITION_EVENT(DICTIONARY_START, DICTIONARY_END, FILL_PARENT_PROPERTIES, FILL_PROPERTY)
-INSTANTIATE_INITIALIZING_CONSTRUCTOR_FOR_BEFORE_LOAD_EVENT(DICTIONARY_START, DICTIONARY_END, FILL_PARENT_PROPERTIES, FILL_PROPERTY)
-INSTANTIATE_INITIALIZING_CONSTRUCTOR_FOR_OVERFLOW_EVENT(DICTIONARY_START, DICTIONARY_END, FILL_PARENT_PROPERTIES, FILL_PROPERTY)
-INSTANTIATE_INITIALIZING_CONSTRUCTOR_FOR_MESSAGE_EVENT(DICTIONARY_START, DICTIONARY_END, FILL_PARENT_PROPERTIES, FILL_PROPERTY)
-INSTANTIATE_INITIALIZING_CONSTRUCTOR_FOR_TRACK_EVENT(DICTIONARY_START, DICTIONARY_END, FILL_PARENT_PROPERTIES, FILL_PROPERTY)
-
-} // namespace WebCore
index 2308d01..657785f 100644 (file)
 module events {
 
     interface [
-        CustomConstructor
+        V8ConstructorTemplate=Event,
+        JSCustomConstructor
     ] BeforeLoadEvent : Event {
-        readonly attribute DOMString url;
+        readonly attribute [InitializedByConstructor] DOMString url;
     };
 
 }
index d028805..252b6c2 100644 (file)
@@ -28,15 +28,15 @@ module events {
 #if !defined(LANGUAGE_CPP) || !LANGUAGE_CPP
     // Introduced in DOM Level 3:
     interface [
-        CustomConstructor
+        V8ConstructorTemplate=Event,
+        JSCustomConstructor
     ] CustomEvent : Event {
+        readonly attribute [InitializedByConstructor] DOMObject detail;
 
-       readonly attribute DOMObject detail;
-
-       void initCustomEvent(in [Optional=CallWithDefaultValue] DOMString typeArg, 
-                            in [Optional=CallWithDefaultValue] boolean canBubbleArg, 
-                            in [Optional=CallWithDefaultValue] boolean cancelableArg, 
-                            in [Optional=CallWithDefaultValue] DOMObject detailArg);
+        void initCustomEvent(in [Optional=CallWithDefaultValue] DOMString typeArg, 
+                             in [Optional=CallWithDefaultValue] boolean canBubbleArg, 
+                             in [Optional=CallWithDefaultValue] boolean cancelableArg, 
+                             in [Optional=CallWithDefaultValue] DOMObject detailArg);
     };
 #endif
 
index 2fce31f..770b93e 100644 (file)
@@ -32,11 +32,12 @@ module events {
 
     interface [
         NoStaticTables,
-        CustomConstructor
+        V8ConstructorTemplate=Event,
+        JSCustomConstructor
     ] ErrorEvent : Event {
-        readonly attribute DOMString message;
-        readonly attribute DOMString filename;
-        readonly attribute unsigned long lineno;
+        readonly attribute [InitializedByConstructor] DOMString message;
+        readonly attribute [InitializedByConstructor] DOMString filename;
+        readonly attribute [InitializedByConstructor] unsigned long lineno;
     };
 
 }
index 745e275..b4924f2 100644 (file)
@@ -21,15 +21,16 @@ module events {
 
     // Introduced in http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#event-hashchange
     interface [
-        CustomConstructor
+        V8ConstructorTemplate=Event,
+        JSCustomConstructor
     ] HashChangeEvent : Event {
         void initHashChangeEvent(in [Optional=CallWithDefaultValue] DOMString type, 
                                  in [Optional=CallWithDefaultValue] boolean canBubble, 
                                  in [Optional=CallWithDefaultValue] boolean cancelable, 
                                  in [Optional=CallWithDefaultValue] DOMString oldURL, 
                                  in [Optional=CallWithDefaultValue] DOMString newURL); 
-        readonly attribute DOMString oldURL;
-        readonly attribute DOMString newURL;
+        readonly attribute [InitializedByConstructor] DOMString oldURL;
+        readonly attribute [InitializedByConstructor] DOMString newURL;
     };
 
 }
index 527fc00..02fb953 100644 (file)
@@ -29,14 +29,15 @@ module events {
 
     interface [
         NoStaticTables,
-        CustomConstructor
+        V8ConstructorTemplate=Event,
+        JSCustomConstructor
     ] MessageEvent : Event {
-        readonly attribute DOMString origin;
-        readonly attribute DOMString lastEventId;
-        readonly attribute DOMWindow source;
+        readonly attribute [InitializedByConstructor] DOMString origin;
+        readonly attribute [InitializedByConstructor] DOMString lastEventId;
+        readonly attribute [InitializedByConstructor] DOMWindow source;
 #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
-        readonly attribute [CachedAttribute, CustomGetter] DOMObject data;
-        readonly attribute [CustomGetter] Array ports;
+        readonly attribute [InitializedByConstructor, CachedAttribute, CustomGetter] DOMObject data;
+        readonly attribute [InitializedByConstructor, CustomGetter] Array ports;
 
         [Custom] void initMessageEvent(in [Optional=CallWithDefaultValue] DOMString typeArg, 
                                        in [Optional=CallWithDefaultValue] boolean canBubbleArg, 
index be4dfea..549f138 100644 (file)
 module events {
 
     interface [
-        CustomConstructor
+        V8ConstructorTemplate=Event,
+        JSCustomConstructor
     ] OverflowEvent : Event {
         const unsigned short HORIZONTAL = 0;
         const unsigned short VERTICAL   = 1;
         const unsigned short BOTH       = 2;
         
-        readonly attribute unsigned short orient;
-        readonly attribute boolean horizontalOverflow;
-        readonly attribute boolean verticalOverflow;        
+        readonly attribute [InitializedByConstructor] unsigned short orient;
+        readonly attribute [InitializedByConstructor] boolean horizontalOverflow;
+        readonly attribute [InitializedByConstructor] boolean verticalOverflow;
 
 #if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C
         void initOverflowEvent(in [Optional=CallWithDefaultValue] unsigned short orient,
index 2d183fd..db44b2d 100644 (file)
 module events {
 
     interface [
-        CustomConstructor
+        V8ConstructorTemplate=Event,
+        JSCustomConstructor
     ] PageTransitionEvent : Event {
-        readonly attribute boolean persisted;
+        readonly attribute [InitializedByConstructor] boolean persisted;
     };
 
 }
index 9999f6f..72e132d 100644 (file)
@@ -28,9 +28,10 @@ module events {
 
 #if !defined(LANGUAGE_CPP) || !LANGUAGE_CPP
     interface [
-        CustomConstructor
+        V8ConstructorTemplate=Event,
+        JSCustomConstructor
     ] PopStateEvent : Event {
-        readonly attribute [CustomGetter] DOMObject state;
+        readonly attribute [InitializedByConstructor, CustomGetter] DOMObject state;
     };
 #endif
 
index d969a50..d89ec24 100644 (file)
 module events {
 
     interface [
-        CustomConstructor
+        V8ConstructorTemplate=Event,
+        JSCustomConstructor
     ] ProgressEvent : Event {
-        readonly attribute boolean lengthComputable;
-        readonly attribute unsigned long long loaded;
-        readonly attribute unsigned long long total;
+        readonly attribute [InitializedByConstructor] boolean lengthComputable;
+        readonly attribute [InitializedByConstructor] unsigned long long loaded;
+        readonly attribute [InitializedByConstructor] unsigned long long total;
 
         void initProgressEvent(in [Optional=CallWithDefaultValue] DOMString typeArg,
                                in [Optional=CallWithDefaultValue] boolean canBubbleArg,
index e50ee91..c14580f 100644 (file)
 module events {
 
     interface [
-        CustomConstructor
+        V8ConstructorTemplate=Event,
+        JSCustomConstructor
     ] WebKitAnimationEvent : Event {
-     readonly attribute DOMString          animationName;
-     readonly attribute double             elapsedTime;
-     void               initWebKitAnimationEvent(in [Optional=CallWithDefaultValue] DOMString typeArg,
-                                           in [Optional=CallWithDefaultValue] boolean canBubbleArg,
-                                           in [Optional=CallWithDefaultValue] boolean cancelableArg,
-                                           in [Optional=CallWithDefaultValue] DOMString animationNameArg,
-                                           in [Optional=CallWithDefaultValue] double elapsedTimeArg);
+        readonly attribute [InitializedByConstructor] DOMString animationName;
+        readonly attribute [InitializedByConstructor] double elapsedTime;
+
+        void initWebKitAnimationEvent(in [Optional=CallWithDefaultValue] DOMString typeArg,
+                                      in [Optional=CallWithDefaultValue] boolean canBubbleArg,
+                                      in [Optional=CallWithDefaultValue] boolean cancelableArg,
+                                      in [Optional=CallWithDefaultValue] DOMString animationNameArg,
+                                      in [Optional=CallWithDefaultValue] double elapsedTimeArg);
 };
 
 }
index c8cfdfe..19f2741 100644 (file)
 module events {
 
     interface [
-        CustomConstructor
+        V8ConstructorTemplate=Event,
+        JSCustomConstructor
     ] WebKitTransitionEvent : Event {
-    readonly attribute DOMString          propertyName;
-    readonly attribute double             elapsedTime;
-    void               initWebKitTransitionEvent(in [Optional=CallWithDefaultValue] DOMString typeArg,
-                                                 in [Optional=CallWithDefaultValue] boolean canBubbleArg,
-                                                 in [Optional=CallWithDefaultValue] boolean cancelableArg,
-                                                 in [Optional=CallWithDefaultValue] DOMString propertyNameArg,
-                                                 in [Optional=CallWithDefaultValue] double elapsedTimeArg);
+    readonly attribute [InitializedByConstructor] DOMString propertyName;
+    readonly attribute [InitializedByConstructor] double elapsedTime;
+
+    void initWebKitTransitionEvent(in [Optional=CallWithDefaultValue] DOMString typeArg,
+                                   in [Optional=CallWithDefaultValue] boolean canBubbleArg,
+                                   in [Optional=CallWithDefaultValue] boolean cancelableArg,
+                                   in [Optional=CallWithDefaultValue] DOMString propertyNameArg,
+                                   in [Optional=CallWithDefaultValue] double elapsedTimeArg);
 };
 
 }
index 1c27729..1fe0a31 100644 (file)
@@ -28,11 +28,10 @@ module html {
     interface [
         Conditional=VIDEO_TRACK,
         EnabledAtRuntime=webkitVideoTrack,
-        CustomConstructor
+        V8ConstructorTemplate=Event,
+        JSCustomConstructor
     ] TrackEvent : Event {
-
-        readonly attribute [CustomGetter] object track;
-
+        readonly attribute [InitializedByConstructor, CustomGetter] object track;
     };
 
 }
index 326834a..2b2532b 100644 (file)
@@ -32,11 +32,12 @@ module events {
 
     interface [
         NoStaticTables,
-        CustomConstructor
+        V8ConstructorTemplate=Event,
+        JSCustomConstructor
     ] CloseEvent : Event {
-        readonly attribute boolean wasClean;
-        readonly attribute unsigned short code;
-        readonly attribute [ConvertingNullStringTo=Undefined] DOMString reason;
+        readonly attribute [InitializedByConstructor] boolean wasClean;
+        readonly attribute [InitializedByConstructor] unsigned short code;
+        readonly attribute [InitializedByConstructor, ConvertingNullStringTo=Undefined] DOMString reason;
     };
 
 }