Skip to content

Commit

Permalink
Sync interfaces/ with @webref/idl 2.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
wpt-pr-bot authored Jun 10, 2021
1 parent 0895a4d commit 0717634
Show file tree
Hide file tree
Showing 8 changed files with 120 additions and 70 deletions.
16 changes: 16 additions & 0 deletions interfaces/file-system-access.idl
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,17 @@ interface FileSystemWritableFileStream : WritableStream {
Promise<undefined> truncate(unsigned long long size);
};

enum WellKnownDirectory {
"desktop",
"documents",
"downloads",
"music",
"pictures",
"videos",
};

typedef (WellKnownDirectory or FileSystemHandle) StartInDirectory;

dictionary FilePickerAcceptType {
USVString description;
record<USVString, (USVString or sequence<USVString>)> accept;
Expand All @@ -97,16 +108,21 @@ dictionary FilePickerAcceptType {
dictionary FilePickerOptions {
sequence<FilePickerAcceptType> types;
boolean excludeAcceptAllOption = false;
DOMString id;
StartInDirectory startIn;
};

dictionary OpenFilePickerOptions : FilePickerOptions {
boolean multiple = false;
};

dictionary SaveFilePickerOptions : FilePickerOptions {
USVString? suggestedName;
};

dictionary DirectoryPickerOptions {
DOMString id;
StartInDirectory startIn;
};

[SecureContext]
Expand Down
2 changes: 1 addition & 1 deletion interfaces/js-self-profiling.idl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ dictionary ProfilerInitOptions {
required unsigned long maxBufferSize;
};

[Exposed=(Window,Worker)]
[CrossOriginIsolated, Exposed=(Window,Worker)]
partial interface Performance {
Promise<Profiler> profile(ProfilerInitOptions options);
};
2 changes: 1 addition & 1 deletion interfaces/performance-measure-memory.idl
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ dictionary MemoryAttributionContainer {
};

partial interface Performance {
[CrossOriginIsolated] Promise<MemoryMeasurement> measureUserAgentSpecificMemory();
[Exposed=(Window,ServiceWorker,SharedWorker), CrossOriginIsolated] Promise<MemoryMeasurement> measureUserAgentSpecificMemory();
};
7 changes: 7 additions & 0 deletions interfaces/screen-capture.idl
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ partial dictionary MediaTrackSettings {
DOMString displaySurface;
boolean logicalSurface;
DOMString cursor;
boolean restrictOwnAudio;
};

partial dictionary MediaTrackCapabilities {
DOMString displaySurface;
boolean logicalSurface;
sequence<DOMString> cursor;
};

enum DisplayCaptureSurfaceType {
Expand Down
2 changes: 2 additions & 0 deletions interfaces/visual-viewport.idl
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ interface VisualViewport : EventTarget {

readonly attribute double scale;

readonly attribute FrozenArray<DOMRect> segments;

attribute EventHandler onresize;
attribute EventHandler onscroll;
};
140 changes: 80 additions & 60 deletions interfaces/webcodecs.idl
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,13 @@ dictionary AudioEncoderInit {
required WebCodecsErrorCallback error;
};

callback EncodedAudioChunkOutputCallback = undefined(EncodedAudioChunk output);
callback EncodedAudioChunkOutputCallback =
undefined (EncodedAudioChunk output,
optional EncodedAudioChunkMetadata metadata = {});

dictionary EncodedAudioChunkMetadata {
AudioDecoderConfig decoderConfig;
};

[Exposed=(Window,DedicatedWorker)]
interface VideoEncoder {
Expand All @@ -93,7 +99,14 @@ dictionary VideoEncoderInit {
required WebCodecsErrorCallback error;
};

callback EncodedVideoChunkOutputCallback = undefined(EncodedVideoChunk output, VideoDecoderConfig? output_config);
callback EncodedVideoChunkOutputCallback =
undefined (EncodedVideoChunk chunk,
optional EncodedVideoChunkMetadata metadata = {});

dictionary EncodedVideoChunkMetadata {
VideoDecoderConfig decoderConfig;
unsigned long temporalLayerId;
};

dictionary AudioDecoderSupport {
boolean supported;
Expand All @@ -117,40 +130,37 @@ dictionary VideoEncoderSupport {

dictionary AudioDecoderConfig {
required DOMString codec;
required unsigned long sampleRate;
required unsigned long numberOfChannels;
[EnforceRange] required unsigned long sampleRate;
[EnforceRange] required unsigned long numberOfChannels;
BufferSource description;
};

dictionary VideoDecoderConfig {
required DOMString codec;
BufferSource description;
unsigned long codedWidth;
unsigned long codedHeight;
unsigned long cropLeft;
unsigned long cropTop;
unsigned long cropWidth;
unsigned long cropHeight;
unsigned long displayWidth;
unsigned long displayHeight;
[EnforceRange] unsigned long codedWidth;
[EnforceRange] unsigned long codedHeight;
[EnforceRange] unsigned long displayAspectWidth;
[EnforceRange] unsigned long displayAspectHeight;
HardwareAcceleration hardwareAcceleration = "allow";
};

dictionary AudioEncoderConfig {
required DOMString codec;
unsigned long sampleRate;
unsigned long numberOfChannels;
unsigned long long bitrate;
[EnforceRange] unsigned long sampleRate;
[EnforceRange] unsigned long numberOfChannels;
[EnforceRange] unsigned long long bitrate;
};

dictionary VideoEncoderConfig {
required DOMString codec;
unsigned long long bitrate;
required unsigned long width;
required unsigned long height;
unsigned long displayWidth;
unsigned long displayHeight;
[EnforceRange] unsigned long long bitrate;
[EnforceRange] required unsigned long width;
[EnforceRange] required unsigned long height;
[EnforceRange] unsigned long displayWidth;
[EnforceRange] unsigned long displayHeight;
HardwareAcceleration hardwareAcceleration = "allow";
DOMString scalabilityMode;
};

enum HardwareAcceleration {
Expand All @@ -176,14 +186,15 @@ interface EncodedAudioChunk {
constructor(EncodedAudioChunkInit init);
readonly attribute EncodedAudioChunkType type;
readonly attribute long long timestamp; // microseconds
readonly attribute unsigned long duration; // microseconds
readonly attribute unsigned long byteLength;

undefined copyTo(ArrayBufferView dst);
undefined copyTo([AllowShared] BufferSource destination);
};

dictionary EncodedAudioChunkInit {
required EncodedAudioChunkType type;
required long long timestamp; // microseconds
[EnforceRange] required long long timestamp; // microseconds
required BufferSource data;
};

Expand All @@ -196,17 +207,17 @@ enum EncodedAudioChunkType {
interface EncodedVideoChunk {
constructor(EncodedVideoChunkInit init);
readonly attribute EncodedVideoChunkType type;
readonly attribute long long timestamp; // microseconds
readonly attribute long long? duration; // microseconds
readonly attribute long long timestamp; // microseconds
readonly attribute unsigned long long? duration; // microseconds
readonly attribute unsigned long byteLength;

undefined copyTo(ArrayBufferView dst);
undefined copyTo([AllowShared] BufferSource destination);
};

dictionary EncodedVideoChunkInit {
required EncodedVideoChunkType type;
required long long timestamp; // microseconds
long long duration; // microseconds
[EnforceRange] required long long timestamp; // microseconds
[EnforceRange] unsigned long long duration; // microseconds
required BufferSource data;
};

Expand All @@ -219,34 +230,43 @@ enum EncodedVideoChunkType {
interface AudioData {
constructor(AudioDataInit init);

readonly attribute AudioSampleFormat sampleFormat;
readonly attribute AudioSampleFormat format;
readonly attribute float sampleRate;
readonly attribute unsigned long numberOfFrames;
readonly attribute unsigned long numberOfChannels;
readonly attribute unsigned long allocationSize;
readonly attribute long long duration; // microseconds
readonly attribute long long timestamp; // microseconds
readonly attribute unsigned long long duration; // microseconds
readonly attribute long long timestamp; // microseconds

undefined copyTo([AllowShared] BufferSource destination, unsigned long planeNumber);
unsigned long allocationSize(AudioDataCopyToOptions options);
undefined copyTo([AllowShared] BufferSource destination, AudioDataCopyToOptions options);
AudioData clone();
undefined close();
};

dictionary AudioDataInit {
required AudioSampleFormat sampleFormat;
required float sampleRate;
required unsigned long numberOfFrames;
required unsigned long numberOfChannels;
required long long timestamp; // microseconds
required AudioSampleFormat format;
[EnforceRange] required float sampleRate;
[EnforceRange] required unsigned long numberOfFrames;
[EnforceRange] required unsigned long numberOfChannels;
[EnforceRange] required long long timestamp; // microseconds
required BufferSource data;
};

dictionary AudioDataCopyToOptions {
required unsigned long planeIndex;
unsigned long frameOffset = 0;
unsigned long frameCount;
};

enum AudioSampleFormat {
"U8",
"S16",
"S24",
"S32",
"FLT",
"U8P",
"S16P",
"S24P",
"S32P",
"FLTP",
};
Expand All @@ -267,30 +287,30 @@ interface VideoFrame {
readonly attribute unsigned long cropHeight;
readonly attribute unsigned long displayWidth;
readonly attribute unsigned long displayHeight;
readonly attribute long long? duration; // microseconds
readonly attribute long long? timestamp; // microseconds
readonly attribute unsigned long long? duration; // microseconds
readonly attribute long long? timestamp; // microseconds

VideoFrame clone();
undefined close();
};

dictionary VideoFrameInit {
long long duration; // microseconds
long long timestamp; // microseconds
unsigned long long duration; // microseconds
long long timestamp; // microseconds
};

dictionary VideoFramePlaneInit {
required PixelFormat format;
required unsigned long codedWidth;
required unsigned long codedHeight;
unsigned long cropLeft;
unsigned long cropTop;
unsigned long cropWidth;
unsigned long cropHeight;
unsigned long displayWidth;
unsigned long displayHeight;
long long duration; // microseconds
long long timestamp; // microseconds
[EnforceRange] required unsigned long codedWidth;
[EnforceRange] required unsigned long codedHeight;
[EnforceRange] unsigned long cropLeft;
[EnforceRange] unsigned long cropTop;
[EnforceRange] unsigned long cropWidth;
[EnforceRange] unsigned long cropHeight;
[EnforceRange] unsigned long displayWidth;
[EnforceRange] unsigned long displayHeight;
[EnforceRange] unsigned long long duration; // microseconds
[EnforceRange] long long timestamp; // microseconds
};

[Exposed=(Window,DedicatedWorker)]
Expand All @@ -304,8 +324,8 @@ interface Plane {

dictionary PlaneInit {
required BufferSource src;
required unsigned long stride;
required unsigned long rows;
[EnforceRange] required unsigned long stride;
[EnforceRange] required unsigned long rows;
};

enum PixelFormat {
Expand Down Expand Up @@ -333,13 +353,13 @@ dictionary ImageDecoderInit {
required ImageBufferSource data;
PremultiplyAlpha premultiplyAlpha = "default";
ColorSpaceConversion colorSpaceConversion = "default";
unsigned long desiredWidth;
unsigned long desiredHeight;
[EnforceRange] unsigned long desiredWidth;
[EnforceRange] unsigned long desiredHeight;
boolean preferAnimation;
};

dictionary ImageDecodeOptions {
unsigned long frameIndex = 0;
[EnforceRange] unsigned long frameIndex = 0;
boolean completeFramesOnly = true;
};

Expand All @@ -353,16 +373,16 @@ interface ImageTrackList {
getter ImageTrack (unsigned long index);

readonly attribute Promise<undefined> ready;
readonly attribute unsigned long length;
readonly attribute long selectedIndex;
[EnforceRange] readonly attribute unsigned long length;
[EnforceRange] readonly attribute long selectedIndex;
readonly attribute ImageTrack? selectedTrack;
};

[Exposed=(Window,DedicatedWorker)]
interface ImageTrack : EventTarget {
readonly attribute boolean animated;
readonly attribute unsigned long frameCount;
readonly attribute unrestricted float repetitionCount;
[EnforceRange] readonly attribute unsigned long frameCount;
[EnforceRange] readonly attribute unrestricted float repetitionCount;
attribute EventHandler onchange;
attribute boolean selected;
};
Loading

0 comments on commit 0717634

Please sign in to comment.