Skip to content

Commit

Permalink
chore: update WPT (#3607)
Browse files Browse the repository at this point in the history
Co-authored-by: Uzlopak <5059100+Uzlopak@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and Uzlopak authored Sep 14, 2024
1 parent c773728 commit 881fd5d
Show file tree
Hide file tree
Showing 9 changed files with 195 additions and 44 deletions.
2 changes: 1 addition & 1 deletion test/fixtures/wpt/interfaces/css-fonts.idl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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<undefined> 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;
Expand Down
4 changes: 2 additions & 2 deletions test/fixtures/wpt/interfaces/ink-enhancement.idl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

[Exposed=Window]
interface Ink {
Promise<InkPresenter> requestPresenter(
Promise<DelegatedInkTrailPresenter> requestPresenter(
optional InkPresenterParam param = {});
};

Expand All @@ -14,7 +14,7 @@ dictionary InkPresenterParam {
};

[Exposed=Window]
interface InkPresenter {
interface DelegatedInkTrailPresenter {
readonly attribute Element? presentationArea;

undefined updateInkTrailStartPoint(PointerEvent event, InkTrailStyle style);
Expand Down
106 changes: 106 additions & 0 deletions test/fixtures/wpt/interfaces/observable.idl
Original file line number Diff line number Diff line change
@@ -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<sequence<any>> toArray(optional SubscribeOptions options = {});
Promise<undefined> forEach(Visitor callback, optional SubscribeOptions options = {});
Promise<boolean> every(Predicate predicate, optional SubscribeOptions options = {});
Promise<any> first(optional SubscribeOptions options = {});
Promise<any> last(optional SubscribeOptions options = {});
Promise<any> find(Predicate predicate, optional SubscribeOptions options = {});
Promise<boolean> some(Predicate predicate, optional SubscribeOptions options = {});
Promise<any> 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 = {});
};
73 changes: 73 additions & 0 deletions test/fixtures/wpt/interfaces/private-aggregation-api.idl
Original file line number Diff line number Diff line change
@@ -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<bigint> auctionReportBuyerKeys;
record<DOMString, AuctionReportBuyersConfig> auctionReportBuyers;
AuctionReportBuyerDebugModeConfig auctionReportBuyerDebugModeConfig;
};

dictionary ProtectedAudiencePrivateAggregationConfig {
USVString aggregationCoordinatorOrigin;
};

partial dictionary AuctionAdConfig {
ProtectedAudiencePrivateAggregationConfig privateAggregationConfig;
};

partial dictionary AuctionAdInterestGroup {
ProtectedAudiencePrivateAggregationConfig privateAggregationConfig;
};
8 changes: 8 additions & 0 deletions test/fixtures/wpt/interfaces/shared-storage.idl
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ interface SharedStorageWorkletGlobalScope : WorkletGlobalScope {
Function operationCtor);

readonly attribute SharedStorage sharedStorage;
readonly attribute PrivateAggregation privateAggregation;
};

dictionary SharedStorageUrlWithMetadata {
Expand Down Expand Up @@ -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 {
Expand Down
23 changes: 0 additions & 23 deletions test/fixtures/wpt/interfaces/uievents.idl
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};
4 changes: 3 additions & 1 deletion test/fixtures/wpt/interfaces/webgpu.idl
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ interface GPU {
};

dictionary GPURequestAdapterOptions {
any featureLevel;
GPUPowerPreference powerPreference;
boolean forceFallbackAdapter = false;
};
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -639,7 +641,7 @@ interface mixin GPUPipelineBase {
dictionary GPUProgrammableStage {
required GPUShaderModule module;
USVString entryPoint;
record<USVString, GPUPipelineConstantValue> constants;
record<USVString, GPUPipelineConstantValue> constants = {};
};

typedef double GPUPipelineConstantValue; // May represent WGSL's bool, f32, i32, u32, and f16 if enabled.
Expand Down

0 comments on commit 881fd5d

Please sign in to comment.