Changeset 97955 in webkit
- Timestamp:
- Oct 20, 2011 2:57:28 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r97953 r97955 1 2011-10-20 Kentaro Hara <haraken@chromium.org> 2 3 Implement a MessageEvent constructor for V8 4 https://bugs.webkit.org/show_bug.cgi?id=70296 5 6 Reviewed by Adam Barth. 7 8 Enabled message-event-constructor.html for chromium, 9 since now V8 has the MessageEvent constructor. 10 11 * platform/chromium/test_expectations.txt: 12 * platform/chromium/fast/events/constructors/message-event-constructor-expected.txt: Added. 13 1 14 2011-10-20 Philippe Normand <pnormand@igalia.com> 2 15 -
trunk/LayoutTests/platform/chromium/test_expectations.txt
r97950 r97955 74 74 BUGWK60877 SKIP : loader/navigation-while-deferring-loads.html = FAIL 75 75 BUGWK60877 SKIP : loader/load-defer-resume-crash.html = FAIL 76 77 // This will soon be fixed after implementing a MessageEvent constructor for V8.78 BUGWK68883 : fast/events/constructors/message-event-constructor.html = FAIL79 76 80 77 // CSS3 Selectors3 test suite -
trunk/Source/WebCore/ChangeLog
r97954 r97955 1 2011-10-20 Kentaro Hara <haraken@chromium.org> 2 3 Implement a MessageEvent constructor for V8 4 https://bugs.webkit.org/show_bug.cgi?id=70296 5 6 Reviewed by Adam Barth. 7 8 Test: fast/events/constructors/message-event-constructor.html 9 10 * bindings/v8/OptionsObject.cpp: 11 (WebCore::OptionsObject::getKeyValue): Returns RefPtr<DOMWindow> corresponding to a given key. 12 (WebCore::OptionsObject::getKeyValue): Returns MessagePortArray corresponding to a given key. 13 * bindings/v8/OptionsObject.h: 14 * bindings/v8/custom/V8EventConstructors.cpp: Added a MessageEvent constructor. 15 * dom/MessageEvent.idl: Makes MessageEvent constructible for V8. 16 1 17 2011-10-20 Peter Rybin <peter.rybin@gmail.com> 2 18 -
trunk/Source/WebCore/bindings/v8/OptionsObject.cpp
r96208 r97955 29 29 #include "DOMStringList.h" 30 30 #include "V8Binding.h" 31 #include "V8DOMWindow.h" 32 #include "V8MessagePortCustom.h" 31 33 #include <limits> 32 34 … … 224 226 } 225 227 228 bool OptionsObject::getKeyValue(const String& key, RefPtr<DOMWindow>& value) const 229 { 230 v8::Local<v8::Value> v8Value; 231 if (!getKey(key, v8Value)) 232 return false; 233 234 DOMWindow* source = 0; 235 if (v8Value->IsObject()) { 236 v8::Handle<v8::Object> wrapper = v8::Handle<v8::Object>::Cast(v8Value); 237 v8::Handle<v8::Object> window = V8DOMWrapper::lookupDOMWrapper(V8DOMWindow::GetTemplate(), wrapper); 238 if (!window.IsEmpty()) 239 source = V8DOMWindow::toNative(window); 240 } 241 value = source; 242 return true; 243 } 244 245 bool OptionsObject::getKeyValue(const String& key, MessagePortArray& value) const 246 { 247 v8::Local<v8::Value> v8Value; 248 if (!getKey(key, v8Value)) 249 return false; 250 251 return getMessagePortArray(v8Value, value); 252 } 253 226 254 } // namespace WebCore -
trunk/Source/WebCore/bindings/v8/OptionsObject.h
r96208 r97955 27 27 #define OptionsObject_h 28 28 29 #include "MessagePort.h" 29 30 #include "PlatformString.h" 30 31 #include "ScriptValue.h" … … 34 35 35 36 class DOMStringList; 37 class DOMWindow; 36 38 class IDBKeyRange; 37 39 … … 81 83 bool getKeyValue(const String&, unsigned&) const; 82 84 bool getKeyValue(const String&, unsigned long long&) const; 85 bool getKeyValue(const String& key, RefPtr<DOMWindow>& value) const; 86 bool getKeyValue(const String& key, MessagePortArray& value) const; 83 87 84 88 private: -
trunk/Source/WebCore/bindings/v8/custom/V8EventConstructors.cpp
r97839 r97955 39 39 #include "ErrorEvent.h" 40 40 #include "HashChangeEvent.h" 41 #include "MessageEvent.h" 41 42 #include "Node.h" 42 43 #include "OverflowEvent.h" … … 57 58 #include "V8Event.h" 58 59 #include "V8HashChangeEvent.h" 60 #include "V8MessageEvent.h" 59 61 #include "V8Node.h" 60 62 #include "V8OverflowEvent.h" … … 130 132 INSTANTIATE_INITIALIZING_CONSTRUCTOR_FOR_BEFORE_LOAD_EVENT(DICTIONARY_START, DICTIONARY_END, FILL_PARENT_PROPERTIES, FILL_PROPERTY) 131 133 INSTANTIATE_INITIALIZING_CONSTRUCTOR_FOR_OVERFLOW_EVENT(DICTIONARY_START, DICTIONARY_END, FILL_PARENT_PROPERTIES, FILL_PROPERTY) 134 INSTANTIATE_INITIALIZING_CONSTRUCTOR_FOR_MESSAGE_EVENT(DICTIONARY_START, DICTIONARY_END, FILL_PARENT_PROPERTIES, FILL_PROPERTY) 132 135 133 136 -
trunk/Source/WebCore/dom/MessageEvent.idl
r97939 r97955 31 31 NoStaticTables, 32 32 CanBeConstructed, 33 JSCustomConstructor33 CustomConstructor 34 34 ] MessageEvent : Event { 35 35 readonly attribute DOMString origin;
Note: See TracChangeset
for help on using the changeset viewer.