Changeset 94147 in webkit
- Timestamp:
- Aug 30, 2011 9:04:06 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r94143 r94147 1 2011-08-30 Sam Weinig <sam@webkit.org> 2 3 Add constructor for CustomEvent 4 https://bugs.webkit.org/show_bug.cgi?id=67248 5 6 Reviewed by Dan Bernstein. 7 8 * fast/events/constructors/custom-event-constructor-expected.txt: Added. 9 * fast/events/constructors/custom-event-constructor.html: Added. 10 New test. 11 12 * fast/dom/constructed-objects-prototypes-expected.txt: 13 * platform/mac/fast/dom/Window/window-properties-expected.txt: 14 * platform/mac/fast/dom/Window/window-property-descriptors-expected.txt: 15 * platform/mac/fast/dom/prototype-inheritance-expected.txt: 16 * platform/mac/fast/js/global-constructors-expected.txt: 17 Updated for add window.CustomEvent. 18 1 19 2011-08-30 David Levin <levin@chromium.org> 2 20 -
trunk/LayoutTests/fast/dom/constructed-objects-prototypes-expected.txt
r93994 r94147 6 6 PASS (new inner.Audio()).isInner is true 7 7 PASS (new inner.Audio()).constructor.isInner is true 8 PASS (new inner.CustomEvent()).isInner is true 9 PASS (new inner.CustomEvent()).constructor.isInner is true 8 10 PASS (new inner.DOMParser()).isInner is true 9 11 PASS (new inner.DOMParser()).constructor.isInner is true -
trunk/LayoutTests/platform/mac/fast/dom/Window/window-properties-expected.txt
r93997 r94147 510 510 window.Counter [object CounterConstructor] 511 511 window.Counter.prototype [object CounterPrototype] 512 window.CustomEvent [object CustomEventConstructor] 513 window.CustomEvent.prototype [object CustomEventPrototype] 514 window.CustomEvent.prototype.AT_TARGET [number] 515 window.CustomEvent.prototype.BLUR [number] 516 window.CustomEvent.prototype.BUBBLING_PHASE [number] 517 window.CustomEvent.prototype.CAPTURING_PHASE [number] 518 window.CustomEvent.prototype.CHANGE [number] 519 window.CustomEvent.prototype.CLICK [number] 520 window.CustomEvent.prototype.DBLCLICK [number] 521 window.CustomEvent.prototype.DRAGDROP [number] 522 window.CustomEvent.prototype.FOCUS [number] 523 window.CustomEvent.prototype.KEYDOWN [number] 524 window.CustomEvent.prototype.KEYPRESS [number] 525 window.CustomEvent.prototype.KEYUP [number] 526 window.CustomEvent.prototype.MOUSEDOWN [number] 527 window.CustomEvent.prototype.MOUSEDRAG [number] 528 window.CustomEvent.prototype.MOUSEMOVE [number] 529 window.CustomEvent.prototype.MOUSEOUT [number] 530 window.CustomEvent.prototype.MOUSEOVER [number] 531 window.CustomEvent.prototype.MOUSEUP [number] 532 window.CustomEvent.prototype.SELECT [number] 533 window.CustomEvent.prototype.initCustomEvent [function] 534 window.CustomEvent.prototype.initEvent [function] 535 window.CustomEvent.prototype.preventDefault [function] 536 window.CustomEvent.prototype.stopImmediatePropagation [function] 537 window.CustomEvent.prototype.stopPropagation [function] 512 538 window.DOMException [object DOMExceptionConstructor] 513 539 window.DOMException.ABORT_ERR [number] -
trunk/LayoutTests/platform/mac/fast/dom/Window/window-property-descriptors-expected.txt
r93997 r94147 34 34 PASS typeof Object.getOwnPropertyDescriptor(window, 'Comment') is 'object' 35 35 PASS typeof Object.getOwnPropertyDescriptor(window, 'Counter') is 'object' 36 PASS typeof Object.getOwnPropertyDescriptor(window, 'CustomEvent') is 'object' 36 37 PASS typeof Object.getOwnPropertyDescriptor(window, 'DOMException') is 'object' 37 38 PASS typeof Object.getOwnPropertyDescriptor(window, 'DOMImplementation') is 'object' -
trunk/LayoutTests/platform/mac/fast/dom/prototype-inheritance-expected.txt
r93997 r94147 64 64 PASS inner.Counter.isInner is true 65 65 PASS inner.Counter.constructor.isInner is true 66 PASS inner.CustomEvent.isInner is true 67 PASS inner.CustomEvent.constructor.isInner is true 66 68 PASS inner.DOMException.isInner is true 67 69 PASS inner.DOMException.constructor.isInner is true -
trunk/LayoutTests/platform/mac/fast/js/global-constructors-expected.txt
r93491 r94147 32 32 PASS Comment.toString() is '[object CommentConstructor]' 33 33 PASS Counter.toString() is '[object CounterConstructor]' 34 PASS CustomEvent.toString() is '[object CustomEventConstructor]' 34 35 PASS DOMException.toString() is '[object DOMExceptionConstructor]' 35 36 PASS DOMImplementation.toString() is '[object DOMImplementationConstructor]' -
trunk/Source/WebCore/ChangeLog
r94142 r94147 1 2011-08-30 Sam Weinig <sam@webkit.org> 2 3 Add constructor for CustomEvent 4 https://bugs.webkit.org/show_bug.cgi?id=67248 5 6 Reviewed by Dan Bernstein. 7 8 Test: fast/events/constructors/custom-event-constructor.html 9 10 * bindings/generic/EventConstructors.h: 11 Add definition for CustomEvent constructor. 12 13 * bindings/js/JSEventConstructors.cpp: 14 Add CustomEvent #includes. 15 16 * dom/CustomEvent.cpp: 17 (WebCore::CustomEventInit::CustomEventInit): 18 (WebCore::CustomEvent::CustomEvent): 19 * dom/CustomEvent.h: 20 (WebCore::CustomEvent::create): 21 Add Initializer./ 22 23 * dom/CustomEvent.idl: 24 Make constructible. 25 26 * page/DOMWindow.idl: 27 Add CustomEvent attribute. 28 1 29 2011-08-30 Ryosuke Niwa <rniwa@webkit.org> 2 30 -
trunk/Source/WebCore/bindings/generic/EventConstructors.h
r93951 r94147 36 36 DICTIONARY_END(Event) 37 37 38 #define INSTANTIATE_INITIALIZING_CONSTRUCTOR_FOR_CUSTOM_EVENT(DICTIONARY_START, DICTIONARY_END, FILL_PARENT_PROPERTIES, FILL_PROPERTY) \ 39 \ 40 DICTIONARY_START(CustomEvent) \ 41 FILL_PARENT_PROPERTIES(Event) \ 42 FILL_PROPERTY(detail) \ 43 DICTIONARY_END(CustomEvent) 44 38 45 39 46 #define INSTANTIATE_ALL_EVENT_INITIALIZING_CONSTRUCTORS(DICTIONARY_START, DICTIONARY_END, FILL_PARENT_PROPERTIES, FILL_PROPERTY) \ 40 47 INSTANTIATE_INITIALIZING_CONSTRUCTOR_FOR_EVENT(DICTIONARY_START, DICTIONARY_END, FILL_PARENT_PROPERTIES, FILL_PROPERTY) \ 48 INSTANTIATE_INITIALIZING_CONSTRUCTOR_FOR_CUSTOM_EVENT(DICTIONARY_START, DICTIONARY_END, FILL_PARENT_PROPERTIES, FILL_PROPERTY) \ 41 49 42 50 } // namespace WebCore -
trunk/Source/WebCore/bindings/js/JSEventConstructors.cpp
r94123 r94147 27 27 #include "EventConstructors.h" 28 28 29 #include "CustomEvent.h" 29 30 #include "Event.h" 31 #include "JSCustomEvent.h" 30 32 #include "JSDictionary.h" 31 33 #include "JSEvent.h" -
trunk/Source/WebCore/dom/CustomEvent.cpp
r69437 r94147 27 27 #include "CustomEvent.h" 28 28 29 #include "EventNames.h"30 31 29 namespace WebCore { 32 30 31 CustomEventInit::CustomEventInit() 32 { 33 } 34 35 33 36 CustomEvent::CustomEvent() 37 { 38 } 39 40 CustomEvent::CustomEvent(const AtomicString& type, const CustomEventInit& initializer) 41 : Event(type, initializer) 42 , m_detail(initializer.detail) 34 43 { 35 44 } -
trunk/Source/WebCore/dom/CustomEvent.h
r69437 r94147 29 29 #include "Event.h" 30 30 #include "ScriptValue.h" 31 #include <wtf/text/AtomicString.h>32 31 33 32 namespace WebCore { 33 34 struct CustomEventInit : public EventInit { 35 CustomEventInit(); 36 37 ScriptValue detail; 38 }; 34 39 35 40 class CustomEvent : public Event { … … 42 47 } 43 48 49 static PassRefPtr<CustomEvent> create(const AtomicString& type, const CustomEventInit& initializer) 50 { 51 return adoptRef(new CustomEvent(type, initializer)); 52 } 53 44 54 void initCustomEvent(const AtomicString& type, bool canBubble, bool cancelable, ScriptValue detail); 45 55 … … 50 60 private: 51 61 CustomEvent(); 62 CustomEvent(const AtomicString& type, const CustomEventInit& initializer); 52 63 53 64 ScriptValue m_detail; -
trunk/Source/WebCore/dom/CustomEvent.idl
r91617 r94147 28 28 #if !defined(LANGUAGE_CPP) || !LANGUAGE_CPP 29 29 // Introduced in DOM Level 3: 30 interface CustomEvent : Event { 30 interface [ 31 CanBeConstructed, 32 CustomConstructFunction 33 ] CustomEvent : Event { 31 34 32 35 readonly attribute DOMObject detail; -
trunk/Source/WebCore/page/DOMWindow.idl
r93482 r94147 520 520 521 521 attribute EventConstructor Event; 522 attribute CustomEventConstructor CustomEvent; 523 522 524 attribute BeforeLoadEventConstructor BeforeLoadEvent; 523 525 attribute HashChangeEventConstructor HashChangeEvent;
Note: See TracChangeset
for help on using the changeset viewer.