LibWeb: Normalize all WebIDL definition lines to four leading spaces

This change takes all existing WebIDL files in the repo that had
definition lines without four leading spaces, and fixes them so they
have four leading spaces.
This commit is contained in:
sideshowbarker 2024-09-10 16:21:16 +09:00 committed by Sam Atkins
parent f9282f65d3
commit 51528ec677
Notes: github-actions[bot] 2024-09-10 20:17:56 +00:00
21 changed files with 108 additions and 110 deletions

View file

@ -3,15 +3,15 @@
// https://www.w3.org/TR/css-animations-1/#animationevent // https://www.w3.org/TR/css-animations-1/#animationevent
[Exposed=Window] [Exposed=Window]
interface AnimationEvent : Event { interface AnimationEvent : Event {
constructor(CSSOMString type, optional AnimationEventInit animationEventInitDict = {}); constructor(CSSOMString type, optional AnimationEventInit animationEventInitDict = {});
readonly attribute CSSOMString animationName; readonly attribute CSSOMString animationName;
readonly attribute double elapsedTime; readonly attribute double elapsedTime;
readonly attribute CSSOMString pseudoElement; readonly attribute CSSOMString pseudoElement;
}; };
// https://www.w3.org/TR/css-animations-1/#dictdef-animationeventinit // https://www.w3.org/TR/css-animations-1/#dictdef-animationeventinit
dictionary AnimationEventInit : EventInit { dictionary AnimationEventInit : EventInit {
CSSOMString animationName = ""; CSSOMString animationName = "";
double elapsedTime = 0.0; double elapsedTime = 0.0;
CSSOMString pseudoElement = ""; CSSOMString pseudoElement = "";
}; };

View file

@ -3,5 +3,5 @@
// https://www.w3.org/TR/css-animations-2/#cssanimation // https://www.w3.org/TR/css-animations-2/#cssanimation
[Exposed=Window] [Exposed=Window]
interface CSSAnimation : Animation { interface CSSAnimation : Animation {
readonly attribute CSSOMString animationName; readonly attribute CSSOMString animationName;
}; };

View file

@ -3,5 +3,5 @@
// https://drafts.csswg.org/css-transitions-2/#the-CSSTransition-interface // https://drafts.csswg.org/css-transitions-2/#the-CSSTransition-interface
[Exposed=Window] [Exposed=Window]
interface CSSTransition : Animation { interface CSSTransition : Animation {
readonly attribute CSSOMString transitionProperty; readonly attribute CSSOMString transitionProperty;
}; };

View file

