mirror of
https://github.com/lexmount/moli.git
synced 2026-11-06 08:07:25 +00:00
fix(webidl): finish dictionary ordering migration
Convert inherited EventInit fields before ICE error event payload members. Update the video decoder getter trace to match lexical dictionary member ordering.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use crate::{
|
||||
context_bootstrap::events::{
|
||||
event_private_value, initialize_event_object_with_type, initialize_event_wrapper,
|
||||
new_event_state,
|
||||
EventInit, event_private_value, initialize_event_object_with_type,
|
||||
initialize_event_wrapper, new_event_state,
|
||||
},
|
||||
util::{
|
||||
apply_webidl_constructor_prototype_fallback, callback_data_index_value, callback_data_item,
|
||||
@@ -29,12 +29,8 @@ const PAYLOAD_SLOTS: &[&str] = &[
|
||||
#[webidl(prefix = "RTCPeerConnectionIceErrorEventInit")]
|
||||
struct Init {
|
||||
// EventInit precedes derived members, which are converted lexically.
|
||||
#[webidl(default = false)]
|
||||
bubbles: bool,
|
||||
#[webidl(default = false)]
|
||||
cancelable: bool,
|
||||
#[webidl(default = false)]
|
||||
composed: bool,
|
||||
#[webidl(inherit)]
|
||||
base: EventInit,
|
||||
#[webidl(nullable, converter = "raw")]
|
||||
address: Option<webidl::DomString16>,
|
||||
#[webidl(required)]
|
||||
@@ -157,11 +153,11 @@ pub(in crate::context_bootstrap) fn rtc_peer_connection_ice_error_event_construc
|
||||
scope,
|
||||
state,
|
||||
event_type,
|
||||
parsed.init.bubbles,
|
||||
parsed.init.cancelable,
|
||||
parsed.init.base.bubbles,
|
||||
parsed.init.base.cancelable,
|
||||
);
|
||||
let declaration = StateDeclaration::new(
|
||||
parsed.init.composed,
|
||||
parsed.init.base.composed,
|
||||
address,
|
||||
parsed.init.error_code,
|
||||
error_text,
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
const ordered = new Proxy(config, {get(target, key, receiver) { reads.push(key); return Reflect.get(target, key, receiver); }});
|
||||
await query(ordered);
|
||||
const expected = encoder ? ['alpha','bitrate','bitrateMode','codec','contentHint','displayHeight','displayWidth','framerate','hardwareAcceleration','height','latencyMode','scalabilityMode','width']
|
||||
: ['codedHeight','codedWidth','codec','colorSpace','description','displayAspectHeight','displayAspectWidth','flip','hardwareAcceleration','optimizeForLatency','rotation'];
|
||||
: ['codec','codedHeight','codedWidth','colorSpace','description','displayAspectHeight','displayAspectWidth','flip','hardwareAcceleration','optimizeForLatency','rotation'];
|
||||
assert(JSON.stringify(reads) === JSON.stringify(expected), name + ' dictionary getter order');
|
||||
const unsupported = await query({...config, codec: 'not-a-supported-codec'});
|
||||
assert(unsupported.supported === false, name + ' unknown codec is unsupported, not invalid');
|
||||
|
||||
Reference in New Issue
Block a user