diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index 402b79e3a..bfb5e4c4a 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -1377,6 +1377,13 @@ interface RsaPssParams extends Algorithm { saltLength: number; } +interface SVGBoundingBoxOptions { + clipped?: boolean; + fill?: boolean; + markers?: boolean; + stroke?: boolean; +} + interface ScopedCredentialDescriptor { id: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer | null; transports?: Transport[]; @@ -4730,10 +4737,6 @@ declare var Element: { new(): Element; }; -interface ElementCSSInlineStyle { - readonly style: CSSStyleDeclaration; -} - interface ElementContentEditable { contentEditable: string; inputMode: string; @@ -11544,8 +11547,8 @@ declare var SVGAnimatedPreserveAspectRatio: { }; interface SVGAnimatedRect { - readonly animVal: SVGRect; - readonly baseVal: SVGRect; + readonly animVal: DOMRectReadOnly; + readonly baseVal: DOMRect; } declare var SVGAnimatedRect: { @@ -11657,27 +11660,13 @@ declare var SVGDescElement: { }; interface SVGElementEventMap extends ElementEventMap, GlobalEventHandlersEventMap, DocumentAndElementEventHandlersEventMap { - "click": MouseEvent; - "dblclick": MouseEvent; - "focusin": FocusEvent; - "focusout": FocusEvent; - "load": Event; - "mousedown": MouseEvent; - "mousemove": MouseEvent; - "mouseout": MouseEvent; - "mouseover": MouseEvent; - "mouseup": MouseEvent; } -interface SVGElement extends Element, ElementCSSInlineStyle, GlobalEventHandlers, DocumentAndElementEventHandlers { +interface SVGElement extends Element, GlobalEventHandlers, DocumentAndElementEventHandlers, SVGElementInstance, HTMLOrSVGElement { /** @deprecated */ readonly className: any; - onfocusin: ((this: SVGElement, ev: FocusEvent) => any) | null; - onfocusout: ((this: SVGElement, ev: FocusEvent) => any) | null; readonly ownerSVGElement: SVGSVGElement | null; readonly viewportElement: SVGElement | null; - /** @deprecated */ - xmlbase: string; addEventListener(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; @@ -11690,14 +11679,8 @@ declare var SVGElement: { }; interface SVGElementInstance extends EventTarget { - readonly childNodes: SVGElementInstanceList; readonly correspondingElement: SVGElement; readonly correspondingUseElement: SVGUseElement; - readonly firstChild: SVGElementInstance; - readonly lastChild: SVGElementInstance; - readonly nextSibling: SVGElementInstance; - readonly parentNode: SVGElementInstance; - readonly previousSibling: SVGElementInstance; } declare var SVGElementInstance: { @@ -12255,6 +12238,23 @@ declare var SVGGElement: { new(): SVGGElement; }; +interface SVGGeometryElement extends SVGGraphicsElement { + readonly pathLength: SVGAnimatedNumber; + getPointAtLength(distance: number): DOMPoint; + getTotalLength(): number; + isPointInFill(point?: DOMPointInit): boolean; + isPointInStroke(point?: DOMPointInit): boolean; + addEventListener(type: K, listener: (this: SVGGeometryElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: SVGGeometryElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +} + +declare var SVGGeometryElement: { + prototype: SVGGeometryElement; + new(): SVGGeometryElement; +}; + interface SVGGradientElement extends SVGElement, SVGUnitTypes, SVGURIReference { readonly gradientTransform: SVGAnimatedTransformList; readonly gradientUnits: SVGAnimatedEnumeration; @@ -12279,16 +12279,10 @@ declare var SVGGradientElement: { }; interface SVGGraphicsElement extends SVGElement, SVGTests { - /** @deprecated */ - readonly farthestViewportElement: SVGElement | null; - /** @deprecated */ - readonly nearestViewportElement: SVGElement | null; readonly transform: SVGAnimatedTransformList; - getBBox(): SVGRect; - getCTM(): SVGMatrix | null; - getScreenCTM(): SVGMatrix | null; - /** @deprecated */ - getTransformToElement(element: SVGElement): SVGMatrix; + getBBox(options?: SVGBoundingBoxOptions): DOMRect; + getCTM(): DOMMatrix | null; + getScreenCTM(): DOMMatrix | null; addEventListener(type: K, listener: (this: SVGGraphicsElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: SVGGraphicsElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; @@ -12354,6 +12348,7 @@ declare var SVGLength: { }; interface SVGLengthList { + readonly length: number; readonly numberOfItems: number; appendItem(newItem: SVGLength): SVGLength; clear(): void; @@ -12362,6 +12357,7 @@ interface SVGLengthList { insertItemBefore(newItem: SVGLength, index: number): SVGLength; removeItem(index: number): SVGLength; replaceItem(newItem: SVGLength, index: number): SVGLength; + [index: number]: SVGLength; } declare var SVGLengthList: { @@ -12474,6 +12470,7 @@ declare var SVGNumber: { }; interface SVGNumberList { + readonly length: number; readonly numberOfItems: number; appendItem(newItem: SVGNumber): SVGNumber; clear(): void; @@ -12482,6 +12479,7 @@ interface SVGNumberList { insertItemBefore(newItem: SVGNumber, index: number): SVGNumber; removeItem(index: number): SVGNumber; replaceItem(newItem: SVGNumber, index: number): SVGNumber; + [index: number]: SVGNumber; } declare var SVGNumberList: { @@ -13050,6 +13048,7 @@ declare var SVGStopElement: { }; interface SVGStringList { + readonly length: number; readonly numberOfItems: number; appendItem(newItem: string): string; clear(): void; @@ -13058,6 +13057,7 @@ interface SVGStringList { insertItemBefore(newItem: string, index: number): string; removeItem(index: number): string; replaceItem(newItem: string, index: number): string; + [index: number]: string; } declare var SVGStringList: { @@ -13119,11 +13119,7 @@ declare var SVGTSpanElement: { interface SVGTests { readonly requiredExtensions: SVGStringList; - /** @deprecated */ - readonly requiredFeatures: SVGStringList; readonly systemLanguage: SVGStringList; - /** @deprecated */ - hasExtension(extension: string): boolean; } interface SVGTextContentElement extends SVGGraphicsElement { @@ -13281,7 +13277,14 @@ interface SVGUnitTypes { readonly SVG_UNIT_TYPE_UNKNOWN: number; readonly SVG_UNIT_TYPE_USERSPACEONUSE: number; } -declare var SVGUnitTypes: SVGUnitTypes; + +declare var SVGUnitTypes: { + prototype: SVGUnitTypes; + new(): SVGUnitTypes; + readonly SVG_UNIT_TYPE_OBJECTBOUNDINGBOX: number; + readonly SVG_UNIT_TYPE_UNKNOWN: number; + readonly SVG_UNIT_TYPE_USERSPACEONUSE: number; +}; interface SVGUseElement extends SVGGraphicsElement, SVGURIReference { readonly animatedInstanceRoot: SVGElementInstance | null; diff --git a/baselines/dom.iterable.generated.d.ts b/baselines/dom.iterable.generated.d.ts index b4df662c0..2e0017ac8 100644 --- a/baselines/dom.iterable.generated.d.ts +++ b/baselines/dom.iterable.generated.d.ts @@ -148,6 +148,18 @@ interface PluginArray { interface RTCStatsReport extends ReadonlyMap { } +interface SVGLengthList { + [Symbol.iterator](): IterableIterator; +} + +interface SVGNumberList { + [Symbol.iterator](): IterableIterator; +} + +interface SVGStringList { + [Symbol.iterator](): IterableIterator; +} + interface SourceBufferList { [Symbol.iterator](): IterableIterator; } diff --git a/inputfiles/idl/SVG - Basic Data Types and Interfaces.widl b/inputfiles/idl/SVG - Basic Data Types and Interfaces.widl new file mode 100644 index 000000000..d5afa76d4 --- /dev/null +++ b/inputfiles/idl/SVG - Basic Data Types and Interfaces.widl @@ -0,0 +1,229 @@ +[Exposed=Window] +interface SVGElement : Element { + + [SameObject] readonly attribute SVGAnimatedString className; + + readonly attribute SVGSVGElement? ownerSVGElement; + readonly attribute SVGElement? viewportElement; +}; + +SVGElement includes GlobalEventHandlers; +SVGElement includes DocumentAndElementEventHandlers; +SVGElement includes SVGElementInstance; +SVGElement includes HTMLOrSVGElement; + +dictionary SVGBoundingBoxOptions { + boolean fill = true; + boolean stroke = false; + boolean markers = false; + boolean clipped = false; +}; + +interface SVGGraphicsElement : SVGElement { + [SameObject] readonly attribute SVGAnimatedTransformList transform; + + DOMRect getBBox(optional SVGBoundingBoxOptions options); + DOMMatrix? getCTM(); + DOMMatrix? getScreenCTM(); +}; + +SVGGraphicsElement includes SVGTests; + +[Exposed=Window] +interface SVGGeometryElement : SVGGraphicsElement { + [SameObject] readonly attribute SVGAnimatedNumber pathLength; + + boolean isPointInFill(optional DOMPointInit point); + boolean isPointInStroke(optional DOMPointInit point); + float getTotalLength(); + DOMPoint getPointAtLength(float distance); +}; + +[Exposed=Window] +interface SVGNumber { + attribute float value; +}; + +[Exposed=Window] +interface SVGLength { + + // Length Unit Types + const unsigned short SVG_LENGTHTYPE_UNKNOWN = 0; + const unsigned short SVG_LENGTHTYPE_NUMBER = 1; + const unsigned short SVG_LENGTHTYPE_PERCENTAGE = 2; + const unsigned short SVG_LENGTHTYPE_EMS = 3; + const unsigned short SVG_LENGTHTYPE_EXS = 4; + const unsigned short SVG_LENGTHTYPE_PX = 5; + const unsigned short SVG_LENGTHTYPE_CM = 6; + const unsigned short SVG_LENGTHTYPE_MM = 7; + const unsigned short SVG_LENGTHTYPE_IN = 8; + const unsigned short SVG_LENGTHTYPE_PT = 9; + const unsigned short SVG_LENGTHTYPE_PC = 10; + + readonly attribute unsigned short unitType; + attribute float value; + attribute float valueInSpecifiedUnits; + attribute DOMString valueAsString; + + void newValueSpecifiedUnits(unsigned short unitType, float valueInSpecifiedUnits); + void convertToSpecifiedUnits(unsigned short unitType); +}; + +[Exposed=Window] +interface SVGAngle { + + // Angle Unit Types + const unsigned short SVG_ANGLETYPE_UNKNOWN = 0; + const unsigned short SVG_ANGLETYPE_UNSPECIFIED = 1; + const unsigned short SVG_ANGLETYPE_DEG = 2; + const unsigned short SVG_ANGLETYPE_RAD = 3; + const unsigned short SVG_ANGLETYPE_GRAD = 4; + + readonly attribute unsigned short unitType; + attribute float value; + attribute float valueInSpecifiedUnits; + attribute DOMString valueAsString; + + void newValueSpecifiedUnits(unsigned short unitType, float valueInSpecifiedUnits); + void convertToSpecifiedUnits(unsigned short unitType); +}; + +[Exposed=Window] +interface SVGNumberList { + + readonly attribute unsigned long length; + readonly attribute unsigned long numberOfItems; + + void clear(); + SVGNumber initialize(SVGNumber newItem); + getter SVGNumber getItem(unsigned long index); + SVGNumber insertItemBefore(SVGNumber newItem, unsigned long index); + SVGNumber replaceItem(SVGNumber newItem, unsigned long index); + SVGNumber removeItem(unsigned long index); + SVGNumber appendItem(SVGNumber newItem); + setter void (unsigned long index, SVGNumber newItem); +}; + +[Exposed=Window] +interface SVGLengthList { + + readonly attribute unsigned long length; + readonly attribute unsigned long numberOfItems; + + void clear(); + SVGLength initialize(SVGLength newItem); + getter SVGLength getItem(unsigned long index); + SVGLength insertItemBefore(SVGLength newItem, unsigned long index); + SVGLength replaceItem(SVGLength newItem, unsigned long index); + SVGLength removeItem(unsigned long index); + SVGLength appendItem(SVGLength newItem); + setter void (unsigned long index, SVGLength newItem); +}; + +[Exposed=Window] +interface SVGAnimatedBoolean { + attribute boolean baseVal; + readonly attribute boolean animVal; +}; + +[Exposed=Window] +interface SVGAnimatedEnumeration { + attribute unsigned short baseVal; + readonly attribute unsigned short animVal; +}; + +[Exposed=Window] +interface SVGAnimatedInteger { + attribute long baseVal; + readonly attribute long animVal; +}; + +[Exposed=Window] +interface SVGAnimatedNumber { + attribute float baseVal; + readonly attribute float animVal; +}; + +[Exposed=Window] +interface SVGAnimatedLength { + [SameObject] readonly attribute SVGLength baseVal; + [SameObject] readonly attribute SVGLength animVal; +}; + +[Exposed=Window] +interface SVGAnimatedAngle { + [SameObject] readonly attribute SVGAngle baseVal; + [SameObject] readonly attribute SVGAngle animVal; +}; + +[Exposed=Window] +interface SVGAnimatedString { + attribute DOMString baseVal; + readonly attribute DOMString animVal; +}; + +[Exposed=Window] +interface SVGAnimatedRect { + [SameObject] readonly attribute DOMRect baseVal; + [SameObject] readonly attribute DOMRectReadOnly animVal; +}; + +[Exposed=Window] +interface SVGAnimatedNumberList { + [SameObject] readonly attribute SVGNumberList baseVal; + [SameObject] readonly attribute SVGNumberList animVal; +}; + +[Exposed=Window] +interface SVGAnimatedLengthList { + [SameObject] readonly attribute SVGLengthList baseVal; + [SameObject] readonly attribute SVGLengthList animVal; +}; + +[Exposed=Window] +interface SVGStringList { + + readonly attribute unsigned long length; + readonly attribute unsigned long numberOfItems; + + void clear(); + DOMString initialize(DOMString newItem); + getter DOMString getItem(unsigned long index); + DOMString insertItemBefore(DOMString newItem, unsigned long index); + DOMString replaceItem(DOMString newItem, unsigned long index); + DOMString removeItem(unsigned long index); + DOMString appendItem(DOMString newItem); + setter void (unsigned long index, DOMString newItem); +}; + +[Exposed=Window] +interface SVGUnitTypes { + // Unit Types + const unsigned short SVG_UNIT_TYPE_UNKNOWN = 0; + const unsigned short SVG_UNIT_TYPE_USERSPACEONUSE = 1; + const unsigned short SVG_UNIT_TYPE_OBJECTBOUNDINGBOX = 2; +}; + +interface mixin SVGTests { + [SameObject] readonly attribute SVGStringList requiredExtensions; + [SameObject] readonly attribute SVGStringList systemLanguage; +}; + +interface mixin SVGFitToViewBox { + [SameObject] readonly attribute SVGAnimatedRect viewBox; + [SameObject] readonly attribute SVGAnimatedPreserveAspectRatio preserveAspectRatio; +}; + +interface mixin SVGZoomAndPan { + + // Zoom and Pan Types + const unsigned short SVG_ZOOMANDPAN_UNKNOWN = 0; + const unsigned short SVG_ZOOMANDPAN_DISABLE = 1; + const unsigned short SVG_ZOOMANDPAN_MAGNIFY = 2; + + attribute unsigned short zoomAndPan; +}; + +interface mixin SVGURIReference { + [SameObject] readonly attribute SVGAnimatedString href; +}; diff --git a/inputfiles/idl/Screen Orientation.widl b/inputfiles/idl/Screen Orientation.widl index f8a74c932..253310719 100644 --- a/inputfiles/idl/Screen Orientation.widl +++ b/inputfiles/idl/Screen Orientation.widl @@ -1,31 +1,30 @@ partial interface Screen { - [SameObject] - readonly attribute ScreenOrientation orientation; + [SameObject] readonly attribute ScreenOrientation orientation; }; [Exposed=Window] interface ScreenOrientation : EventTarget { - Promise lock(OrientationLockType orientation); - void unlock(); - readonly attribute OrientationType type; - readonly attribute unsigned short angle; - attribute EventHandler onchange; + Promise lock(OrientationLockType orientation); + void unlock(); + readonly attribute OrientationType type; + readonly attribute unsigned short angle; + attribute EventHandler onchange; }; enum OrientationType { - "portrait-primary", - "portrait-secondary", - "landscape-primary", - "landscape-secondary" + "portrait-primary", + "portrait-secondary", + "landscape-primary", + "landscape-secondary" }; enum OrientationLockType { - "any", - "natural", - "landscape", - "portrait", - "portrait-primary", - "portrait-secondary", - "landscape-primary", - "landscape-secondary" + "any", + "natural", + "landscape", + "portrait", + "portrait-primary", + "portrait-secondary", + "landscape-primary", + "landscape-secondary" }; diff --git a/inputfiles/idl/User Timing.widl b/inputfiles/idl/User Timing.widl index 2aee4f328..e1a291b05 100644 --- a/inputfiles/idl/User Timing.widl +++ b/inputfiles/idl/User Timing.widl @@ -1,10 +1,8 @@ partial interface Performance { void mark(DOMString markName); - void clearMarks(optional DOMString markName); - void measure(DOMString measureName, - optional DOMString startMark, - optional DOMString endMark); - void clearMeasures(optional DOMString measureName); + void clearMarks(optional DOMString markName); + void measure(DOMString measureName,optional DOMString startMark,optional DOMString endMark); + void clearMeasures(optional DOMString measureName); }; [Exposed=(Window,Worker)] diff --git a/inputfiles/idlSources.json b/inputfiles/idlSources.json index 98ba4255c..434b0bd9a 100644 --- a/inputfiles/idlSources.json +++ b/inputfiles/idlSources.json @@ -194,6 +194,10 @@ "url": "https://storage.spec.whatwg.org/", "title": "Storage" }, + { + "url": "https://svgwg.org/svg2-draft/types.html", + "title": "SVG - Basic Data Types and Interfaces" + }, { "url": "https://w3c.github.io/touch-events/", "title": "Touch Events" diff --git a/inputfiles/removedTypes.json b/inputfiles/removedTypes.json index 8f8d45fd2..436ab2fa3 100644 --- a/inputfiles/removedTypes.json +++ b/inputfiles/removedTypes.json @@ -125,6 +125,18 @@ } } }, + "SVGElementInstance": { + "properties": { + "property": { + "childNodes": null, + "firstChild": null, + "lastChild": null, + "nextSibling": null, + "parentNode": null, + "previousSibling": null + } + } + }, "SVGSVGElement": { "properties": { "property": {