@ -5,8 +5,8 @@ enum KeyUsage { "encrypt", "decrypt", "sign", "verify", "deriveKey", "deriveBits
// https://w3c.github.io/webcrypto/#cryptokey-interface // https://w3c.github.io/webcrypto/#cryptokey-interface
[SecureContext,Exposed=(Window,Worker),Serializable] [SecureContext,Exposed=(Window,Worker),Serializable]
interface CryptoKey { interface CryptoKey {
readonly attribute KeyType type; readonly attribute KeyType type;
readonly attribute boolean extractable; readonly attribute boolean extractable;
readonly attribute object algorithm; readonly attribute object algorithm;
readonly attribute object usages; readonly attribute object usages;
}; };

View file

@ -15,8 +15,7 @@ dictionary RsaOtherPrimesInfo {
DOMString t; DOMString t;
}; };
dictionary JsonWebKey dictionary JsonWebKey {
{
// The following fields are defined in Section 3.1 of JSON Web Key // The following fields are defined in Section 3.1 of JSON Web Key
DOMString kty; DOMString kty;
DOMString use; DOMString use;

View file

@ -4,16 +4,16 @@
// https://html.spec.whatwg.org/multipage/interaction.html#closewatcher // https://html.spec.whatwg.org/multipage/interaction.html#closewatcher
[Exposed=Window] [Exposed=Window]
interface CloseWatcher : EventTarget { interface CloseWatcher : EventTarget {
constructor(optional CloseWatcherOptions options = {}); constructor(optional CloseWatcherOptions options = {});
undefined requestClose(); undefined requestClose();
undefined close(); undefined close();
undefined destroy(); undefined destroy();
attribute EventHandler oncancel; attribute EventHandler oncancel;
attribute EventHandler onclose; attribute EventHandler onclose;
}; };
dictionary CloseWatcherOptions { dictionary CloseWatcherOptions {
AbortSignal signal; AbortSignal signal;
}; };

View file

@ -1,8 +1,7 @@
#import <DOM/Element.idl> #import <DOM/Element.idl>
#import <DOM/HTMLCollection.idl> #import <DOM/HTMLCollection.idl>
[Exposed=Window, [Exposed=Window, LegacyUnenumerableNamedProperties]
LegacyUnenumerableNamedProperties]
interface HTMLAllCollection { interface HTMLAllCollection {
readonly attribute unsigned long length; readonly attribute unsigned long length;
getter Element (unsigned long index); getter Element (unsigned long index);

View file

@ -3,13 +3,13 @@
// https://html.spec.whatwg.org/multipage/nav-history-apis.html#hashchangeevent // https://html.spec.whatwg.org/multipage/nav-history-apis.html#hashchangeevent
[Exposed=Window] [Exposed=Window]
interface HashChangeEvent : Event { interface HashChangeEvent : Event {
constructor(DOMString type, optional HashChangeEventInit eventInitDict = {}); constructor(DOMString type, optional HashChangeEventInit eventInitDict = {});
readonly attribute USVString oldURL; readonly attribute USVString oldURL;
readonly attribute USVString newURL; readonly attribute USVString newURL;
}; };
dictionary HashChangeEventInit : EventInit { dictionary HashChangeEventInit : EventInit {
USVString oldURL = ""; USVString oldURL = "";
USVString newURL = ""; USVString newURL = "";
}; };

View file

@ -3,7 +3,7 @@
enum PredefinedColorSpace { "srgb", "display-p3" }; enum PredefinedColorSpace { "srgb", "display-p3" };
dictionary ImageDataSettings { dictionary ImageDataSettings {
PredefinedColorSpace colorSpace; PredefinedColorSpace colorSpace;
}; };
[Exposed=(Window,Worker), Serializable] [Exposed=(Window,Worker), Serializable]

View file

@ -3,13 +3,13 @@
// https://html.spec.whatwg.org/multipage/nav-history-apis.html#popstateevent // https://html.spec.whatwg.org/multipage/nav-history-apis.html#popstateevent
[Exposed=Window] [Exposed=Window]
interface PopStateEvent : Event { interface PopStateEvent : Event {
constructor(DOMString type, optional PopStateEventInit eventInitDict = {}); constructor(DOMString type, optional PopStateEventInit eventInitDict = {});
readonly attribute any state; readonly attribute any state;
[FIXME] readonly attribute boolean hasUAVisualTransition; [FIXME] readonly attribute boolean hasUAVisualTransition;
}; };
dictionary PopStateEventInit : EventInit { dictionary PopStateEventInit : EventInit {
any state = null; any state = null;
// FIXME: boolean hasUAVisualTransition = false; // FIXME: boolean hasUAVisualTransition = false;
}; };

View file

@ -1,10 +1,10 @@
[Exposed=Window] [Exposed=Window]
interface PerformanceNavigation { interface PerformanceNavigation {
const unsigned short TYPE_NAVIGATE = 0; const unsigned short TYPE_NAVIGATE = 0;
const unsigned short TYPE_RELOAD = 1; const unsigned short TYPE_RELOAD = 1;
const unsigned short TYPE_BACK_FORWARD = 2; const unsigned short TYPE_BACK_FORWARD = 2;
const unsigned short TYPE_RESERVED = 255; const unsigned short TYPE_RESERVED = 255;
readonly attribute unsigned short type; readonly attribute unsigned short type;
readonly attribute unsigned short redirectCount; readonly attribute unsigned short redirectCount;
[Default] object toJSON(); [Default] object toJSON();
}; };

View file

@ -3,6 +3,6 @@
// https://svgwg.org/svg2-draft/single-page.html#coords-InterfaceSVGAnimatedTransformList // https://svgwg.org/svg2-draft/single-page.html#coords-InterfaceSVGAnimatedTransformList
[Exposed=Window] [Exposed=Window]
interface SVGAnimatedTransformList { interface SVGAnimatedTransformList {
[SameObject] readonly attribute SVGTransformList baseVal; [SameObject] readonly attribute SVGTransformList baseVal;
[SameObject] readonly attribute SVGTransformList animVal; [SameObject] readonly attribute SVGTransformList animVal;
}; };

View file

@ -2,18 +2,18 @@
#import <Geometry/DOMRectReadOnly.idl> #import <Geometry/DOMRectReadOnly.idl>
dictionary SVGBoundingBoxOptions { dictionary SVGBoundingBoxOptions {
boolean fill = true; boolean fill = true;
boolean stroke = false; boolean stroke = false;
boolean markers = false; boolean markers = false;
boolean clipped = false; boolean clipped = false;
}; };
// https://svgwg.org/svg2-draft/types.html#InterfaceSVGGraphicsElement // https://svgwg.org/svg2-draft/types.html#InterfaceSVGGraphicsElement
[Exposed=Window] [Exposed=Window]
interface SVGGraphicsElement : SVGElement { interface SVGGraphicsElement : SVGElement {
[SameObject] readonly attribute SVGAnimatedTransformList transform; [SameObject] readonly attribute SVGAnimatedTransformList transform;
DOMRect getBBox(optional SVGBoundingBoxOptions options = {}); DOMRect getBBox(optional SVGBoundingBoxOptions options = {});
[FIXME] DOMMatrix? getCTM(); [FIXME] DOMMatrix? getCTM();
[FIXME] DOMMatrix? getScreenCTM(); [FIXME] DOMMatrix? getScreenCTM();
}; };

View file

@ -4,8 +4,8 @@
// https://svgwg.org/svg2-draft/single-page.html#pservers-InterfaceSVGLinearGradientElement // https://svgwg.org/svg2-draft/single-page.html#pservers-InterfaceSVGLinearGradientElement
[Exposed=Window] [Exposed=Window]
interface SVGLinearGradientElement : SVGGradientElement { interface SVGLinearGradientElement : SVGGradientElement {
[SameObject] readonly attribute SVGAnimatedLength x1; [SameObject] readonly attribute SVGAnimatedLength x1;
[SameObject] readonly attribute SVGAnimatedLength y1; [SameObject] readonly attribute SVGAnimatedLength y1;
[SameObject] readonly attribute SVGAnimatedLength x2; [SameObject] readonly attribute SVGAnimatedLength x2;
[SameObject] readonly attribute SVGAnimatedLength y2; [SameObject] readonly attribute SVGAnimatedLength y2;
}; };

View file

@ -4,10 +4,10 @@
// https://svgwg.org/svg2-draft/single-page.html#pservers-InterfaceSVGRadialGradientElement // https://svgwg.org/svg2-draft/single-page.html#pservers-InterfaceSVGRadialGradientElement
[Exposed=Window] [Exposed=Window]
interface SVGRadialGradientElement : SVGGradientElement { interface SVGRadialGradientElement : SVGGradientElement {
[SameObject] readonly attribute SVGAnimatedLength cx; [SameObject] readonly attribute SVGAnimatedLength cx;
[SameObject] readonly attribute SVGAnimatedLength cy; [SameObject] readonly attribute SVGAnimatedLength cy;
[SameObject] readonly attribute SVGAnimatedLength r; [SameObject] readonly attribute SVGAnimatedLength r;
[SameObject] readonly attribute SVGAnimatedLength fx; [SameObject] readonly attribute SVGAnimatedLength fx;
[SameObject] readonly attribute SVGAnimatedLength fy; [SameObject] readonly attribute SVGAnimatedLength fy;
[SameObject] readonly attribute SVGAnimatedLength fr; [SameObject] readonly attribute SVGAnimatedLength fr;
}; };

View file

@ -5,38 +5,38 @@
// https://svgwg.org/svg2-draft/struct.html#InterfaceSVGSVGElement // https://svgwg.org/svg2-draft/struct.html#InterfaceSVGSVGElement
[Exposed=Window] [Exposed=Window]
interface SVGSVGElement : SVGGraphicsElement { interface SVGSVGElement : SVGGraphicsElement {
[SameObject] readonly attribute SVGAnimatedLength x; [SameObject] readonly attribute SVGAnimatedLength x;
[SameObject] readonly attribute SVGAnimatedLength y; [SameObject] readonly attribute SVGAnimatedLength y;
[SameObject] readonly attribute SVGAnimatedLength width; [SameObject] readonly attribute SVGAnimatedLength width;
[SameObject] readonly attribute SVGAnimatedLength height; [SameObject] readonly attribute SVGAnimatedLength height;
attribute float currentScale; attribute float currentScale;
[SameObject] readonly attribute DOMPointReadOnly currentTranslate; [SameObject] readonly attribute DOMPointReadOnly currentTranslate;
NodeList getIntersectionList(DOMRectReadOnly rect, SVGElement? referenceElement); NodeList getIntersectionList(DOMRectReadOnly rect, SVGElement? referenceElement);
NodeList getEnclosureList(DOMRectReadOnly rect, SVGElement? referenceElement); NodeList getEnclosureList(DOMRectReadOnly rect, SVGElement? referenceElement);
boolean checkIntersection(SVGElement element, DOMRectReadOnly rect); boolean checkIntersection(SVGElement element, DOMRectReadOnly rect);
boolean checkEnclosure(SVGElement element, DOMRectReadOnly rect); boolean checkEnclosure(SVGElement element, DOMRectReadOnly rect);
undefined deselectAll(); undefined deselectAll();
// FIMXE: SVGNumber createSVGNumber(); // FIXME: SVGNumber createSVGNumber();
SVGLength createSVGLength(); SVGLength createSVGLength();
[FIXME] SVGAngle createSVGAngle(); [FIXME] SVGAngle createSVGAngle();
DOMPoint createSVGPoint(); DOMPoint createSVGPoint();
DOMMatrix createSVGMatrix(); DOMMatrix createSVGMatrix();
DOMRect createSVGRect(); DOMRect createSVGRect();
SVGTransform createSVGTransform(); SVGTransform createSVGTransform();
[FIXME] SVGTransform createSVGTransformFromMatrix(optional DOMMatrix2DInit matrix = {}); [FIXME] SVGTransform createSVGTransformFromMatrix(optional DOMMatrix2DInit matrix = {});
Element getElementById(DOMString elementId); Element getElementById(DOMString elementId);
// Deprecated methods that have no effect when called, // Deprecated methods that have no effect when called,
// but which are kept for compatibility reasons. // but which are kept for compatibility reasons.
unsigned long suspendRedraw(unsigned long maxWaitMilliseconds); unsigned long suspendRedraw(unsigned long maxWaitMilliseconds);
undefined unsuspendRedraw(unsigned long suspendHandleID); undefined unsuspendRedraw(unsigned long suspendHandleID);
undefined unsuspendRedrawAll(); undefined unsuspendRedrawAll();
undefined forceRedraw(); undefined forceRedraw();
}; };
SVGSVGElement includes SVGFitToViewBox; SVGSVGElement includes SVGFitToViewBox;

View file

@ -4,5 +4,5 @@
// https://svgwg.org/svg2-draft/single-page.html#pservers-InterfaceSVGStopElement // https://svgwg.org/svg2-draft/single-page.html#pservers-InterfaceSVGStopElement
[Exposed=Window] [Exposed=Window]
interface SVGStopElement : SVGElement { interface SVGStopElement : SVGElement {
[SameObject] readonly attribute SVGAnimatedNumber offset; [SameObject] readonly attribute SVGAnimatedNumber offset;
}; };

View file

@ -4,9 +4,9 @@
// https://svgwg.org/svg2-draft/single-page.html#styling-InterfaceSVGStyleElement // https://svgwg.org/svg2-draft/single-page.html#styling-InterfaceSVGStyleElement
[Exposed=Window] [Exposed=Window]
interface SVGStyleElement : SVGElement { interface SVGStyleElement : SVGElement {
[Reflect] attribute DOMString type; [Reflect] attribute DOMString type;
[Reflect] attribute DOMString media; [Reflect] attribute DOMString media;
[Reflect] attribute DOMString title; [Reflect] attribute DOMString title;
}; };
SVGStyleElement includes LinkStyle; SVGStyleElement includes LinkStyle;

View file

@ -3,19 +3,19 @@
// https://svgwg.org/svg2-draft/single-page.html#coords-InterfaceSVGTransformList // https://svgwg.org/svg2-draft/single-page.html#coords-InterfaceSVGTransformList
[Exposed=Window] [Exposed=Window]
interface SVGTransformList { interface SVGTransformList {
readonly attribute unsigned long length; readonly attribute unsigned long length;
readonly attribute unsigned long numberOfItems; readonly attribute unsigned long numberOfItems;
[FIXME] undefined clear(); [FIXME] undefined clear();
// FIXME: SVGTransform initialize(SVGTransform newItem); // FIXME: SVGTransform initialize(SVGTransform newItem);
getter SVGTransform getItem(unsigned long index); getter SVGTransform getItem(unsigned long index);
[FIXME] SVGTransform insertItemBefore(SVGTransform newItem, unsigned long index); [FIXME] SVGTransform insertItemBefore(SVGTransform newItem, unsigned long index);
[FIXME] SVGTransform replaceItem(SVGTransform newItem, unsigned long index); [FIXME] SVGTransform replaceItem(SVGTransform newItem, unsigned long index);
[FIXME] SVGTransform removeItem(unsigned long index); [FIXME] SVGTransform removeItem(unsigned long index);
SVGTransform appendItem(SVGTransform newItem); SVGTransform appendItem(SVGTransform newItem);
// FIXME: setter undefined (unsigned long index, SVGTransform newItem); // FIXME: setter undefined (unsigned long index, SVGTransform newItem);
// Additional methods not common to other list interfaces. // Additional methods not common to other list interfaces.
[FIXME] SVGTransform createSVGTransformFromMatrix(optional DOMMatrix2DInit matrix = {}); [FIXME] SVGTransform createSVGTransformFromMatrix(optional DOMMatrix2DInit matrix = {});
[FIXME] SVGTransform? consolidate(); [FIXME] SVGTransform? consolidate();
}; };

View file

@ -6,12 +6,12 @@
// https://svgwg.org/svg2-draft/struct.html#InterfaceSVGUseElement // https://svgwg.org/svg2-draft/struct.html#InterfaceSVGUseElement
[Exposed=Window] [Exposed=Window]
interface SVGUseElement : SVGGraphicsElement { interface SVGUseElement : SVGGraphicsElement {
[SameObject] readonly attribute SVGAnimatedLength x; [SameObject] readonly attribute SVGAnimatedLength x;
[SameObject] readonly attribute SVGAnimatedLength y; [SameObject] readonly attribute SVGAnimatedLength y;
[SameObject] readonly attribute SVGAnimatedLength width; [SameObject] readonly attribute SVGAnimatedLength width;
[SameObject] readonly attribute SVGAnimatedLength height; [SameObject] readonly attribute SVGAnimatedLength height;
[SameObject] readonly attribute SVGElement? instanceRoot; [SameObject] readonly attribute SVGElement? instanceRoot;
[SameObject] readonly attribute SVGElement? animatedInstanceRoot; [SameObject] readonly attribute SVGElement? animatedInstanceRoot;
}; };
SVGUseElement includes SVGURIReference; SVGUseElement includes SVGURIReference;

View file

@ -5,8 +5,8 @@
#import <Streams/WritableStream.idl> #import <Streams/WritableStream.idl>
dictionary ReadableWritablePair { dictionary ReadableWritablePair {
required ReadableStream readable; required ReadableStream readable;
required WritableStream writable; required WritableStream writable;
}; };
dictionary StreamPipeOptions { dictionary StreamPipeOptions {