From 139fbdba5e8c7cf7a7129ad5189debe4bc6f25a7 Mon Sep 17 00:00:00 2001 From: Uzlopak <5059100+Uzlopak@users.noreply.github.com> Date: Sat, 14 Sep 2024 00:16:07 +0000 Subject: [PATCH] chore: update WPT --- test/fixtures/wpt/interfaces/css-fonts.idl | 2 +- ...identities.idl => digital-credentials.idl} | 2 +- .../wpt/interfaces/{FedCM.idl => fedcm.idl} | 17 +-- .../wpt/interfaces/ink-enhancement.idl | 4 +- test/fixtures/wpt/interfaces/observable.idl | 106 ++++++++++++++++++ .../interfaces/private-aggregation-api.idl | 73 ++++++++++++ .../wpt/interfaces/shared-storage.idl | 8 ++ test/fixtures/wpt/interfaces/uievents.idl | 23 ---- test/fixtures/wpt/interfaces/webgpu.idl | 4 +- 9 files changed, 195 insertions(+), 44 deletions(-) rename test/fixtures/wpt/interfaces/{digital-identities.idl => digital-credentials.idl} (98%) rename test/fixtures/wpt/interfaces/{FedCM.idl => fedcm.idl} (88%) create mode 100644 test/fixtures/wpt/interfaces/observable.idl create mode 100644 test/fixtures/wpt/interfaces/private-aggregation-api.idl diff --git a/test/fixtures/wpt/interfaces/css-fonts.idl b/test/fixtures/wpt/interfaces/css-fonts.idl index 678f31323b8..d5c9dc86705 100644 --- a/test/fixtures/wpt/interfaces/css-fonts.idl +++ b/test/fixtures/wpt/interfaces/css-fonts.idl @@ -38,7 +38,7 @@ interface CSSFontFaceDescriptors : CSSStyleDeclaration { [Exposed=Window] interface CSSFontFaceRule : CSSRule { - readonly attribute CSSFontFaceDescriptors style; + [SameObject, PutForwards=cssText] readonly attribute CSSFontFaceDescriptors style; }; partial interface CSSRule { const unsigned short FONT_FEATURE_VALUES_RULE = 14; diff --git a/test/fixtures/wpt/interfaces/digital-identities.idl b/test/fixtures/wpt/interfaces/digital-credentials.idl similarity index 98% rename from test/fixtures/wpt/interfaces/digital-identities.idl rename to test/fixtures/wpt/interfaces/digital-credentials.idl index 90307fdadd5..a12ce5a2ba2 100644 --- a/test/fixtures/wpt/interfaces/digital-identities.idl +++ b/test/fixtures/wpt/interfaces/digital-credentials.idl @@ -1,7 +1,7 @@ // GENERATED CONTENT - DO NOT EDIT // Content was automatically extracted by Reffy into webref // (https://github.com/w3c/webref) -// Source: Digital Credentials (https://wicg.github.io/digital-credentials) +// Source: Digital Credentials (https://wicg.github.io/digital-credentials/) partial interface Navigator { [SecureContext, SameObject] readonly attribute CredentialsContainer identity; diff --git a/test/fixtures/wpt/interfaces/FedCM.idl b/test/fixtures/wpt/interfaces/fedcm.idl similarity index 88% rename from test/fixtures/wpt/interfaces/FedCM.idl rename to test/fixtures/wpt/interfaces/fedcm.idl index 4070d50fcd7..ba99f1174c8 100644 --- a/test/fixtures/wpt/interfaces/FedCM.idl +++ b/test/fixtures/wpt/interfaces/fedcm.idl @@ -1,22 +1,7 @@ // GENERATED CONTENT - DO NOT EDIT // Content was automatically extracted by Reffy into webref // (https://github.com/w3c/webref) -// Source: Federated Credential Management API (https://fedidcg.github.io/FedCM/) - -enum LoginStatus { - "logged-in", - "logged-out", -}; - -[Exposed=Window, SecureContext] - -interface NavigatorLogin { - Promise setStatus(LoginStatus status); -}; - -partial interface Navigator { - [SecureContext] readonly attribute NavigatorLogin login; -}; +// Source: Federated Credential Management API (https://w3c-fedid.github.io/FedCM/) dictionary IdentityCredentialDisconnectOptions : IdentityProviderConfig { required USVString accountHint; diff --git a/test/fixtures/wpt/interfaces/ink-enhancement.idl b/test/fixtures/wpt/interfaces/ink-enhancement.idl index 711bab7729c..a3459c7ee74 100644 --- a/test/fixtures/wpt/interfaces/ink-enhancement.idl +++ b/test/fixtures/wpt/interfaces/ink-enhancement.idl @@ -5,7 +5,7 @@ [Exposed=Window] interface Ink { - Promise requestPresenter( + Promise requestPresenter( optional InkPresenterParam param = {}); }; @@ -14,7 +14,7 @@ dictionary InkPresenterParam { }; [Exposed=Window] -interface InkPresenter { +interface DelegatedInkTrailPresenter { readonly attribute Element? presentationArea; undefined updateInkTrailStartPoint(PointerEvent event, InkTrailStyle style); diff --git a/test/fixtures/wpt/interfaces/observable.idl b/test/fixtures/wpt/interfaces/observable.idl new file mode 100644 index 00000000000..b0f0949a23a --- /dev/null +++ b/test/fixtures/wpt/interfaces/observable.idl @@ -0,0 +1,106 @@ +// GENERATED CONTENT - DO NOT EDIT +// Content was automatically extracted by Reffy into webref +// (https://github.com/w3c/webref) +// Source: Observable (https://wicg.github.io/observable/) + +[Exposed=*] +interface Subscriber { + undefined next(any value); + undefined error(any error); + undefined complete(); + undefined addTeardown(VoidFunction teardown); + + // True after the Subscriber is created, up until either + // complete()/error() are invoked, or the subscriber unsubscribes. Inside + // complete()/error(), this attribute is true. + readonly attribute boolean active; + + readonly attribute AbortSignal signal; +}; + +// SubscribeCallback is where the Observable "creator’s" code lives. It’s +// called when subscribe() is called, to set up a new subscription. +callback SubscribeCallback = undefined (Subscriber subscriber); +callback ObservableSubscriptionCallback = undefined (any value); + +dictionary SubscriptionObserver { + ObservableSubscriptionCallback next; + ObservableSubscriptionCallback error; + VoidFunction complete; +}; + +callback ObservableInspectorAbortHandler = undefined (any value); + +dictionary ObservableInspector { + ObservableSubscriptionCallback next; + ObservableSubscriptionCallback error; + VoidFunction complete; + + VoidFunction subscribe; + ObservableInspectorAbortHandler abort; +}; + +typedef (ObservableSubscriptionCallback or SubscriptionObserver) ObserverUnion; +typedef (ObservableSubscriptionCallback or ObservableInspector) ObservableInspectorUnion; + +dictionary SubscribeOptions { + AbortSignal signal; +}; + +callback Predicate = boolean (any value, unsigned long long index); +callback Reducer = any (any accumulator, any currentValue, unsigned long long index); +callback Mapper = any (any value, unsigned long long index); +// Differs from Mapper only in return type, since this callback is exclusively +// used to visit each element in a sequence, not transform it. +callback Visitor = undefined (any value, unsigned long long index); + +// This callback returns an `any` that must convert into an `Observable`, via +// the `Observable` conversion semantics. +callback CatchCallback = any (any value); + +[Exposed=*] +interface Observable { + constructor(SubscribeCallback callback); + undefined subscribe(optional ObserverUnion observer = {}, optional SubscribeOptions options = {}); + + // Constructs a native Observable from value if it’s any of the following: + // - Observable + // - AsyncIterable + // - Iterable + // - Promise + static Observable from(any value); + + // Observable-returning operators. See "Operators" section in the spec. + // + // takeUntil() can consume promises, iterables, async iterables, and other + // observables. + Observable takeUntil(any notifier); + Observable map(Mapper mapper); + Observable filter(Predicate predicate); + Observable take(unsigned long long amount); + Observable drop(unsigned long long amount); + Observable flatMap(Mapper mapper); + Observable switchMap(Mapper mapper); + Observable inspect(optional ObservableInspectorUnion inspect_observer = {}); + Observable catch(CatchCallback callback); + Observable finally(VoidFunction callback); + + // Promise-returning operators. + Promise> toArray(optional SubscribeOptions options = {}); + Promise forEach(Visitor callback, optional SubscribeOptions options = {}); + Promise every(Predicate predicate, optional SubscribeOptions options = {}); + Promise first(optional SubscribeOptions options = {}); + Promise last(optional SubscribeOptions options = {}); + Promise find(Predicate predicate, optional SubscribeOptions options = {}); + Promise some(Predicate predicate, optional SubscribeOptions options = {}); + Promise reduce(Reducer reducer, optional any initialValue, optional SubscribeOptions options = {}); +}; + +dictionary ObservableEventListenerOptions { + boolean capture = false; + boolean passive; +}; + +partial interface EventTarget { + Observable when(DOMString type, optional ObservableEventListenerOptions options = {}); +}; diff --git a/test/fixtures/wpt/interfaces/private-aggregation-api.idl b/test/fixtures/wpt/interfaces/private-aggregation-api.idl new file mode 100644 index 00000000000..cee17c63f04 --- /dev/null +++ b/test/fixtures/wpt/interfaces/private-aggregation-api.idl @@ -0,0 +1,73 @@ +// GENERATED CONTENT - DO NOT EDIT +// Content was automatically extracted by Reffy into webref +// (https://github.com/w3c/webref) +// Source: Private Aggregation API (https://patcg-individual-drafts.github.io/private-aggregation-api/) + +[Exposed=(InterestGroupScriptRunnerGlobalScope,SharedStorageWorklet), + SecureContext] +interface PrivateAggregation { + undefined contributeToHistogram(PAHistogramContribution contribution); + undefined enableDebugMode(optional PADebugModeOptions options = {}); +}; + +dictionary PAHistogramContribution { + required bigint bucket; + required long value; + bigint filteringId = 0; +}; + +dictionary PADebugModeOptions { + required bigint debugKey; +}; + +partial interface InterestGroupScriptRunnerGlobalScope { + readonly attribute PrivateAggregation privateAggregation; +}; + +dictionary PASignalValue { + required DOMString baseValue; + double scale; + (bigint or long) offset; +}; + +dictionary PAExtendedHistogramContribution { + required (PASignalValue or bigint) bucket; + required (PASignalValue or long) value; + bigint filteringId = 0; +}; + +[Exposed=InterestGroupScriptRunnerGlobalScope, SecureContext] +partial interface PrivateAggregation { + undefined contributeToHistogramOnEvent( + DOMString event, PAExtendedHistogramContribution contribution); +}; + +dictionary AuctionReportBuyersConfig { + required bigint bucket; + required double scale; +}; + +dictionary AuctionReportBuyerDebugModeConfig { + boolean enabled = false; + + // Must only be provided if `enabled` is true. + bigint? debugKey; +}; + +partial dictionary AuctionAdConfig { + sequence auctionReportBuyerKeys; + record auctionReportBuyers; + AuctionReportBuyerDebugModeConfig auctionReportBuyerDebugModeConfig; +}; + +dictionary ProtectedAudiencePrivateAggregationConfig { + USVString aggregationCoordinatorOrigin; +}; + +partial dictionary AuctionAdConfig { + ProtectedAudiencePrivateAggregationConfig privateAggregationConfig; +}; + +partial dictionary AuctionAdInterestGroup { + ProtectedAudiencePrivateAggregationConfig privateAggregationConfig; +}; diff --git a/test/fixtures/wpt/interfaces/shared-storage.idl b/test/fixtures/wpt/interfaces/shared-storage.idl index cfaae1e6e24..6f8e9270888 100644 --- a/test/fixtures/wpt/interfaces/shared-storage.idl +++ b/test/fixtures/wpt/interfaces/shared-storage.idl @@ -24,6 +24,7 @@ interface SharedStorageWorkletGlobalScope : WorkletGlobalScope { Function operationCtor); readonly attribute SharedStorage sharedStorage; + readonly attribute PrivateAggregation privateAggregation; }; dictionary SharedStorageUrlWithMetadata { @@ -77,10 +78,17 @@ dictionary SharedStorageSetMethodOptions { boolean ignoreIfPresent = false; }; +dictionary SharedStoragePrivateAggregationConfig { + USVString aggregationCoordinatorOrigin; + USVString contextId; + [EnforceRange] unsigned long long filteringIdMaxBytes; +}; + dictionary SharedStorageRunOperationMethodOptions { object data; boolean resolveToConfig = false; boolean keepAlive = false; + SharedStoragePrivateAggregationConfig privateAggregationConfig; }; dictionary SharedStorageWorkletOptions : WorkletOptions { diff --git a/test/fixtures/wpt/interfaces/uievents.idl b/test/fixtures/wpt/interfaces/uievents.idl index 0f9d3d3c188..aea38778326 100644 --- a/test/fixtures/wpt/interfaces/uievents.idl +++ b/test/fixtures/wpt/interfaces/uievents.idl @@ -235,26 +235,3 @@ interface TextEvent : UIEvent { optional Window? view = null, optional DOMString data = "undefined"); }; - -[Exposed=Window] -interface MutationEvent : Event { - // attrChangeType - const unsigned short MODIFICATION = 1; - const unsigned short ADDITION = 2; - const unsigned short REMOVAL = 3; - - readonly attribute Node? relatedNode; - readonly attribute DOMString prevValue; - readonly attribute DOMString newValue; - readonly attribute DOMString attrName; - readonly attribute unsigned short attrChange; - - undefined initMutationEvent(DOMString typeArg, - optional boolean bubblesArg = false, - optional boolean cancelableArg = false, - optional Node? relatedNodeArg = null, - optional DOMString prevValueArg = "", - optional DOMString newValueArg = "", - optional DOMString attrNameArg = "", - optional unsigned short attrChangeArg = 0); -}; diff --git a/test/fixtures/wpt/interfaces/webgpu.idl b/test/fixtures/wpt/interfaces/webgpu.idl index df82c2becd5..74021895a8f 100644 --- a/test/fixtures/wpt/interfaces/webgpu.idl +++ b/test/fixtures/wpt/interfaces/webgpu.idl @@ -78,6 +78,7 @@ interface GPU { }; dictionary GPURequestAdapterOptions { + any featureLevel; GPUPowerPreference powerPreference; boolean forceFallbackAdapter = false; }; @@ -111,6 +112,7 @@ enum GPUFeatureName { "texture-compression-bc-sliced-3d", "texture-compression-etc2", "texture-compression-astc", + "texture-compression-astc-sliced-3d", "timestamp-query", "indirect-first-instance", "shader-f16", @@ -639,7 +641,7 @@ interface mixin GPUPipelineBase { dictionary GPUProgrammableStage { required GPUShaderModule module; USVString entryPoint; - record constants; + record constants = {}; }; typedef double GPUPipelineConstantValue; // May represent WGSL's bool, f32, i32, u32, and f16 if enabled.