Skip to content

Commit 7372de8

Browse files
authored
Co-authored-by: saschanaz <[email protected]>
1 parent 7d3bb6f commit 7372de8

8 files changed

+94
-55
lines changed

Diff for: baselines/dom.generated.d.ts

+24-13
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,29 @@ interface AuthenticationExtensionsClientInputs {
119119
credProps?: boolean;
120120
hmacCreateSecret?: boolean;
121121
minPinLength?: boolean;
122+
prf?: AuthenticationExtensionsPRFInputs;
122123
}
123124

124125
interface AuthenticationExtensionsClientOutputs {
125126
appid?: boolean;
126127
credProps?: CredentialPropertiesOutput;
127128
hmacCreateSecret?: boolean;
129+
prf?: AuthenticationExtensionsPRFOutputs;
130+
}
131+
132+
interface AuthenticationExtensionsPRFInputs {
133+
eval?: AuthenticationExtensionsPRFValues;
134+
evalByCredential?: Record<string, AuthenticationExtensionsPRFValues>;
135+
}
136+
137+
interface AuthenticationExtensionsPRFOutputs {
138+
enabled?: boolean;
139+
results?: AuthenticationExtensionsPRFValues;
140+
}
141+
142+
interface AuthenticationExtensionsPRFValues {
143+
first: BufferSource;
144+
second?: BufferSource;
128145
}
129146

130147
interface AuthenticatorSelectionCriteria {
@@ -684,16 +701,6 @@ interface InputEventInit extends UIEventInit {
684701
targetRanges?: StaticRange[];
685702
}
686703

687-
interface IntersectionObserverEntryInit {
688-
boundingClientRect: DOMRectInit;
689-
intersectionRatio: number;
690-
intersectionRect: DOMRectInit;
691-
isIntersecting: boolean;
692-
rootBounds: DOMRectInit | null;
693-
target: Element;
694-
time: DOMHighResTimeStamp;
695-
}
696-
697704
interface IntersectionObserverInit {
698705
root?: Element | Document | null;
699706
rootMargin?: string;
@@ -903,6 +910,7 @@ interface MediaStreamTrackEventInit extends EventInit {
903910
interface MediaTrackCapabilities {
904911
aspectRatio?: DoubleRange;
905912
autoGainControl?: boolean[];
913+
backgroundBlur?: boolean[];
906914
channelCount?: ULongRange;
907915
deviceId?: string;
908916
displaySurface?: string;
@@ -920,6 +928,7 @@ interface MediaTrackCapabilities {
920928
interface MediaTrackConstraintSet {
921929
aspectRatio?: ConstrainDouble;
922930
autoGainControl?: ConstrainBoolean;
931+
backgroundBlur?: ConstrainBoolean;
923932
channelCount?: ConstrainULong;
924933
deviceId?: ConstrainDOMString;
925934
displaySurface?: ConstrainDOMString;
@@ -941,6 +950,7 @@ interface MediaTrackConstraints extends MediaTrackConstraintSet {
941950
interface MediaTrackSettings {
942951
aspectRatio?: number;
943952
autoGainControl?: boolean;
953+
backgroundBlur?: boolean;
944954
channelCount?: number;
945955
deviceId?: string;
946956
displaySurface?: string;
@@ -958,6 +968,7 @@ interface MediaTrackSettings {
958968
interface MediaTrackSupportedConstraints {
959969
aspectRatio?: boolean;
960970
autoGainControl?: boolean;
971+
backgroundBlur?: boolean;
961972
channelCount?: boolean;
962973
deviceId?: boolean;
963974
displaySurface?: boolean;
@@ -8732,7 +8743,7 @@ interface FontFaceSet extends EventTarget {
87328743

87338744
declare var FontFaceSet: {
87348745
prototype: FontFaceSet;
8735-
new(initialFaces: FontFace[]): FontFaceSet;
8746+
new(): FontFaceSet;
87368747
};
87378748

87388749
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSetLoadEvent) */
@@ -14205,7 +14216,7 @@ interface IntersectionObserverEntry {
1420514216

1420614217
declare var IntersectionObserverEntry: {
1420714218
prototype: IntersectionObserverEntry;
14208-
new(intersectionObserverEntryInit: IntersectionObserverEntryInit): IntersectionObserverEntry;
14219+
new(): IntersectionObserverEntry;
1420914220
};
1421014221

1421114222
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/KHR_parallel_shader_compile) */
@@ -21709,7 +21720,7 @@ interface SubtleCrypto {
2170921720
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/decrypt) */
2171021721
decrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
2171121722
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveBits) */
21712-
deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise<ArrayBuffer>;
21723+
deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length?: number | null): Promise<ArrayBuffer>;
2171321724
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey) */
2171421725
deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
2171521726
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/digest) */

Diff for: baselines/serviceworker.generated.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -2746,7 +2746,7 @@ interface FontFaceSet extends EventTarget {
27462746

27472747
declare var FontFaceSet: {
27482748
prototype: FontFaceSet;
2749-
new(initialFaces: FontFace[]): FontFaceSet;
2749+
new(): FontFaceSet;
27502750
};
27512751

27522752
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSetLoadEvent) */
@@ -5028,7 +5028,7 @@ interface SubtleCrypto {
50285028
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/decrypt) */
50295029
decrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
50305030
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveBits) */
5031-
deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise<ArrayBuffer>;
5031+
deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length?: number | null): Promise<ArrayBuffer>;
50325032
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey) */
50335033
deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
50345034
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/digest) */

Diff for: baselines/sharedworker.generated.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -2635,7 +2635,7 @@ interface FontFaceSet extends EventTarget {
26352635

26362636
declare var FontFaceSet: {
26372637
prototype: FontFaceSet;
2638-
new(initialFaces: FontFace[]): FontFaceSet;
2638+
new(): FontFaceSet;
26392639
};
26402640

26412641
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSetLoadEvent) */
@@ -4835,7 +4835,7 @@ interface SubtleCrypto {
48354835
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/decrypt) */
48364836
decrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
48374837
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveBits) */
4838-
deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise<ArrayBuffer>;
4838+
deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length?: number | null): Promise<ArrayBuffer>;
48394839
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey) */
48404840
deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
48414841
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/digest) */

