Skip to content

Commit

Permalink
chore: update WPT (#4062)
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 Feb 25, 2025
1 parent 608d5f6 commit 782f06b
Show file tree
Hide file tree
Showing 15 changed files with 377 additions and 51 deletions.
15 changes: 0 additions & 15 deletions test/fixtures/wpt/interfaces/command-and-commandfor.tentative.idl

This file was deleted.

2 changes: 1 addition & 1 deletion test/fixtures/wpt/interfaces/fedcm.idl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dictionary IdentityCredentialDisconnectOptions : IdentityProviderConfig {

[Exposed=Window, SecureContext]
interface IdentityCredential : Credential {
static Promise<undefined> disconnect(optional IdentityCredentialDisconnectOptions options = {});
static Promise<undefined> disconnect(IdentityCredentialDisconnectOptions options);
readonly attribute USVString? token;
readonly attribute boolean isAutoSelected;
};
Expand Down
9 changes: 0 additions & 9 deletions test/fixtures/wpt/interfaces/gamepad-extensions.idl
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,10 @@ interface GamepadPose {
readonly attribute Float32Array? angularAcceleration;
};

[Exposed=Window, SecureContext]
interface GamepadTouch {
readonly attribute unsigned long touchId;
readonly attribute octet surfaceId;
readonly attribute Float32Array position;
readonly attribute Uint32Array? surfaceDimensions;
};

partial interface Gamepad {
readonly attribute GamepadHand hand;
readonly attribute FrozenArray<GamepadHapticActuator> hapticActuators;
readonly attribute GamepadPose? pose;
readonly attribute FrozenArray<GamepadTouch>? touchEvents;
};

[Exposed=Window]
Expand Down
8 changes: 8 additions & 0 deletions test/fixtures/wpt/interfaces/gamepad.idl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ interface Gamepad {
readonly attribute GamepadMappingType mapping;
readonly attribute FrozenArray<double> axes;
readonly attribute FrozenArray<GamepadButton> buttons;
readonly attribute FrozenArray<GamepadTouch> touches;
[SameObject] readonly attribute GamepadHapticActuator vibrationActuator;
};

Expand All @@ -22,6 +23,13 @@ interface GamepadButton {
readonly attribute double value;
};

dictionary GamepadTouch {
unsigned long touchId;
octet surfaceId;
DOMPointReadOnly position;
DOMRectReadOnly? surfaceDimensions;
};

enum GamepadMappingType {
"",
"standard",
Expand Down
21 changes: 18 additions & 3 deletions test/fixtures/wpt/interfaces/html.idl
Original file line number Diff line number Diff line change
Expand Up @@ -957,6 +957,8 @@ HTMLInputElement includes PopoverInvokerElement;
interface HTMLButtonElement : HTMLElement {
[HTMLConstructor] constructor();

[CEReactions] attribute DOMString command;
[CEReactions] attribute Element? commandForElement;
[CEReactions] attribute boolean disabled;
readonly attribute HTMLFormElement? form;
[CEReactions] attribute USVString formAction;
Expand Down Expand Up @@ -1450,10 +1452,10 @@ interface mixin CanvasDrawImage {
interface mixin CanvasImageData {
// pixel manipulation
ImageData createImageData([EnforceRange] long sw, [EnforceRange] long sh, optional ImageDataSettings settings = {});
ImageData createImageData(ImageData imagedata);
ImageData createImageData(ImageData imageData);
ImageData getImageData([EnforceRange] long sx, [EnforceRange] long sy, [EnforceRange] long sw, [EnforceRange] long sh, optional ImageDataSettings settings = {});
undefined putImageData(ImageData imagedata, [EnforceRange] long dx, [EnforceRange] long dy);
undefined putImageData(ImageData imagedata, [EnforceRange] long dx, [EnforceRange] long dy, [EnforceRange] long dirtyX, [EnforceRange] long dirtyY, [EnforceRange] long dirtyWidth, [EnforceRange] long dirtyHeight);
undefined putImageData(ImageData imageData, [EnforceRange] long dx, [EnforceRange] long dy);
undefined putImageData(ImageData imageData, [EnforceRange] long dx, [EnforceRange] long dy, [EnforceRange] long dirtyX, [EnforceRange] long dirtyY, [EnforceRange] long dirtyWidth, [EnforceRange] long dirtyHeight);
};

enum CanvasLineCap { "butt", "round", "square" };
Expand Down Expand Up @@ -1710,6 +1712,18 @@ dictionary ToggleEventInit : EventInit {
DOMString newState = "";
};

[Exposed=Window]
interface CommandEvent : Event {
constructor(DOMString type, optional CommandEventInit eventInitDict = {});
readonly attribute Element? source;
readonly attribute DOMString command;
};

dictionary CommandEventInit : EventInit {
Element? source = null;
DOMString command = "";
};

dictionary FocusOptions {
boolean preventScroll = false;
boolean focusVisible;
Expand Down Expand Up @@ -2195,6 +2209,7 @@ interface mixin GlobalEventHandlers {
attribute EventHandler onchange;
attribute EventHandler onclick;
attribute EventHandler onclose;
attribute EventHandler oncommand;
attribute EventHandler oncontextlost;
attribute EventHandler oncontextmenu;
attribute EventHandler oncontextrestored;
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/wpt/interfaces/media-capabilities.idl
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ dictionary MediaCapabilitiesInfo {
};

dictionary MediaCapabilitiesDecodingInfo : MediaCapabilitiesInfo {
required MediaKeySystemAccess keySystemAccess;
required MediaKeySystemAccess? keySystemAccess;
MediaDecodingConfiguration configuration;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

partial interface CaptureController {
sequence<long> getSupportedZoomLevels();
long getZoomLevel();
readonly attribute long? zoomLevel;
Promise<undefined> increaseZoomLevel();
Promise<undefined> decreaseZoomLevel();
Promise<undefined> resetZoomLevel();
Expand Down
66 changes: 66 additions & 0 deletions test/fixtures/wpt/interfaces/ppa.idl
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
// GENERATED CONTENT - DO NOT EDIT
// Content was automatically extracted by Reffy into webref
// (https://github.com/w3c/webref)
// Source: Privacy-Preserving Attribution: Level 1 (https://w3c.github.io/ppa/)

partial interface Navigator {
[SecureContext, SameObject] readonly attribute PrivateAttribution privateAttribution;
};

enum PrivateAttributionProtocol { "dap-12-histogram", "tee-00" };

dictionary PrivateAttributionAggregationService {
required DOMString url;
required DOMString protocol;
};

[SecureContext, Exposed=Window]
interface PrivateAttributionAggregationServices {
readonly setlike<PrivateAttributionAggregationService>;
};

[SecureContext, Exposed=Window]
interface PrivateAttribution {
readonly attribute PrivateAttributionAggregationServices aggregationServices;
};

dictionary PrivateAttributionImpressionOptions {
required unsigned long histogramIndex;
unsigned long filterData = 0;
required DOMString conversionSite;
unsigned long lifetimeDays = 30;
};

[SecureContext, Exposed=Window]
partial interface PrivateAttribution {
undefined saveImpression(PrivateAttributionImpressionOptions options);
};

dictionary PrivateAttributionConversionOptions {
required DOMString aggregationService;
double epsilon = 1.0;

required unsigned long histogramSize;

PrivateAttributionLogic logic = "last-touch";
unsigned long value = 1;
unsigned long maxValue = 1;

unsigned long lookbackDays;
unsigned long filterData;
sequence<DOMString> impressionSites = [];
sequence<DOMString> intermediarySites = [];
};

dictionary PrivateAttributionConversionResult {
required Uint8Array report;
};

[SecureContext, Exposed=Window]
partial interface PrivateAttribution {
Promise<PrivateAttributionConversionResult> measureConversion(PrivateAttributionConversionOptions options);
};

enum PrivateAttributionLogic {
"last-touch",
};
2 changes: 1 addition & 1 deletion test/fixtures/wpt/interfaces/sanitizer-api.idl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dictionary SetHTMLUnsafeOptions {
(Sanitizer or SanitizerConfig or SanitizerPresets) sanitizer = {};
};

[Exposed=(Window,Worker)]
[Exposed=Window]
interface Sanitizer {
constructor(optional (SanitizerConfig or SanitizerPresets) configuration = "default");

Expand Down
66 changes: 55 additions & 11 deletions test/fixtures/wpt/interfaces/sanitizer-api.tentative.idl
Original file line number Diff line number Diff line change
@@ -1,17 +1,61 @@
// https://wicg.github.io/sanitizer-api/

[
Exposed=Window,
SecureContext
] interface Sanitizer {
constructor(optional SanitizerConfig sanitizerConfig = {});
DocumentFragment sanitize((DocumentFragment or Document) input);
enum SanitizerPresets { "default" };
dictionary SetHTMLOptions {
(Sanitizer or SanitizerConfig or SanitizerPresets) sanitizer = "default";
};
dictionary SetHTMLUnsafeOptions {
(Sanitizer or SanitizerConfig or SanitizerPresets) sanitizer = {};
};

[Exposed=Window]
interface Sanitizer {
constructor(optional (SanitizerConfig or SanitizerPresets) configuration = "default");

// Query configuration:
SanitizerConfig get();

// Modify a Sanitizer’s lists and fields:
undefined allowElement(SanitizerElementWithAttributes element);
undefined removeElement(SanitizerElement element);
undefined replaceElementWithChildren(SanitizerElement element);
undefined allowAttribute(SanitizerAttribute attribute);
undefined removeAttribute(SanitizerAttribute attribute);
undefined setComments(boolean allow);
undefined setDataAttributes(boolean allow);

// Remove markup that executes script. May modify multiple lists:
undefined removeUnsafe();
};

dictionary SanitizerElementNamespace {
required DOMString name;
DOMString? _namespace = "http://www.w3.org/1999/xhtml";
};

// Used by "elements"
dictionary SanitizerElementNamespaceWithAttributes : SanitizerElementNamespace {
sequence<SanitizerAttribute> attributes;
sequence<SanitizerAttribute> removeAttributes;
};

typedef (DOMString or SanitizerElementNamespace) SanitizerElement;
typedef (DOMString or SanitizerElementNamespaceWithAttributes) SanitizerElementWithAttributes;

dictionary SanitizerAttributeNamespace {
required DOMString name;
DOMString? _namespace = null;
};
typedef (DOMString or SanitizerAttributeNamespace) SanitizerAttribute;

dictionary SanitizerConfig {
sequence<DOMString> allowElements;
sequence<DOMString> blockElements;
sequence<DOMString> dropElements;
sequence<DOMString> allowAttributes;
sequence<DOMString> dropAttributes;
sequence<SanitizerElementWithAttributes> elements;
sequence<SanitizerElement> removeElements;
sequence<SanitizerElement> replaceWithChildrenElements;

sequence<SanitizerAttribute> attributes;
sequence<SanitizerAttribute> removeAttributes;

boolean comments;
boolean dataAttributes;
};
4 changes: 2 additions & 2 deletions test/fixtures/wpt/interfaces/speech-api.idl
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ interface SpeechRecognition : EventTarget {
undefined start(MediaStreamTrack audioTrack);
undefined stop();
undefined abort();
boolean onDeviceWebSpeechAvailable(DOMString lang);
boolean installOnDeviceSpeechRecognition(DOMString lang);
static Promise<boolean> availableOnDevice(DOMString lang);
static Promise<boolean> installOnDevice(DOMString lang);

// event methods
attribute EventHandler onaudiostart;
Expand Down
7 changes: 0 additions & 7 deletions test/fixtures/wpt/interfaces/webnn.idl
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,13 @@ interface mixin NavigatorML {
Navigator includes NavigatorML;
WorkerNavigator includes NavigatorML;

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

enum MLPowerPreference {
"default",
"high-performance",
"low-power"
};

dictionary MLContextOptions {
MLDeviceType deviceType = "cpu";
MLPowerPreference powerPreference = "default";
};

Expand Down
Loading

0 comments on commit 782f06b

Please sign in to comment.