Skip to content

Commit

Permalink
Sync interfaces/ with @webref/idl 3.59.1 (#50265)
Browse files Browse the repository at this point in the history
Co-authored-by: wpt-pr-bot <[email protected]>
  • Loading branch information
github-actions[bot] and wpt-pr-bot authored Jan 24, 2025
1 parent aa999d8 commit 0be1c59
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
13 changes: 9 additions & 4 deletions interfaces/html.idl
Original file line number Diff line number Diff line change
Expand Up @@ -1320,9 +1320,8 @@ enum ImageSmoothingQuality { "low", "medium", "high" };
interface CanvasRenderingContext2D {
// back-reference to the canvas
readonly attribute HTMLCanvasElement canvas;

CanvasRenderingContext2DSettings getContextAttributes();
};
CanvasRenderingContext2D includes CanvasSettings;
CanvasRenderingContext2D includes CanvasState;
CanvasRenderingContext2D includes CanvasTransform;
CanvasRenderingContext2D includes CanvasCompositing;
Expand All @@ -1340,6 +1339,11 @@ CanvasRenderingContext2D includes CanvasPathDrawingStyles;
CanvasRenderingContext2D includes CanvasTextDrawingStyles;
CanvasRenderingContext2D includes CanvasPath;

interface mixin CanvasSettings {
// settings
CanvasRenderingContext2DSettings getContextAttributes();
};

interface mixin CanvasState {
// state
undefined save(); // push state on state stack
Expand Down Expand Up @@ -1594,6 +1598,7 @@ interface OffscreenCanvasRenderingContext2D {
readonly attribute OffscreenCanvas canvas;
};

OffscreenCanvasRenderingContext2D includes CanvasSettings;
OffscreenCanvasRenderingContext2D includes CanvasState;
OffscreenCanvasRenderingContext2D includes CanvasTransform;
OffscreenCanvasRenderingContext2D includes CanvasCompositing;
Expand Down Expand Up @@ -2119,10 +2124,10 @@ interface NotRestoredReasonDetails {

[Exposed=Window]
interface NotRestoredReasons {
readonly attribute DOMString? src;
readonly attribute USVString? src;
readonly attribute DOMString? id;
readonly attribute DOMString? name;
readonly attribute DOMString? url;
readonly attribute USVString? url;
readonly attribute FrozenArray<NotRestoredReasonDetails>? reasons;
readonly attribute FrozenArray<NotRestoredReasons>? children;
[Default] object toJSON();
Expand Down
10 changes: 10 additions & 0 deletions interfaces/speech-api.idl
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,15 @@ interface SpeechRecognition : EventTarget {
attribute boolean continuous;
attribute boolean interimResults;
attribute unsigned long maxAlternatives;
attribute SpeechRecognitionMode mode;

// methods to drive the speech interaction
undefined start();
undefined start(MediaStreamTrack audioTrack);
undefined stop();
undefined abort();
boolean onDeviceWebSpeechAvailable(DOMString lang);
boolean installOnDeviceSpeechRecognition(DOMString lang);

// event methods
attribute EventHandler onaudiostart;
Expand All @@ -44,6 +48,12 @@ enum SpeechRecognitionErrorCode {
"language-not-supported"
};

enum SpeechRecognitionMode {
"ondevice-preferred", // On-device speech recognition if available, otherwise use Cloud speech recognition as a fallback.
"ondevice-only", // On-device speech recognition only. Returns an error if on-device speech recognition is not available.
"cloud-only", // Cloud speech recognition only.
};

[Exposed=Window]
interface SpeechRecognitionErrorEvent : Event {
constructor(DOMString type, SpeechRecognitionErrorEventInit eventInitDict);
Expand Down
3 changes: 3 additions & 0 deletions interfaces/webgpu.idl
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ interface GPUAdapterInfo {
readonly attribute DOMString architecture;
readonly attribute DOMString device;
readonly attribute DOMString description;
readonly attribute unsigned long subgroupMinSize;
readonly attribute unsigned long subgroupMaxSize;
};

interface mixin NavigatorGPU {
Expand Down Expand Up @@ -123,6 +125,7 @@ enum GPUFeatureName {
"float32-blendable",
"clip-distances",
"dual-source-blending",
"subgroups",
};

[Exposed=(Window, Worker), SecureContext]
Expand Down

0 comments on commit 0be1c59

Please sign in to comment.