Skip to content

Commit 782f06b

Browse files
chore: update WPT (#4062)
Co-authored-by: Uzlopak <[email protected]>
1 parent 608d5f6 commit 782f06b

15 files changed

+377
-51
lines changed

test/fixtures/wpt/interfaces/command-and-commandfor.tentative.idl

-15
This file was deleted.

test/fixtures/wpt/interfaces/fedcm.idl

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ dictionary IdentityCredentialDisconnectOptions : IdentityProviderConfig {
99

1010
[Exposed=Window, SecureContext]
1111
interface IdentityCredential : Credential {
12-
static Promise<undefined> disconnect(optional IdentityCredentialDisconnectOptions options = {});
12+
static Promise<undefined> disconnect(IdentityCredentialDisconnectOptions options);
1313
readonly attribute USVString? token;
1414
readonly attribute boolean isAutoSelected;
1515
};

test/fixtures/wpt/interfaces/gamepad-extensions.idl

-9
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,10 @@ interface GamepadPose {
2222
readonly attribute Float32Array? angularAcceleration;
2323
};
2424

25-
[Exposed=Window, SecureContext]
26-
interface GamepadTouch {
27-
readonly attribute unsigned long touchId;
28-
readonly attribute octet surfaceId;
29-
readonly attribute Float32Array position;
30-
readonly attribute Uint32Array? surfaceDimensions;
31-
};
32-
3325
partial interface Gamepad {
3426
readonly attribute GamepadHand hand;
3527
readonly attribute FrozenArray<GamepadHapticActuator> hapticActuators;
3628
readonly attribute GamepadPose? pose;
37-
readonly attribute FrozenArray<GamepadTouch>? touchEvents;
3829
};
3930

4031
[Exposed=Window]

test/fixtures/wpt/interfaces/gamepad.idl

+8
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ interface Gamepad {
1212
readonly attribute GamepadMappingType mapping;
1313
readonly attribute FrozenArray<double> axes;
1414
readonly attribute FrozenArray<GamepadButton> buttons;
15+
readonly attribute FrozenArray<GamepadTouch> touches;
1516
[SameObject] readonly attribute GamepadHapticActuator vibrationActuator;
1617
};
1718

@@ -22,6 +23,13 @@ interface GamepadButton {
2223
readonly attribute double value;
2324
};
2425

26+
dictionary GamepadTouch {
27+
unsigned long touchId;
28+
octet surfaceId;
29+
DOMPointReadOnly position;
30+
DOMRectReadOnly? surfaceDimensions;
31+
};
32+
2533
enum GamepadMappingType {
2634
"",
2735
"standard",

test/fixtures/wpt/interfaces/html.idl

+18-3
Original file line numberDiff line numberDiff line change
@@ -957,6 +957,8 @@ HTMLInputElement includes PopoverInvokerElement;
957957
interface HTMLButtonElement : HTMLElement {
958958
[HTMLConstructor] constructor();
959959

960+
[CEReactions] attribute DOMString command;
961+
[CEReactions] attribute Element? commandForElement;
960962
[CEReactions] attribute boolean disabled;
961963
readonly attribute HTMLFormElement? form;
962964
[CEReactions] attribute USVString formAction;
@@ -1450,10 +1452,10 @@ interface mixin CanvasDrawImage {
14501452
interface mixin CanvasImageData {
14511453
// pixel manipulation
14521454
ImageData createImageData([EnforceRange] long sw, [EnforceRange] long sh, optional ImageDataSettings settings = {});
1453-
ImageData createImageData(ImageData imagedata);
1455+
ImageData createImageData(ImageData imageData);
14541456
ImageData getImageData([EnforceRange] long sx, [EnforceRange] long sy, [EnforceRange] long sw, [EnforceRange] long sh, optional ImageDataSettings settings = {});
1455-
undefined putImageData(ImageData imagedata, [EnforceRange] long dx, [EnforceRange] long dy);
1456-
undefined putImageData(ImageData imagedata, [EnforceRange] long dx, [EnforceRange] long dy, [EnforceRange] long dirtyX, [EnforceRange] long dirtyY, [EnforceRange] long dirtyWidth, [EnforceRange] long dirtyHeight);
1457+
undefined putImageData(ImageData imageData, [EnforceRange] long dx, [EnforceRange] long dy);
1458+
undefined putImageData(ImageData imageData, [EnforceRange] long dx, [EnforceRange] long dy, [EnforceRange] long dirtyX, [EnforceRange] long dirtyY, [EnforceRange] long dirtyWidth, [EnforceRange] long dirtyHeight);
14571459
};
14581460

14591461
enum CanvasLineCap { "butt", "round", "square" };
@@ -1710,6 +1712,18 @@ dictionary ToggleEventInit : EventInit {
17101712
DOMString newState = "";
17111713
};
17121714

1715+
[Exposed=Window]
1716+
interface CommandEvent : Event {
1717+
constructor(DOMString type, optional CommandEventInit eventInitDict = {});
1718+
readonly attribute Element? source;
1719+
readonly attribute DOMString command;
1720+
};
1721+
1722+
dictionary CommandEventInit : EventInit {
1723+
Element? source = null;
1724+
DOMString command = "";
1725+
};
1726+
17131727
dictionary FocusOptions {
17141728
boolean preventScroll = false;
17151729
boolean focusVisible;
@@ -2195,6 +2209,7 @@ interface mixin GlobalEventHandlers {
21952209
attribute EventHandler onchange;
21962210
attribute EventHandler onclick;
21972211
attribute EventHandler onclose;
2212+
attribute EventHandler oncommand;
21982213
attribute EventHandler oncontextlost;
21992214
attribute EventHandler oncontextmenu;
22002215
attribute EventHandler oncontextrestored;

test/fixtures/wpt/interfaces/media-capabilities.idl

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ dictionary MediaCapabilitiesInfo {
9090
};
9191

9292
dictionary MediaCapabilitiesDecodingInfo : MediaCapabilitiesInfo {
93-
required MediaKeySystemAccess keySystemAccess;
93+
required MediaKeySystemAccess? keySystemAccess;
9494
MediaDecodingConfiguration configuration;
9595
};
9696

test/fixtures/wpt/interfaces/mediacapture-surface-control.idl

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
partial interface CaptureController {
77
sequence<long> getSupportedZoomLevels();
8-
long getZoomLevel();
8+
readonly attribute long? zoomLevel;
99
Promise<undefined> increaseZoomLevel();
1010
Promise<undefined> decreaseZoomLevel();
1111
Promise<undefined> resetZoomLevel();

test/fixtures/wpt/interfaces/ppa.idl

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
// GENERATED CONTENT - DO NOT EDIT
2+
// Content was automatically extracted by Reffy into webref
3+
// (https://github.com/w3c/webref)
4+
// Source: Privacy-Preserving Attribution: Level 1 (https://w3c.github.io/ppa/)
5+
6+
partial interface Navigator {
7+
[SecureContext, SameObject] readonly attribute PrivateAttribution privateAttribution;
8+
};
9+
10+
enum PrivateAttributionProtocol { "dap-12-histogram", "tee-00" };
11+
12+
dictionary PrivateAttributionAggregationService {
13+
required DOMString url;
14+
required DOMString protocol;
15+
};
16+
17+
[SecureContext, Exposed=Window]
18+
interface PrivateAttributionAggregationServices {
19+
readonly setlike<PrivateAttributionAggregationService>;
20+
};
21+
22+
[SecureContext, Exposed=Window]
23+
interface PrivateAttribution {
24+
readonly attribute PrivateAttributionAggregationServices aggregationServices;
25+
};
26+
27+
dictionary PrivateAttributionImpressionOptions {
28+
required unsigned long histogramIndex;
29+
unsigned long filterData = 0;
30+
required DOMString conversionSite;
31+
unsigned long lifetimeDays = 30;
32+
};
33+
34+
[SecureContext, Exposed=Window]
35+
partial interface PrivateAttribution {
36+
undefined saveImpression(PrivateAttributionImpressionOptions options);
37+
};
38+
39+
dictionary PrivateAttributionConversionOptions {
40+
required DOMString aggregationService;
41+
double epsilon = 1.0;
42+
43+
required unsigned long histogramSize;
44+
45+
PrivateAttributionLogic logic = "last-touch";
46+
unsigned long value = 1;
47+
unsigned long maxValue = 1;
48+
49+
unsigned long lookbackDays;
50+
unsigned long filterData;
51+
sequence<DOMString> impressionSites = [];
52+
sequence<DOMString> intermediarySites = [];
53+
};
54+
55+
dictionary PrivateAttributionConversionResult {
56+
required Uint8Array report;
57+
};
58+
59+
[SecureContext, Exposed=Window]
60+
partial interface PrivateAttribution {
61+
Promise<PrivateAttributionConversionResult> measureConversion(PrivateAttributionConversionOptions options);
62+
};
63+
64+
enum PrivateAttributionLogic {
65+
"last-touch",
66+
};

test/fixtures/wpt/interfaces/sanitizer-api.idl

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dictionary SetHTMLUnsafeOptions {
1111
(Sanitizer or SanitizerConfig or SanitizerPresets) sanitizer = {};
1212
};
1313

14-
[Exposed=(Window,Worker)]
14+
[Exposed=Window]
1515
interface Sanitizer {
1616
constructor(optional (SanitizerConfig or SanitizerPresets) configuration = "default");
1717

Original file line numberDiff line numberDiff line change
@@ -1,17 +1,61 @@
11
// https://wicg.github.io/sanitizer-api/
22

3-
[
4-
Exposed=Window,
5-
SecureContext
6-
] interface Sanitizer {
7-
constructor(optional SanitizerConfig sanitizerConfig = {});
8-
DocumentFragment sanitize((DocumentFragment or Document) input);
3+
enum SanitizerPresets { "default" };
4+
dictionary SetHTMLOptions {
5+
(Sanitizer or SanitizerConfig or SanitizerPresets) sanitizer = "default";
6+
};
7+
dictionary SetHTMLUnsafeOptions {
8+
(Sanitizer or SanitizerConfig or SanitizerPresets) sanitizer = {};
9+
};
10+
11+
[Exposed=Window]
12+
interface Sanitizer {
13+
constructor(optional (SanitizerConfig or SanitizerPresets) configuration = "default");
14+
15+
// Query configuration:
16+
SanitizerConfig get();
17+
18+
// Modify a Sanitizer’s lists and fields:
19+
undefined allowElement(SanitizerElementWithAttributes element);
20+
undefined removeElement(SanitizerElement element);
21+
undefined replaceElementWithChildren(SanitizerElement element);
22+
undefined allowAttribute(SanitizerAttribute attribute);
23+
undefined removeAttribute(SanitizerAttribute attribute);
24+
undefined setComments(boolean allow);
25+
undefined setDataAttributes(boolean allow);
26+
27+
// Remove markup that executes script. May modify multiple lists:
28+
undefined removeUnsafe();
29+
};
30+
31+
dictionary SanitizerElementNamespace {
32+
required DOMString name;
33+
DOMString? _namespace = "http://www.w3.org/1999/xhtml";
934
};
1035

36+
// Used by "elements"
37+
dictionary SanitizerElementNamespaceWithAttributes : SanitizerElementNamespace {
38+
sequence<SanitizerAttribute> attributes;
39+
sequence<SanitizerAttribute> removeAttributes;
40+
};
41+
42+
typedef (DOMString or SanitizerElementNamespace) SanitizerElement;
43+
typedef (DOMString or SanitizerElementNamespaceWithAttributes) SanitizerElementWithAttributes;
44+
45+
dictionary SanitizerAttributeNamespace {
46+
required DOMString name;
47+
DOMString? _namespace = null;
48+
};
49+
typedef (DOMString or SanitizerAttributeNamespace) SanitizerAttribute;
50+
1151
dictionary SanitizerConfig {
12-
sequence<DOMString> allowElements;
13-
sequence<DOMString> blockElements;
14-
sequence<DOMString> dropElements;
15-
sequence<DOMString> allowAttributes;
16-
sequence<DOMString> dropAttributes;
52+
sequence<SanitizerElementWithAttributes> elements;
53+
sequence<SanitizerElement> removeElements;
54+
sequence<SanitizerElement> replaceWithChildrenElements;
55+
56+
sequence<SanitizerAttribute> attributes;
57+
sequence<SanitizerAttribute> removeAttributes;
58+
59+
boolean comments;
60+
boolean dataAttributes;
1761
};

test/fixtures/wpt/interfaces/speech-api.idl

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ interface SpeechRecognition : EventTarget {
1919
undefined start(MediaStreamTrack audioTrack);
2020
undefined stop();
2121
undefined abort();
22-
boolean onDeviceWebSpeechAvailable(DOMString lang);
23-
boolean installOnDeviceSpeechRecognition(DOMString lang);
22+
static Promise<boolean> availableOnDevice(DOMString lang);
23+
static Promise<boolean> installOnDevice(DOMString lang);
2424

2525
// event methods
2626
attribute EventHandler onaudiostart;

test/fixtures/wpt/interfaces/webnn.idl

-7
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,13 @@ interface mixin NavigatorML {
99
Navigator includes NavigatorML;
1010
WorkerNavigator includes NavigatorML;
1111

12-
enum MLDeviceType {
13-
"cpu",
14-
"gpu",
15-
"npu"
16-
};
17-
1812
enum MLPowerPreference {
1913
"default",
2014
"high-performance",
2115
"low-power"
2216
};
2317

2418
dictionary MLContextOptions {
25-
MLDeviceType deviceType = "cpu";
2619
MLPowerPreference powerPreference = "default";
2720
};
2821

0 commit comments

Comments
 (0)