зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1311252 - Make MediaKeyMessageEvent.webidl patch spec. r=smaug
Update our copy of EncryptedMediaExtensions.idl to match upstream Web Platform Tests, so we keep passing. MozReview-Commit-ID: IHaVX45GrYx --HG-- extra : rebase_source : 204f91e383f8318e0d4e6d9e774ce1d87f90ee4d
This commit is contained in:
Родитель
6790a0b48f
Коммит
be095f96c0
|
@ -85,15 +85,10 @@ MediaKeyMessageEvent::Constructor(const GlobalObject& aGlobal,
|
|||
RefPtr<MediaKeyMessageEvent> e = new MediaKeyMessageEvent(owner);
|
||||
bool trusted = e->Init(owner);
|
||||
e->InitEvent(aType, aEventInitDict.mBubbles, aEventInitDict.mCancelable);
|
||||
const uint8_t* data = nullptr;
|
||||
size_t length = 0;
|
||||
if (aEventInitDict.mMessage.WasPassed()) {
|
||||
const auto& a = aEventInitDict.mMessage.Value();
|
||||
a.ComputeLengthAndData();
|
||||
data = a.Data();
|
||||
length = a.Length();
|
||||
}
|
||||
e->mMessage = ArrayBuffer::Create(aGlobal.Context(), length, data);
|
||||
aEventInitDict.mMessage.ComputeLengthAndData();
|
||||
e->mMessage = ArrayBuffer::Create(aGlobal.Context(),
|
||||
aEventInitDict.mMessage.Length(),
|
||||
aEventInitDict.mMessage.Data());
|
||||
if (!e->mMessage) {
|
||||
aRv.Throw(NS_ERROR_OUT_OF_MEMORY);
|
||||
return nullptr;
|
||||
|
|
|
@ -17,7 +17,7 @@ enum MediaKeyMessageType {
|
|||
"individualization-request"
|
||||
};
|
||||
|
||||
[Pref="media.eme.apiVisible", Constructor(DOMString type, optional MediaKeyMessageEventInit eventInitDict)]
|
||||
[Pref="media.eme.apiVisible", Constructor(DOMString type, MediaKeyMessageEventInit eventInitDict)]
|
||||
interface MediaKeyMessageEvent : Event {
|
||||
readonly attribute MediaKeyMessageType messageType;
|
||||
[Throws]
|
||||
|
@ -25,6 +25,6 @@ interface MediaKeyMessageEvent : Event {
|
|||
};
|
||||
|
||||
dictionary MediaKeyMessageEventInit : EventInit {
|
||||
MediaKeyMessageType messageType = "license-request";
|
||||
ArrayBuffer message;
|
||||
required MediaKeyMessageType messageType;
|
||||
required ArrayBuffer message;
|
||||
};
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
// which this IDL was extracted.
|
||||
//
|
||||
// https://www.w3.org/TR/2016/WD-encrypted-media-20160610/
|
||||
// + commit 5499821932391ae2c2e53756ae7ab9fae89d5863
|
||||
//
|
||||
|
||||
partial interface Navigator {
|
||||
|
@ -86,15 +87,15 @@ enum MediaKeyMessageType {
|
|||
"individualization-request"
|
||||
};
|
||||
|
||||
[ Constructor (DOMString type, optional MediaKeyMessageEventInit eventInitDict)]
|
||||
[Constructor(DOMString type, MediaKeyMessageEventInit eventInitDict)]
|
||||
interface MediaKeyMessageEvent : Event {
|
||||
readonly attribute MediaKeyMessageType messageType;
|
||||
readonly attribute ArrayBuffer message;
|
||||
};
|
||||
|
||||
dictionary MediaKeyMessageEventInit : EventInit {
|
||||
MediaKeyMessageType messageType = "license-request";
|
||||
ArrayBuffer message;
|
||||
required MediaKeyMessageType messageType;
|
||||
required ArrayBuffer message;
|
||||
};
|
||||
|
||||
// partial interface HTMLMediaElement : EventTarget {
|
||||
|
@ -105,7 +106,7 @@ partial interface HTMLMediaElement {
|
|||
Promise<void> setMediaKeys (MediaKeys? mediaKeys);
|
||||
};
|
||||
|
||||
[ Constructor (DOMString type, optional MediaEncryptedEventInit eventInitDict)]
|
||||
[Constructor(DOMString type, optional MediaEncryptedEventInit eventInitDict)]
|
||||
interface MediaEncryptedEvent : Event {
|
||||
readonly attribute DOMString initDataType;
|
||||
readonly attribute ArrayBuffer? initData;
|
||||
|
|
Загрузка…
Ссылка в новой задаче