Skip to content

Commit

Permalink
Sync interfaces/ with @webref/idl 3.50.0 (#46965)
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 committed Jul 2, 2024
1 parent c5c8021 commit e90ece6
Show file tree
Hide file tree
Showing 11 changed files with 130 additions and 16 deletions.
2 changes: 1 addition & 1 deletion interfaces/WebCryptoAPI.idl
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ interface SubtleCrypto {
sequence<KeyUsage> keyUsages );
Promise<ArrayBuffer> deriveBits(AlgorithmIdentifier algorithm,
CryptoKey baseKey,
unsigned long length);
optional unsigned long? length = null);

Promise<CryptoKey> importKey(KeyFormat format,
(BufferSource or JsonWebKey) keyData,
Expand Down
2 changes: 1 addition & 1 deletion interfaces/css-nesting.idl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
// Source: CSS Nesting Module (https://drafts.csswg.org/css-nesting-1/)

[Exposed=Window]
interface CSSNestRule : CSSGroupingRule {
interface CSSNestedDeclarations : CSSRule {
[SameObject, PutForwards=cssText] readonly attribute CSSStyleProperties style;
};
1 change: 1 addition & 0 deletions interfaces/cssom.idl
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ interface CSSPageDescriptors : CSSStyleDeclaration {
attribute [LegacyNullToEmptyString] CSSOMString margin-bottom;
attribute [LegacyNullToEmptyString] CSSOMString margin-left;
attribute [LegacyNullToEmptyString] CSSOMString size;
attribute [LegacyNullToEmptyString] CSSOMString orientation;
attribute [LegacyNullToEmptyString] CSSOMString marks;
attribute [LegacyNullToEmptyString] CSSOMString bleed;
};
Expand Down
100 changes: 100 additions & 0 deletions interfaces/handwriting-recognition.idl
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
// GENERATED CONTENT - DO NOT EDIT
// Content was automatically extracted by Reffy into webref
// (https://github.com/w3c/webref)
// Source: Handwriting Recognition API (https://wicg.github.io/handwriting-recognition/)

[SecureContext]
partial interface Navigator {
Promise<HandwritingRecognizerQueryResult?>
queryHandwritingRecognizer(HandwritingModelConstraint constraint);
};

dictionary HandwritingModelConstraint {
required sequence<DOMString> languages;
};

dictionary HandwritingRecognizerQueryResult {
boolean textAlternatives;
boolean textSegmentation;
HandwritingHintsQueryResult hints;
};

dictionary HandwritingHintsQueryResult {
sequence<HandwritingRecognitionType> recognitionType;
sequence<HandwritingInputType> inputType;
boolean textContext;
boolean alternatives;
};

enum HandwritingRecognitionType{
"text", "per-character"
};

enum HandwritingInputType {
"mouse", "stylus", "touch"
};

[SecureContext]
partial interface Navigator {
Promise<HandwritingRecognizer>
createHandwritingRecognizer(HandwritingModelConstraint constraint);
};

[Exposed=Window, SecureContext]
interface HandwritingRecognizer {
HandwritingDrawing startDrawing(optional HandwritingHints hints = {});

undefined finish();
};

dictionary HandwritingHints {
DOMString recognitionType = "text";
DOMString inputType = "mouse";
DOMString textContext;
unsigned long alternatives = 3;
};

[Exposed=Window, SecureContext]
interface HandwritingDrawing {
undefined addStroke(HandwritingStroke stroke);
undefined removeStroke(HandwritingStroke stroke);
undefined clear();
sequence<HandwritingStroke> getStrokes();

Promise<sequence<HandwritingPrediction>> getPrediction();
};

[SecureContext, Exposed=Window]
interface HandwritingStroke {
constructor();
undefined addPoint(HandwritingPoint point);
sequence<HandwritingPoint> getPoints();
undefined clear();
};

dictionary HandwritingPoint {
required double x;
required double y;

// Optional. Number of milliseconds since a reference time point for a
// drawing.
DOMHighResTimeStamp t;
};

dictionary HandwritingPrediction {
required DOMString text;
sequence<HandwritingSegment> segmentationResult;
};

dictionary HandwritingSegment {
required DOMString grapheme;
required unsigned long beginIndex;
required unsigned long endIndex;
required sequence<HandwritingDrawingSegment> drawingSegments;
};

dictionary HandwritingDrawingSegment {
required unsigned long strokeIndex;
required unsigned long beginPointIndex;
required unsigned long endPointIndex;
};
6 changes: 6 additions & 0 deletions interfaces/intersection-observer.idl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ interface IntersectionObserver {
readonly attribute DOMString rootMargin;
readonly attribute DOMString scrollMargin;
readonly attribute FrozenArray<double> thresholds;
readonly attribute long delay;
readonly attribute boolean trackVisibility;
undefined observe(Element target);
undefined unobserve(Element target);
undefined disconnect();
Expand All @@ -26,6 +28,7 @@ interface IntersectionObserverEntry {
readonly attribute DOMRectReadOnly boundingClientRect;
readonly attribute DOMRectReadOnly intersectionRect;
readonly attribute boolean isIntersecting;
readonly attribute boolean isVisible;
readonly attribute double intersectionRatio;
readonly attribute Element target;
};
Expand All @@ -36,6 +39,7 @@ dictionary IntersectionObserverEntryInit {
required DOMRectInit boundingClientRect;
required DOMRectInit intersectionRect;
required boolean isIntersecting;
required boolean isVisible;
required double intersectionRatio;
required Element target;
};
Expand All @@ -45,4 +49,6 @@ dictionary IntersectionObserverInit {
DOMString rootMargin = "0px";
DOMString scrollMargin = "0px";
(double or sequence<double>) threshold = 0;
long delay = 0;
boolean trackVisibility = false;
};
5 changes: 5 additions & 0 deletions interfaces/mediacapture-streams.idl
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ dictionary MediaTrackSupportedConstraints {
boolean channelCount = true;
boolean deviceId = true;
boolean groupId = true;
boolean backgroundBlur = true;
};

dictionary MediaTrackCapabilities {
Expand All @@ -79,6 +80,7 @@ dictionary MediaTrackCapabilities {
ULongRange channelCount;
DOMString deviceId;
DOMString groupId;
sequence<boolean> backgroundBlur;
};

dictionary MediaTrackConstraints : MediaTrackConstraintSet {
Expand All @@ -101,6 +103,7 @@ dictionary MediaTrackConstraintSet {
ConstrainULong channelCount;
ConstrainDOMString deviceId;
ConstrainDOMString groupId;
ConstrainBoolean backgroundBlur;
};

dictionary MediaTrackSettings {
Expand All @@ -119,6 +122,7 @@ dictionary MediaTrackSettings {
unsigned long channelCount;
DOMString deviceId;
DOMString groupId;
boolean backgroundBlur;
};

enum VideoFacingModeEnum {
Expand Down Expand Up @@ -183,6 +187,7 @@ interface InputDeviceInfo : MediaDeviceInfo {
interface DeviceChangeEvent : Event {
constructor(DOMString type, optional DeviceChangeEventInit eventInitDict = {});
[SameObject] readonly attribute FrozenArray<MediaDeviceInfo> devices;
[SameObject] readonly attribute FrozenArray<MediaDeviceInfo> userInsertedDevices;
};

dictionary DeviceChangeEventInit : EventInit {
Expand Down
1 change: 1 addition & 0 deletions interfaces/permissions-policy.idl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ partial interface HTMLIFrameElement {

[Exposed=Window]
interface PermissionsPolicyViolationReportBody : ReportBody {
[Default] object toJSON();
readonly attribute DOMString featureId;
readonly attribute DOMString? sourceFile;
readonly attribute long? lineNumber;
Expand Down
4 changes: 2 additions & 2 deletions interfaces/shared-storage.idl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ typedef (USVString or FencedFrameConfig) SharedStorageResponse;
[Exposed=(Window)]
interface SharedStorageWorklet : Worklet {
Promise<SharedStorageResponse> selectURL(DOMString name,
FrozenArray<SharedStorageUrlWithMetadata> urls,
sequence<SharedStorageUrlWithMetadata> urls,
optional SharedStorageRunOperationMethodOptions options = {});
Promise<any> run(DOMString name,
optional SharedStorageRunOperationMethodOptions options = {});
Expand Down Expand Up @@ -47,7 +47,7 @@ dictionary SharedStorageSetMethodOptions {
[Exposed=(Window)]
interface WindowSharedStorage : SharedStorage {
Promise<SharedStorageResponse> selectURL(DOMString name,
FrozenArray<SharedStorageUrlWithMetadata> urls,
sequence<SharedStorageUrlWithMetadata> urls,
optional SharedStorageRunOperationMethodOptions options = {});
Promise<any> run(DOMString name,
optional SharedStorageRunOperationMethodOptions options = {});
Expand Down
11 changes: 0 additions & 11 deletions interfaces/webauthn.idl
Original file line number Diff line number Diff line change
Expand Up @@ -357,17 +357,6 @@ dictionary AuthenticationExtensionsLargeBlobOutputs {
boolean written;
};

partial dictionary AuthenticationExtensionsClientInputs {
boolean uvm;
};

typedef sequence<unsigned long> UvmEntry;
typedef sequence<UvmEntry> UvmEntries;

partial dictionary AuthenticationExtensionsClientOutputs {
UvmEntries uvm;
};

dictionary AuthenticationExtensionsSupplementalPubKeysInputs {
required sequence<DOMString> scopes;
DOMString attestation = "indirect";
Expand Down
11 changes: 11 additions & 0 deletions interfaces/webgpu.idl
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ enum GPUFeatureName {
"bgra8unorm-storage",
"float32-filterable",
"clip-distances",
"dual-source-blending",
};

[Exposed=(Window, Worker), SecureContext]
Expand Down Expand Up @@ -1188,12 +1189,22 @@ enum GPUCanvasAlphaMode {
"premultiplied",
};

enum GPUCanvasToneMappingMode {
"standard",
"extended",
};

dictionary GPUCanvasToneMapping {
GPUCanvasToneMappingMode mode = "standard";
};

dictionary GPUCanvasConfiguration {
required GPUDevice device;
required GPUTextureFormat format;
GPUTextureUsageFlags usage = 0x10; // GPUTextureUsage.RENDER_ATTACHMENT
sequence<GPUTextureFormat> viewFormats = [];
PredefinedColorSpace colorSpace = "srgb";
GPUCanvasToneMapping toneMapping = {};
GPUCanvasAlphaMode alphaMode = "opaque";
};

Expand Down
3 changes: 2 additions & 1 deletion interfaces/webnn.idl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ WorkerNavigator includes NavigatorML;

enum MLDeviceType {
"cpu",
"gpu"
"gpu",
"npu"
};

enum MLPowerPreference {
Expand Down

0 comments on commit e90ece6

Please sign in to comment.