Changeset 207277 in webkit
- Timestamp:
- Oct 12, 2016 10:18:59 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r207276 r207277 1 2016-10-12 Chris Dumez <cdumez@apple.com> 2 3 Update WebKitMediaKeyMessageEvent / WebKitMediaKeyNeededEvent to stop using legacy [ConstructorTemplate=Event] 4 https://bugs.webkit.org/show_bug.cgi?id=163369 5 6 Reviewed by Ryosuke Niwa. 7 8 Add layout test coverage. 9 10 * fast/events/webkit-media-key-events-constructor-expected.txt: Added. 11 * fast/events/webkit-media-key-events-constructor.html: Added. 12 1 13 2016-10-12 Chris Dumez <cdumez@apple.com> 2 14 -
trunk/LayoutTests/platform/ios-simulator/TestExpectations
r207245 r207277 2657 2657 fast/events/page-visibility-iframe-move-test.html [ Skip ] 2658 2658 2659 # LEGACY_ENCRYPTED_MEDIA is disabled on iOS. 2660 fast/events/webkit-media-key-events-constructor.html [ Failure ] 2661 2659 2662 webkit.org/b/161143 imported/w3c/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-samedoc.html [ Pass Failure ] 2660 2663 -
trunk/Source/WebCore/ChangeLog
r207276 r207277 1 2016-10-12 Chris Dumez <cdumez@apple.com> 2 3 Update WebKitMediaKeyMessageEvent / WebKitMediaKeyNeededEvent to stop using legacy [ConstructorTemplate=Event] 4 https://bugs.webkit.org/show_bug.cgi?id=163369 5 6 Reviewed by Ryosuke Niwa. 7 8 Update WebKitMediaKeyMessageEvent / WebKitMediaKeyNeededEvent to stop 9 using legacy [ConstructorTemplate=Event] and use regular constructors 10 instead. 11 12 This also adds support for having dictionary members that are typed 13 arrays because this was needed. 14 15 Test: fast/events/webkit-media-key-events-constructor.html 16 17 * Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.cpp: 18 (WebCore::WebKitMediaKeyMessageEvent::WebKitMediaKeyMessageEvent): 19 * Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.h: 20 (WebCore::WebKitMediaKeyMessageEvent::create): 21 (WebCore::WebKitMediaKeyMessageEvent::createForBindings): Deleted. 22 * Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.idl: 23 * Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.cpp: 24 (WebCore::WebKitMediaKeyNeededEvent::WebKitMediaKeyNeededEvent): 25 * Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.h: 26 (WebCore::WebKitMediaKeyNeededEvent::create): 27 (WebCore::WebKitMediaKeyNeededEvent::createForBindings): Deleted. 28 * Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.idl: 29 * bindings/js/JSDOMConvert.h: 30 (WebCore::Converter<IDLInterface<JSC::GenericTypedArrayView<Adaptor>>>::convert): 31 * bindings/scripts/CodeGeneratorJS.pm: 32 (GenerateDefaultValue): 33 * dom/InputEvent.cpp: 34 (WebCore::InputEvent::InputEvent): 35 * dom/InputEvent.h: 36 * dom/InputEvent.idl: 37 1 38 2016-10-12 Chris Dumez <cdumez@apple.com> 2 39 -
trunk/Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.cpp
r206983 r207277 42 42 43 43 44 WebKitMediaKeyMessageEvent::WebKitMediaKeyMessageEvent(const AtomicString& type, const WebKitMediaKeyMessageEventInit& initializer)45 : Event(type, initializer )44 WebKitMediaKeyMessageEvent::WebKitMediaKeyMessageEvent(const AtomicString& type, const Init& initializer, IsTrusted isTrusted) 45 : Event(type, initializer, isTrusted) 46 46 , m_message(initializer.message) 47 47 , m_destinationURL(initializer.destinationURL) -
trunk/Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.h
r206983 r207277 35 35 namespace WebCore { 36 36 37 struct WebKitMediaKeyMessageEventInit : public EventInit {38 RefPtr<Uint8Array> message;39 String destinationURL;40 };41 42 37 class WebKitMediaKeyMessageEvent : public Event { 43 38 public: … … 49 44 } 50 45 51 static Ref<WebKitMediaKeyMessageEvent> createForBindings(const AtomicString& type, const WebKitMediaKeyMessageEventInit& initializer) 46 struct Init : EventInit { 47 RefPtr<Uint8Array> message; 48 String destinationURL; 49 }; 50 51 static Ref<WebKitMediaKeyMessageEvent> create(const AtomicString& type, const Init& initializer, IsTrusted isTrusted = IsTrusted::No) 52 52 { 53 return adoptRef(*new WebKitMediaKeyMessageEvent(type, initializer ));53 return adoptRef(*new WebKitMediaKeyMessageEvent(type, initializer, isTrusted)); 54 54 } 55 55 … … 61 61 private: 62 62 WebKitMediaKeyMessageEvent(const AtomicString& type, Uint8Array* message, const String& destinationURL); 63 WebKitMediaKeyMessageEvent(const AtomicString& type, const WebKitMediaKeyMessageEventInit& initializer);63 WebKitMediaKeyMessageEvent(const AtomicString& type, const Init&, IsTrusted); 64 64 65 65 RefPtr<Uint8Array> m_message; -
trunk/Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.idl
r206983 r207277 26 26 [ 27 27 Conditional=LEGACY_ENCRYPTED_MEDIA, 28 Constructor Template=Event,28 Constructor(DOMString type, optional WebKitMediaKeyMessageEventInit eventInitDict), 29 29 ] interface WebKitMediaKeyMessageEvent : Event { 30 30 readonly attribute Uint8Array message; 31 [InitializedByEventConstructor]readonly attribute DOMString destinationURL;31 readonly attribute DOMString destinationURL; 32 32 }; 33 33 34 dictionary WebKitMediaKeyMessageEventInit : EventInit { 35 Uint8Array? message = null; 36 DOMString destinationURL = ""; 37 }; -
trunk/Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.cpp
r206983 r207277 40 40 } 41 41 42 WebKitMediaKeyNeededEvent::WebKitMediaKeyNeededEvent(const AtomicString& type, const WebKitMediaKeyNeededEventInit& initializer)43 : Event(type, initializer )42 WebKitMediaKeyNeededEvent::WebKitMediaKeyNeededEvent(const AtomicString& type, const Init& initializer, IsTrusted isTrusted) 43 : Event(type, initializer, isTrusted) 44 44 , m_initData(initializer.initData) 45 45 { -
trunk/Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.h
r206983 r207277 34 34 namespace WebCore { 35 35 36 struct WebKitMediaKeyNeededEventInit : public EventInit {37 RefPtr<Uint8Array> initData;38 };39 40 36 class WebKitMediaKeyNeededEvent : public Event { 41 37 public: … … 47 43 } 48 44 49 static Ref<WebKitMediaKeyNeededEvent> createForBindings(const AtomicString& type, const WebKitMediaKeyNeededEventInit& initializer) 45 struct Init : EventInit { 46 RefPtr<Uint8Array> initData; 47 }; 48 49 static Ref<WebKitMediaKeyNeededEvent> create(const AtomicString& type, const Init& initializer, IsTrusted isTrusted = IsTrusted::No) 50 50 { 51 return adoptRef(*new WebKitMediaKeyNeededEvent(type, initializer ));51 return adoptRef(*new WebKitMediaKeyNeededEvent(type, initializer, isTrusted)); 52 52 } 53 53 … … 58 58 private: 59 59 WebKitMediaKeyNeededEvent(const AtomicString& type, Uint8Array* initData); 60 WebKitMediaKeyNeededEvent(const AtomicString& type, const WebKitMediaKeyNeededEventInit& initializer);60 WebKitMediaKeyNeededEvent(const AtomicString& type, const Init&, IsTrusted); 61 61 62 62 RefPtr<Uint8Array> m_initData; -
trunk/Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.idl
r206983 r207277 26 26 [ 27 27 Conditional=LEGACY_ENCRYPTED_MEDIA, 28 Constructor Template=Event28 Constructor(DOMString type, optional WebKitMediaKeyNeededEventInit eventInitDict), 29 29 ] interface WebKitMediaKeyNeededEvent : Event { 30 30 readonly attribute Uint8Array initData; 31 31 }; 32 32 33 dictionary WebKitMediaKeyNeededEventInit : EventInit { 34 Uint8Array? initData = null; 35 }; -
trunk/Source/WebCore/bindings/js/JSDOMConvert.h
r207158 r207277 122 122 }; 123 123 124 125 // Typed arrays support. 126 127 template<typename Adaptor> struct IDLInterface<JSC::GenericTypedArrayView<Adaptor>> : IDLType<Ref<JSC::GenericTypedArrayView<Adaptor>>> { 128 using RawType = JSC::GenericTypedArrayView<Adaptor>; 129 using NullableType = RefPtr<JSC::GenericTypedArrayView<Adaptor>>; 130 }; 131 132 template<typename Adaptor> struct Converter<IDLInterface<JSC::GenericTypedArrayView<Adaptor>>> : DefaultConverter<IDLInterface<JSC::GenericTypedArrayView<Adaptor>>> { 133 using ReturnType = RefPtr<JSC::GenericTypedArrayView<Adaptor>>; 134 135 static ReturnType convert(JSC::ExecState& state, JSC::JSValue value) 136 { 137 JSC::VM& vm = state.vm(); 138 auto scope = DECLARE_THROW_SCOPE(vm); 139 ReturnType object = JSC::toNativeTypedView<Adaptor>(value); 140 if (!object) 141 throwTypeError(&state, scope); 142 return object; 143 } 144 }; 145 124 146 // MARK: - 125 147 // MARK: Any type -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r207243 r207277 996 996 if ($defaultValue eq "null") { 997 997 return "jsNull()" if $member->type eq "any"; 998 return "nullptr" if $codeGenerator->IsWrapperType($member->type) ;998 return "nullptr" if $codeGenerator->IsWrapperType($member->type) || $codeGenerator->IsTypedArrayType($member->type); 999 999 return "String()" if $codeGenerator->IsStringType($member->type); 1000 1000 return "Nullopt"; -
trunk/Source/WebCore/dom/InputEvent.cpp
r207010 r207277 42 42 } 43 43 44 InputEvent::InputEvent(const AtomicString& eventType, const In putEventInit& initializer)45 : UIEvent(eventType, initializer )44 InputEvent::InputEvent(const AtomicString& eventType, const Init& initializer, IsTrusted isTrusted) 45 : UIEvent(eventType, initializer, isTrusted) 46 46 , m_inputType(emptyString()) 47 47 , m_data(initializer.data) -
trunk/Source/WebCore/dom/InputEvent.h
r207010 r207277 33 33 class DataTransfer; 34 34 35 struct InputEventInit : UIEventInit {36 String data;37 bool isComposing;38 };39 40 35 class InputEvent final : public UIEvent { 41 36 public: … … 45 40 } 46 41 47 static Ref<InputEvent> createForBindings(const AtomicString& type, const InputEventInit& initializer) 42 struct Init : UIEventInit { 43 String data; 44 }; 45 46 static Ref<InputEvent> create(const AtomicString& type, const Init& initializer, IsTrusted isTrusted = IsTrusted::No) 48 47 { 49 return adoptRef(*new InputEvent(type, initializer ));48 return adoptRef(*new InputEvent(type, initializer, isTrusted)); 50 49 } 51 50 52 51 InputEvent(const AtomicString& eventType, const String& inputType, bool canBubble, bool cancelable, DOMWindow*, const String& data, int detail); 53 InputEvent(const AtomicString& eventType, const In putEventInit&);52 InputEvent(const AtomicString& eventType, const Init&, IsTrusted); 54 53 55 54 virtual ~InputEvent() { } -
trunk/Source/WebCore/dom/InputEvent.idl
r207010 r207277 25 25 26 26 [ 27 Constructor Template=Event27 Constructor(DOMString type, optional InputEventInit eventInitDict), 28 28 ] interface InputEvent : UIEvent { 29 29 readonly attribute DOMString inputType; 30 [InitializedByEventConstructor]readonly attribute DOMString? data;30 readonly attribute DOMString? data; 31 31 }; 32 33 dictionary InputEventInit : UIEventInit { 34 DOMString? data = null; 35 };
Note: See TracChangeset
for help on using the changeset viewer.