Diff for: baselines/webworker.generated.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -3012,7 +3012,7 @@ interface FontFaceSet extends EventTarget {
30123012

30133013
declare var FontFaceSet: {
30143014
prototype: FontFaceSet;
3015-
new(initialFaces: FontFace[]): FontFaceSet;
3015+
new(): FontFaceSet;
30163016
};
30173017

30183018
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSetLoadEvent) */
@@ -5407,7 +5407,7 @@ interface SubtleCrypto {
54075407
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/decrypt) */
54085408
decrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
54095409
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveBits) */
5410-
deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise<ArrayBuffer>;
5410+
deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length?: number | null): Promise<ArrayBuffer>;
54115411
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey) */
54125412
deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
54135413
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/digest) */

Diff for: inputfiles/overridingTypes.jsonc

+21
Original file line numberDiff line numberDiff line change
@@ -3214,7 +3214,15 @@
32143214
}
32153215
}
32163216
},
3217+
"MIDIAccess": {
3218+
"exposed": "Window", // Window only on Gecko/Blink as of 2024-07
3219+
"transferable": false // Not transferable on Gecko/Blink as of 2024-07
3220+
},
3221+
"MIDIConnectionEvent": {
3222+
"exposed": "Window" // Window only on Gecko/Blink as of 2024-07
3223+
},
32173224
"MIDIInput": {
3225+
"exposed": "Window", // Window only on Gecko/Blink as of 2024-07
32183226
"events": {
32193227
"event": [
32203228
{
@@ -3224,7 +3232,20 @@
32243232
]
32253233
}
32263234
},
3235+
"MIDIInputMap": {
3236+
"exposed": "Window" // Window only on Gecko/Blink as of 2024-07
3237+
},
3238+
"MIDIMessageEvent": {
3239+
"exposed": "Window" // Window only on Gecko/Blink as of 2024-07
3240+
},
3241+
"MIDIOutput": {
3242+
"exposed": "Window" // Window only on Gecko/Blink as of 2024-07
3243+
},
3244+
"MIDIOutputMap": {
3245+
"exposed": "Window" // Window only on Gecko/Blink as of 2024-07
3246+
},
32273247
"MIDIPort": {
3248+
"exposed": "Window", // Window only on Gecko/Blink as of 2024-07
32283249
"events": {
32293250
"event": [
32303251
{

Diff for: inputfiles/removedTypes.jsonc

+17-16
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,14 @@
2121
},
2222
"MediaSessionAction": {
2323
"value": [
24-
"enterpictureinpicture", // Blink only as of 2023-10
25-
"hangup", // Blink only as of 2022-09
26-
"nextslide", // Blink only as of as of 2024-06
27-
"previousslide", // Blink only as of as of 2024-06
28-
"togglecamera", // Blink only as of 2022-09
29-
"togglemicrophone", // Blink only as of 2022-09
30-
"togglescreenshare" // No implementation as of 2022-09
24+
"enterpictureinpicture", // Blink only as of 2024-07
25+
"hangup", // Blink only as of 2024-07
26+
"nextslide", // Blink only as of as of 2024-07
27+
"previousslide", // Blink only as of as of 2024-07
28+
"togglecamera", // Blink only as of 2024-07
29+
"togglemicrophone", // Blink only as of 2024-07
30+
"togglescreenshare", // No implementation as of 2024-07
31+
"voiceactivity" // No implementation as of 2024-07
3132
]
3233
},
3334
"RequestDestination": {
@@ -93,8 +94,7 @@
9394
"CSSRule": {
9495
"constants": {
9596
"constant": {
96-
"MARGIN_RULE": null, // WebKit only as of 2023-10
97-
"VIEW_TRANSITION_RULE": null // No implementation as of 2023-10
97+
"MARGIN_RULE": null // WebKit only as of 2023-10
9898
}
9999
}
100100
},
@@ -108,6 +108,9 @@
108108
}
109109
}
110110
},
111+
"IntersectionObserverEntry": {
112+
"constructor": null // WebKit-only as of 2024-07
113+
},
111114
"PaymentResponse": {
112115
"methods": {
113116
"method": {
@@ -213,9 +216,7 @@
213216
"hmacGetSecret": null, // No implementation as of 2023-11
214217
"largeBlob": null,
215218
"payment": null,
216-
"prf": null,
217-
"supplementalPubKeys": null, // No implementation as of 2023-11
218-
"uvm": null
219+
"supplementalPubKeys": null // No implementation as of 2023-11
219220
}
220221
}
221222
},
@@ -226,9 +227,7 @@
226227
"appidExclude": null, // No implementation as of 2023-11
227228
"hmacGetSecret": null, // No implementation as of 2023-11
228229
"largeBlob": null,
229-
"prf": null,
230-
"supplementalPubKeys": null, // No implementation as of 2023-11
231-
"uvm": null
230+
"supplementalPubKeys": null // No implementation as of 2023-11
232231
}
233232
}
234233
},
@@ -309,7 +308,9 @@
309308
"IntersectionObserverInit": {
310309
"members": {
311310
"member": {
312-
"scrollMargin": null // Blink only as of 2023-10
311+
"delay": null, // Blink only as of 2024-07
312+
"scrollMargin": null, // Blink only as of 2024-07
313+
"trackVisibility": null // Blink only as of 2024-07
313314
}
314315
}
315316
},

