Sync interfaces/ with @webref/idl 3.24.1 (#37904)
Co-authored-by: wpt-pr-bot <wpt-pr-bot@users.noreply.github.com>
diff --git a/interfaces/contact-api.idl b/interfaces/contact-picker.idl
similarity index 100%
rename from interfaces/contact-api.idl
rename to interfaces/contact-picker.idl
diff --git a/interfaces/fs.idl b/interfaces/fs.idl
index 12dca90..e341ab3 100644
--- a/interfaces/fs.idl
+++ b/interfaces/fs.idl
@@ -75,7 +75,7 @@
};
dictionary FileSystemReadWriteOptions {
- [EnforceRange] unsigned long long at = 0;
+ [EnforceRange] unsigned long long at;
};
[Exposed=DedicatedWorker, SecureContext]
diff --git a/interfaces/html.idl b/interfaces/html.idl
index 70eb5ef..e4752f0 100644
--- a/interfaces/html.idl
+++ b/interfaces/html.idl
@@ -2132,13 +2132,13 @@
Blob or
ImageData) ImageBitmapSource;
-enum ImageOrientation { "none", "flipY" };
+enum ImageOrientation { "from-image", "flipY" };
enum PremultiplyAlpha { "none", "premultiply", "default" };
enum ColorSpaceConversion { "none", "default" };
enum ResizeQuality { "pixelated", "low", "medium", "high" };
dictionary ImageBitmapOptions {
- ImageOrientation imageOrientation = "none";
+ ImageOrientation imageOrientation = "from-image";
PremultiplyAlpha premultiplyAlpha = "default";
ColorSpaceConversion colorSpaceConversion = "default";
[EnforceRange] unsigned long resizeWidth;
diff --git a/interfaces/payment-handler.idl b/interfaces/payment-handler.idl
index c76ef09..d0e5bd9 100644
--- a/interfaces/payment-handler.idl
+++ b/interfaces/payment-handler.idl
@@ -11,6 +11,14 @@
interface PaymentManager {
[SameObject] readonly attribute PaymentInstruments instruments;
attribute DOMString userHint;
+ Promise<undefined> enableDelegations(sequence<PaymentDelegation> delegations);
+};
+
+enum PaymentDelegation {
+ "shippingAddress",
+ "payerName",
+ "payerPhone",
+ "payerEmail"
};
[SecureContext, Exposed=(Window,Worker)]
@@ -53,7 +61,9 @@
DOMString error;
PaymentCurrencyAmount total;
sequence<PaymentDetailsModifier> modifiers;
+ sequence<PaymentShippingOption> shippingOptions;
object paymentMethodErrors;
+ AddressErrors shippingAddressErrors;
};
[Exposed=ServiceWorker]
@@ -65,8 +75,12 @@
readonly attribute FrozenArray<PaymentMethodData> methodData;
readonly attribute object total;
readonly attribute FrozenArray<PaymentDetailsModifier> modifiers;
+ readonly attribute object? paymentOptions;
+ readonly attribute FrozenArray<PaymentShippingOption>? shippingOptions;
Promise<WindowClient?> openWindow(USVString url);
Promise<PaymentRequestDetailsUpdate?> changePaymentMethod(DOMString methodName, optional object? methodDetails = null);
+ Promise<PaymentRequestDetailsUpdate?> changeShippingAddress(optional AddressInit shippingAddress = {});
+ Promise<PaymentRequestDetailsUpdate?> changeShippingOption(DOMString shippingOption);
undefined respondWith(Promise<PaymentHandlerResponse> handlerResponsePromise);
};
@@ -77,9 +91,64 @@
sequence<PaymentMethodData> methodData;
PaymentCurrencyAmount total;
sequence<PaymentDetailsModifier> modifiers;
+ PaymentOptions paymentOptions;
+ sequence<PaymentShippingOption> shippingOptions;
};
dictionary PaymentHandlerResponse {
DOMString methodName;
object details;
+DOMString? payerName;
+DOMString? payerEmail;
+DOMString? payerPhone;
+AddressInit shippingAddress;
+DOMString? shippingOption;
+};
+
+dictionary AddressInit {
+ DOMString country = "";
+ sequence<DOMString> addressLine = [];
+ DOMString region = "";
+ DOMString city = "";
+ DOMString dependentLocality = "";
+ DOMString postalCode = "";
+ DOMString sortingCode = "";
+ DOMString organization = "";
+ DOMString recipient = "";
+ DOMString phone = "";
+};
+
+dictionary PaymentOptions {
+ boolean requestPayerName = false;
+ boolean requestBillingAddress = false;
+ boolean requestPayerEmail = false;
+ boolean requestPayerPhone = false;
+ boolean requestShipping = false;
+ PaymentShippingType shippingType = "shipping";
+};
+
+dictionary PaymentShippingOption {
+ required DOMString id;
+ required DOMString label;
+ required PaymentCurrencyAmount amount;
+ boolean selected = false;
+};
+
+enum PaymentShippingType {
+ "shipping",
+ "delivery",
+ "pickup"
+};
+
+dictionary AddressErrors {
+ DOMString addressLine;
+ DOMString city;
+ DOMString country;
+ DOMString dependentLocality;
+ DOMString organization;
+ DOMString phone;
+ DOMString postalCode;
+ DOMString recipient;
+ DOMString region;
+ DOMString sortingCode;
};
diff --git a/interfaces/wai-aria.idl b/interfaces/wai-aria.idl
index 61c103c..3434bf7 100644
--- a/interfaces/wai-aria.idl
+++ b/interfaces/wai-aria.idl
@@ -20,7 +20,7 @@
[CEReactions] attribute DOMString? ariaDescription;
[CEReactions] attribute FrozenArray<Element>? ariaDetailsElements;
[CEReactions] attribute DOMString? ariaDisabled;
- [CEReactions] attribute Element? ariaErrorMessageElement;
+ [CEReactions] attribute FrozenArray<Element>? ariaErrorMessageElements;
[CEReactions] attribute DOMString? ariaExpanded;
[CEReactions] attribute FrozenArray<Element>? ariaFlowToElements;
[CEReactions] attribute DOMString? ariaHasPopup;
diff --git a/interfaces/webnn.idl b/interfaces/webnn.idl
index c8a09ae..1bb9563 100644
--- a/interfaces/webnn.idl
+++ b/interfaces/webnn.idl
@@ -47,8 +47,13 @@
MLGraph graph, MLNamedArrayBufferViews inputs, MLNamedArrayBufferViews outputs);
};
+dictionary MLComputeResult {
+ MLNamedArrayBufferViews inputs;
+ MLNamedArrayBufferViews outputs;
+};
+
partial interface MLContext {
- Promise<undefined> compute(
+ Promise<MLComputeResult> compute(
MLGraph graph, MLNamedArrayBufferViews inputs, MLNamedArrayBufferViews outputs);
};
@@ -82,7 +87,7 @@
interface MLOperand {};
[SecureContext, Exposed=(Window, DedicatedWorker)]
-interface MLOperator {};
+interface MLActivation {};
typedef record<DOMString, MLOperand> MLNamedOperands;
@@ -121,7 +126,7 @@
MLOperand bias;
long axis = 1;
float epsilon = 1e-5;
- MLOperator activation;
+ MLActivation activation;
};
partial interface MLGraphBuilder {
@@ -136,7 +141,7 @@
partial interface MLGraphBuilder {
MLOperand clamp(MLOperand x, optional MLClampOptions options = {});
- MLOperator clamp(optional MLClampOptions options = {});
+ MLActivation clamp(optional MLClampOptions options = {});
};
partial interface MLGraphBuilder {
@@ -165,7 +170,7 @@
MLInputOperandLayout inputLayout = "nchw";
MLConv2dFilterOperandLayout filterLayout = "oihw";
MLOperand bias;
- MLOperator activation;
+ MLActivation activation;
};
partial interface MLGraphBuilder {
@@ -189,7 +194,7 @@
MLInputOperandLayout inputLayout = "nchw";
MLConvTranspose2dFilterOperandLayout filterLayout = "iohw";
MLOperand bias;
- MLOperator activation;
+ MLActivation activation;
};
partial interface MLGraphBuilder {
@@ -225,7 +230,7 @@
partial interface MLGraphBuilder {
MLOperand elu(MLOperand x, optional MLEluOptions options = {});
- MLOperator elu(optional MLEluOptions options = {});
+ MLActivation elu(optional MLEluOptions options = {});
};
dictionary MLGemmOptions {
@@ -240,7 +245,7 @@
MLOperand gemm(MLOperand a, MLOperand b, optional MLGemmOptions options = {});
};
-enum MLRecurrentNetworkWeightLayout {
+enum MLGruWeightLayout {
"zrn", // update-reset-new gate ordering
"rzn" // reset-update-new gate ordering
};
@@ -258,26 +263,31 @@
boolean resetAfter = true;
boolean returnSequence = false;
MLRecurrentNetworkDirection direction = "forward";
- MLRecurrentNetworkWeightLayout layout = "zrn";
- sequence<MLOperator> activations;
+ MLGruWeightLayout layout = "zrn";
+ sequence<MLActivation> activations;
};
partial interface MLGraphBuilder {
sequence<MLOperand> gru(MLOperand input, MLOperand weight, MLOperand recurrentWeight,
- long steps, long hiddenSize, optional MLGruOptions options = {});
+
+ unsigned long steps, unsigned long hiddenSize,
+
+ optional MLGruOptions options = {});
};
dictionary MLGruCellOptions {
MLOperand bias;
MLOperand recurrentBias;
boolean resetAfter = true;
- MLRecurrentNetworkWeightLayout layout = "zrn";
- sequence<MLOperator> activations;
+ MLGruWeightLayout layout = "zrn";
+ sequence<MLActivation> activations;
};
partial interface MLGraphBuilder {
MLOperand gruCell(MLOperand input, MLOperand weight, MLOperand recurrentWeight,
- MLOperand hiddenState, long hiddenSize, optional MLGruCellOptions options = {});
+ MLOperand hiddenState, unsigned long hiddenSize,
+
+ optional MLGruCellOptions options = {});
};
dictionary MLHardSigmoidOptions {
@@ -287,12 +297,12 @@
partial interface MLGraphBuilder {
MLOperand hardSigmoid(MLOperand x, optional MLHardSigmoidOptions options = {});
- MLOperator hardSigmoid(optional MLHardSigmoidOptions options = {});
+ MLActivation hardSigmoid(optional MLHardSigmoidOptions options = {});
};
partial interface MLGraphBuilder {
MLOperand hardSwish(MLOperand x);
- MLOperator hardSwish();
+ MLActivation hardSwish();
};
dictionary MLInstanceNormalizationOptions {
@@ -313,11 +323,7 @@
partial interface MLGraphBuilder {
MLOperand leakyRelu(MLOperand x, optional MLLeakyReluOptions options = {});
- MLOperator leakyRelu(optional MLLeakyReluOptions options = {});
-};
-
-partial interface MLGraphBuilder {
- MLOperand matmul(MLOperand a, MLOperand b);
+ MLActivation leakyRelu(optional MLLeakyReluOptions options = {});
};
dictionary MLLinearOptions {
@@ -327,7 +333,51 @@
partial interface MLGraphBuilder {
MLOperand linear(MLOperand x, optional MLLinearOptions options = {});
- MLOperator linear(optional MLLinearOptions options = {});
+ MLActivation linear(optional MLLinearOptions options = {});
+};
+
+enum MLLstmWeightLayout {
+ "iofg", // input-output-forget-cell gate ordering
+ "ifgo" // input-forget-cell-output gate ordering
+};
+
+dictionary MLLstmOptions {
+ MLOperand bias;
+ MLOperand recurrentBias;
+ MLOperand peepholeWeight;
+ MLOperand initialHiddenState;
+ MLOperand initialCellState;
+ boolean returnSequence = false;
+ MLRecurrentNetworkDirection direction = "forward";
+ MLLstmWeightLayout layout = "iofg";
+ sequence<MLActivation> activations;
+};
+
+partial interface MLGraphBuilder {
+ sequence<MLOperand> lstm(MLOperand input, MLOperand weight, MLOperand recurrentWeight,
+
+ unsigned long steps, unsigned long hiddenSize,
+
+ optional MLLstmOptions options = {});
+};
+
+dictionary MLLstmCellOptions {
+ MLOperand bias;
+ MLOperand recurrentBias;
+ MLOperand peepholeWeight;
+ MLLstmWeightLayout layout = "iofg";
+ sequence<MLActivation> activations;
+};
+
+partial interface MLGraphBuilder {
+ sequence<MLOperand> lstmCell(MLOperand input, MLOperand weight, MLOperand recurrentWeight,
+ MLOperand hiddenState, MLOperand cellState, unsigned long hiddenSize,
+
+ optional MLLstmCellOptions options = {});
+};
+
+partial interface MLGraphBuilder {
+ MLOperand matmul(MLOperand a, MLOperand b);
};
enum MLPaddingMode {
@@ -388,7 +438,7 @@
partial interface MLGraphBuilder {
MLOperand relu(MLOperand x);
- MLOperator relu();
+ MLActivation relu();
};
enum MLInterpolationMode {
@@ -413,7 +463,7 @@
partial interface MLGraphBuilder {
MLOperand sigmoid(MLOperand x);
- MLOperator sigmoid();
+ MLActivation sigmoid();
};
dictionary MLSliceOptions {
@@ -427,6 +477,7 @@
partial interface MLGraphBuilder {
MLOperand softmax(MLOperand x);
+ MLActivation softmax();
};
dictionary MLSoftplusOptions {
@@ -435,12 +486,12 @@
partial interface MLGraphBuilder {
MLOperand softplus(MLOperand x, optional MLSoftplusOptions options = {});
- MLOperator softplus(optional MLSoftplusOptions options = {});
+ MLActivation softplus(optional MLSoftplusOptions options = {});
};
partial interface MLGraphBuilder {
MLOperand softsign(MLOperand x);
- MLOperator softsign();
+ MLActivation softsign();
};
dictionary MLSplitOptions {
@@ -463,7 +514,7 @@
partial interface MLGraphBuilder {
MLOperand tanh(MLOperand x);
- MLOperator tanh();
+ MLActivation tanh();
};
dictionary MLTransposeOptions {