Skip to content

Commit

Permalink
Add IDL for several missing features (#1795)
Browse files Browse the repository at this point in the history
  • Loading branch information
queengooborg authored Sep 8, 2024
1 parent 07e965c commit 080063a
Show file tree
Hide file tree
Showing 10 changed files with 83 additions and 1 deletion.
10 changes: 10 additions & 0 deletions custom/idl/WebGPU.idl
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,13 @@ partial interface GPUComputePassEncoder {
partial interface GPURenderPassEncoder {
undefined writeTimestamp();
};

// Removed from the spec

partial interface GPUAdapter {
undefined requestAdapterInfo();
};

partial interface GPUSupportedLimits {
attribute long maxInterStageShaderComponents;
};
7 changes: 7 additions & 0 deletions custom/idl/cssom.idl
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,10 @@ partial interface Document {
readonly attribute FrozenArray<DOMString> styleSheetSets;
undefined enableStyleSheetsForSet(DOMString? name);
};

// Moved to CSSStyleProperties in spec, but has not yet been moved in browser implementations

[Exposed=Window]
partial interface CSSStyleDeclaration {
[CEReactions] attribute [LegacyNullToEmptyString] CSSOMString cssFloat;
};
6 changes: 6 additions & 0 deletions custom/idl/font-loading.idl
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,9 @@
partial interface FontFace {
attribute CSSOMString variant;
};

// Non-standard

partial interface FontFaceSet {
constructor();
};
6 changes: 6 additions & 0 deletions custom/idl/html.idl
Original file line number Diff line number Diff line change
Expand Up @@ -273,3 +273,9 @@ partial interface HTMLMediaElement {
partial interface HTMLAnchorElement {
[CEReactions]attribute DOMString hrefTranslate;
};

// Non-standard

partial interface HTMLElement {
attribute HTMLAnchorElement anchorElement;
};
5 changes: 5 additions & 0 deletions custom/idl/ink-presenter.idl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// Removed from the spec

partial interface InkPresenter {
attribute boolean expectedImprovement;
};
13 changes: 13 additions & 0 deletions custom/idl/invokers.idl
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// https://github.com/whatwg/html/pull/9841 -- renamed to command attributes

partial interface HTMLButtonElement {
attribute DOMString invokeaction;
attribute DOMString invoketarget;
};

[Exposed=Window]
interface InvokeEvent {
constructor();
attribute DOMString invoker;
attribute DOMString action;
};
3 changes: 3 additions & 0 deletions custom/idl/mediacapture.idl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
partial interface Navigator {
undefined getUserMedia();
};
3 changes: 3 additions & 0 deletions custom/idl/offscreen-canvas.idl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
partial interface OffscreenCanvasRenderingContext2D {
undefined commit();
};
26 changes: 26 additions & 0 deletions custom/idl/shared-storage.idl
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Removed from the spec

[Exposed=Window]
interface SharedStorageOperation {};

[Exposed=Window]
interface SharedStorageRunOperation {
attribute any run;
};

[Exposed=Window]
interface SharedStorageSelectURLOperation {
attribute any run;
};

[Exposed=Window]
interface WindowSharedStorage {
attribute SharedStorageRunOperation run;
attribute SharedStorageSelectURLOperation selectURL;
attribute WorkletSharedStorage worklet;
};

[Exposed=Window]
interface WorkletSharedStorage {
maplike<DOMString, any>;
};
5 changes: 4 additions & 1 deletion test-builder/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ const mergeMembers = (target, source) => {
const targetMembers = new Set(target.members.map((m) => m.name));
const sourceMembers = new Set();
for (const member of source.members) {
if (targetMembers.has(member.name)) {
if (!member.name) {
// Constructors and other nameless members should just be added
sourceMembers.add(member);
} else if (targetMembers.has(member.name)) {
const targetMember = target.members.find((m) => m.name);
// Static members may have the same name as a non-static member.
// If target has static member with same name, remove from target.
Expand Down

0 comments on commit 080063a

Please sign in to comment.