Changeset 95352 in webkit
- Timestamp:
- Sep 16, 2011 7:01:29 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r95351 r95352 1 2011-09-16 Kentaro Hara <haraken@chromium.org> 2 3 Implement an ErrorEvent constructor for JSC 4 https://bugs.webkit.org/show_bug.cgi?id=68148 5 6 Reviewed by Sam Weinig. 7 8 error-event-constructor.html checks the behavior of the ErrorEvent constructor. 9 10 * fast/dom/constructed-objects-prototypes-expected.txt: Now window has ErrorEvent. 11 * fast/events/constructors/error-event-constructor-expected.txt: Added. 12 * fast/events/constructors/error-event-constructor.html: Added. 13 * platform/chromium/test_expectations.txt: Skipped error-event-constructor.html, since V8 does not yet have the ErrorEvent constructor. 14 1 15 2011-09-16 Adam Barth <abarth@webkit.org> 2 16 -
trunk/LayoutTests/fast/dom/constructed-objects-prototypes-expected.txt
r95279 r95352 10 10 PASS (new inner.DOMParser()).isInner is true 11 11 PASS (new inner.DOMParser()).constructor.isInner is true 12 PASS (new inner.ErrorEvent()).isInner is true 13 PASS (new inner.ErrorEvent()).constructor.isInner is true 12 14 PASS (new inner.Event()).isInner is true 13 15 PASS (new inner.Event()).constructor.isInner is true -
trunk/LayoutTests/platform/chromium/test_expectations.txt
r95350 r95352 60 60 // Implement java testing harness. 61 61 BUGCR36681 SKIP : java = TEXT 62 63 // This will soon be fixed after implementing an ErrorEvent constructor for V8. 64 BUGWK68148 : fast/events/constructors/error-event-constructor.html = FAIL 62 65 63 66 // Quota API is not supported in DRT yet. -
trunk/Source/WebCore/ChangeLog
r95350 r95352 1 2011-09-16 Kentaro Hara <haraken@chromium.org> 2 3 Implement an ErrorEvent constructor for JSC 4 https://bugs.webkit.org/show_bug.cgi?id=68148 5 6 Reviewed by Sam Weinig. 7 8 The spec for the ErrorEvent constructor is here: 9 http://dev.w3.org/html5/workers/#errorevent 10 11 Test: fast/events/constructors/error-event-constructor.html 12 13 * bindings/generic/EventConstructors.h: Added a definition for the ErrorEvent constructor. 14 * bindings/js/JSEventConstructors.cpp: Added #includes for ErrorEvent. 15 * dom/ErrorEvent.cpp: 16 (WebCore::ErrorEventInit::ErrorEventInit): 17 (WebCore::ErrorEvent::ErrorEvent): 18 (WebCore::ErrorEvent::initErrorEvent): 19 (WebCore::ErrorEvent::isErrorEvent): 20 * dom/ErrorEvent.h: Added a definition for ErrorEventInit. 21 (WebCore::ErrorEvent::create): 22 (WebCore::ErrorEvent::message): 23 (WebCore::ErrorEvent::filename): 24 (WebCore::ErrorEvent::lineno): 25 * dom/ErrorEvent.idl: Makes ErrorEvent constructible. 26 1 27 2011-09-16 Kentaro Hara <haraken@google.com> 2 28 -
trunk/Source/WebCore/bindings/generic/EventConstructors.h
r95262 r95352 82 82 DICTIONARY_END(PopStateEvent) 83 83 84 #define INSTANTIATE_INITIALIZING_CONSTRUCTOR_FOR_ERROR_EVENT(DICTIONARY_START, DICTIONARY_END, FILL_PARENT_PROPERTIES, FILL_PROPERTY) \ 85 \ 86 DICTIONARY_START(ErrorEvent) \ 87 FILL_PARENT_PROPERTIES(Event) \ 88 FILL_PROPERTY(message) \ 89 FILL_PROPERTY(filename) \ 90 FILL_PROPERTY(lineno) \ 91 DICTIONARY_END(ErrorEvent) 92 84 93 85 94 #define INSTANTIATE_ALL_EVENT_INITIALIZING_CONSTRUCTORS(DICTIONARY_START, DICTIONARY_END, FILL_PARENT_PROPERTIES, FILL_PROPERTY) \ … … 91 100 INSTANTIATE_INITIALIZING_CONSTRUCTOR_FOR_PAGE_TRANSITION_EVENT(DICTIONARY_START, DICTIONARY_END, FILL_PARENT_PROPERTIES, FILL_PROPERTY) \ 92 101 INSTANTIATE_INITIALIZING_CONSTRUCTOR_FOR_POP_STATE_EVENT(DICTIONARY_START, DICTIONARY_END, FILL_PARENT_PROPERTIES, FILL_PROPERTY) \ 102 INSTANTIATE_INITIALIZING_CONSTRUCTOR_FOR_ERROR_EVENT(DICTIONARY_START, DICTIONARY_END, FILL_PARENT_PROPERTIES, FILL_PROPERTY) \ 93 103 94 104 } // namespace WebCore -
trunk/Source/WebCore/bindings/js/JSEventConstructors.cpp
r95262 r95352 28 28 29 29 #include "CustomEvent.h" 30 #include "ErrorEvent.h" 30 31 #include "Event.h" 31 32 #include "HashChangeEvent.h" 32 33 #include "JSCustomEvent.h" 33 34 #include "JSDictionary.h" 35 #include "JSErrorEvent.h" 34 36 #include "JSEvent.h" 35 37 #include "JSHashChangeEvent.h" -
trunk/Source/WebCore/dom/ErrorEvent.cpp
r76216 r95352 37 37 namespace WebCore { 38 38 39 ErrorEventInit::ErrorEventInit() 40 : message() 41 , filename() 42 , lineno(0) 43 { 44 } 45 39 46 ErrorEvent::ErrorEvent() 47 { 48 } 49 50 ErrorEvent::ErrorEvent(const AtomicString& type, const ErrorEventInit& initializer) 51 : Event(type, initializer) 52 , m_message(initializer.message) 53 , m_fileName(initializer.filename) 54 , m_lineNumber(initializer.lineno) 40 55 { 41 56 } … … 57 72 if (dispatched()) 58 73 return; 59 74 60 75 initEvent(type, canBubble, cancelable); 61 76 62 77 m_message = message; 63 78 m_fileName = fileName; … … 65 80 } 66 81 67 bool ErrorEvent::isErrorEvent() const 82 bool ErrorEvent::isErrorEvent() const 68 83 { 69 84 return true; -
trunk/Source/WebCore/dom/ErrorEvent.h
r76216 r95352 37 37 namespace WebCore { 38 38 39 class ErrorEvent : public Event { 40 public: 41 static PassRefPtr<ErrorEvent> create() 42 { 43 return adoptRef(new ErrorEvent); 44 } 45 static PassRefPtr<ErrorEvent> create(const String& message, const String& fileName, unsigned lineNumber) 46 { 47 return adoptRef(new ErrorEvent(message, fileName, lineNumber)); 48 } 49 virtual ~ErrorEvent(); 39 struct ErrorEventInit : public EventInit { 40 ErrorEventInit(); 50 41 51 void initErrorEvent(const AtomicString& type, bool canBubble, bool cancelable, const String& message, const String& fileName, unsigned lineNumber); 42 String message; 43 String filename; 44 unsigned lineno; 45 }; 52 46 53 const String& message() const { return m_message; } 54 const String& filename() const { return m_fileName; } 55 unsigned lineno() const { return m_lineNumber; } 47 class ErrorEvent : public Event { 48 public: 49 static PassRefPtr<ErrorEvent> create() 50 { 51 return adoptRef(new ErrorEvent); 52 } 53 static PassRefPtr<ErrorEvent> create(const String& message, const String& fileName, unsigned lineNumber) 54 { 55 return adoptRef(new ErrorEvent(message, fileName, lineNumber)); 56 } 57 static PassRefPtr<ErrorEvent> create(const AtomicString& type, const ErrorEventInit& initializer) 58 { 59 return adoptRef(new ErrorEvent(type, initializer)); 60 } 61 virtual ~ErrorEvent(); 56 62 57 virtual bool isErrorEvent() const;63 void initErrorEvent(const AtomicString& type, bool canBubble, bool cancelable, const String& message, const String& fileName, unsigned lineNumber); 58 64 59 private:60 ErrorEvent();61 ErrorEvent(const String& message, const String& fileName, unsigned lineNumber);65 const String& message() const { return m_message; } 66 const String& filename() const { return m_fileName; } 67 unsigned lineno() const { return m_lineNumber; } 62 68 63 String m_message; 64 String m_fileName; 65 unsigned m_lineNumber; 66 }; 69 virtual bool isErrorEvent() const; 70 71 private: 72 ErrorEvent(); 73 ErrorEvent(const String& message, const String& fileName, unsigned lineNumber); 74 ErrorEvent(const AtomicString&, const ErrorEventInit&); 75 76 String m_message; 77 String m_fileName; 78 unsigned m_lineNumber; 79 }; 67 80 68 81 } // namespace WebCore -
trunk/Source/WebCore/dom/ErrorEvent.idl
r94493 r95352 32 32 33 33 interface [ 34 NoStaticTables 34 NoStaticTables, 35 CanBeConstructed, 36 CustomConstructFunction 35 37 ] ErrorEvent : Event { 36 38
Note: See TracChangeset
for help on using the changeset viewer.