Diff for: package-lock.json

+8-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: src/build.ts

+18-14
Original file line numberDiff line numberDiff line change
@@ -116,20 +116,6 @@ async function emitDom() {
116116
await Promise.all([...(await getWebidls()).entries()].map(convertWidl))
117117
).filter((i) => i) as ReturnType<typeof convert>[];
118118

119-
const transferables = widlStandardTypes.flatMap((st) => {
120-
return Object.values(st.browser.interfaces?.interface ?? {}).filter(
121-
(i) => i.transferable,
122-
);
123-
});
124-
125-
addedItems.typedefs.typedef.push({
126-
name: "Transferable",
127-
type: [
128-
...transferables.map((v) => ({ type: v.name })),
129-
{ type: "ArrayBuffer" },
130-
],
131-
});
132-
133119
async function convertWidl([shortName, idl]: string[]) {
134120
let commentsMap: Record<string, string>;
135121
try {
@@ -271,6 +257,24 @@ async function emitDom() {
271257
}
272258
}
273259

260+
const transferables = Object.values(
261+
webidl.interfaces?.interface ?? {},
262+
).filter((i) => i.transferable);
263+
264+
webidl = merge(webidl, {
265+
typedefs: {
266+
typedef: [
267+
{
268+
name: "Transferable",
269+
type: [
270+
...transferables.map((v) => ({ type: v.name })),
271+
{ type: "ArrayBuffer" },
272+
],
273+
},
274+
],
275+
},
276+
});
277+
274278
const knownTypes = await readInputJSON("knownTypes.json");
275279

276280
emitFlavor(webidl, new Set(knownTypes.Window), {

0 commit comments

Comments
 (0)