From 56c2762fef0c1858f6289a33ba5550c04551f8db Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Wed, 12 Jun 2019 23:05:17 +0900 Subject: [PATCH] add SVG Painting types --- baselines/dom.generated.d.ts | 34 +++++++++++--------- inputfiles/addedTypes.json | 8 +++++ inputfiles/idl/SVG - Painting.widl | 51 ++++++++++++++++++++++++++++++ inputfiles/idlSources.json | 8 +++-- inputfiles/removedTypes.json | 8 +++++ src/idlfetcher.ts | 2 +- 6 files changed, 93 insertions(+), 18 deletions(-) create mode 100644 inputfiles/idl/SVG - Painting.widl diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index 723c5458c..d9ab4d218 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -2799,6 +2799,7 @@ interface CSSStyleDeclaration { clipPath: string; clipRule: string; color: string | null; + colorInterpolation: string; colorInterpolationFilters: string; columnCount: string; columnFill: string; @@ -2821,9 +2822,9 @@ interface CSSStyleDeclaration { dominantBaseline: string | null; emptyCells: string | null; enableBackground: string | null; - fill: string | null; - fillOpacity: string | null; - fillRule: string | null; + fill: string; + fillOpacity: string; + fillRule: string; filter: string; flex: string; flexBasis: string; @@ -2900,10 +2901,10 @@ interface CSSStyleDeclaration { marginLeft: string | null; marginRight: string | null; marginTop: string | null; - marker: string | null; - markerEnd: string | null; - markerMid: string | null; - markerStart: string | null; + marker: string; + markerEnd: string; + markerMid: string; + markerStart: string; mask: string; maskComposite: string; maskImage: string; @@ -2985,6 +2986,7 @@ interface CSSStyleDeclaration { pageBreakAfter: string | null; pageBreakBefore: string | null; pageBreakInside: string | null; + paintOrder: string; readonly parentRule: CSSRule; penAction: string | null; perspective: string | null; @@ -3004,16 +3006,17 @@ interface CSSStyleDeclaration { rubyPosition: string | null; scale: string | null; scrollBehavior: string; + shapeRendering: string; stopColor: string | null; stopOpacity: string | null; - stroke: string | null; - strokeDasharray: string | null; - strokeDashoffset: string | null; - strokeLinecap: string | null; - strokeLinejoin: string | null; - strokeMiterlimit: string | null; - strokeOpacity: string | null; - strokeWidth: string | null; + stroke: string; + strokeDasharray: string; + strokeDashoffset: string; + strokeLinecap: string; + strokeLinejoin: string; + strokeMiterlimit: string; + strokeOpacity: string; + strokeWidth: string; tabSize: string; tableLayout: string | null; textAlign: string; @@ -3034,6 +3037,7 @@ interface CSSStyleDeclaration { textKashidaSpace: string | null; textOrientation: string; textOverflow: string; + textRendering: string; textShadow: string; textTransform: string; textUnderlinePosition: string; diff --git a/inputfiles/addedTypes.json b/inputfiles/addedTypes.json index a4b426926..f7593aeb4 100644 --- a/inputfiles/addedTypes.json +++ b/inputfiles/addedTypes.json @@ -2113,6 +2113,14 @@ } ] }, + "SVGMarkerElement": { + "element": [ + { + "namespace": "SVG", + "name": "marker" + } + ] + }, "SVGMaskElement": { "element": [ { diff --git a/inputfiles/idl/SVG - Painting.widl b/inputfiles/idl/SVG - Painting.widl new file mode 100644 index 000000000..9019683a2 --- /dev/null +++ b/inputfiles/idl/SVG - Painting.widl @@ -0,0 +1,51 @@ +[Exposed=Window] +interface SVGMarkerElement : SVGElement { + + // Marker Unit Types + const unsigned short SVG_MARKERUNITS_UNKNOWN = 0; + const unsigned short SVG_MARKERUNITS_USERSPACEONUSE = 1; + const unsigned short SVG_MARKERUNITS_STROKEWIDTH = 2; + + // Marker Orientation Types + const unsigned short SVG_MARKER_ORIENT_UNKNOWN = 0; + const unsigned short SVG_MARKER_ORIENT_AUTO = 1; + const unsigned short SVG_MARKER_ORIENT_ANGLE = 2; + + [SameObject] readonly attribute SVGAnimatedLength refX; + [SameObject] readonly attribute SVGAnimatedLength refY; + [SameObject] readonly attribute SVGAnimatedEnumeration markerUnits; + [SameObject] readonly attribute SVGAnimatedLength markerWidth; + [SameObject] readonly attribute SVGAnimatedLength markerHeight; + [SameObject] readonly attribute SVGAnimatedEnumeration orientType; + [SameObject] readonly attribute SVGAnimatedAngle orientAngle; + attribute DOMString orient; + + void setOrientToAuto(); + void setOrientToAngle(SVGAngle angle); +}; + +SVGMarkerElement includes SVGFitToViewBox; + +partial interface CSSStyleDeclaration { + [CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString fill; + [CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString fillRule; + [CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString fillOpacity; + [CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString stroke; + [CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString strokeOpacity; + [CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString strokeWidth; + [CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString strokeLinecap; + [CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString strokeLinejoin; + [CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString strokeMiterlimit; + [CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString strokeDasharray; + [CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString strokeDashoffset; + [CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString markerStart; + [CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString markerMid; + [CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString markerEnd; + [CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString marker; + [CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString paintOrder; + [CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString colorInterpolation; + [CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString colorRendering; + [CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString shapeRendering; + [CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString textRendering; + [CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString imageRendering; +}; diff --git a/inputfiles/idlSources.json b/inputfiles/idlSources.json index 5e8326d4e..0655df9c8 100644 --- a/inputfiles/idlSources.json +++ b/inputfiles/idlSources.json @@ -356,13 +356,17 @@ "local": true }, { - "url": "https://svgwg.org/svg2-draft/types.html", + "url": "https://www.w3.org/TR/SVG2/types.html", "title": "SVG - Basic Data Types and Interfaces" }, { - "url": "https://svgwg.org/svg2-draft/shapes.html", + "url": "https://www.w3.org/TR/SVG2/shapes.html", "title": "SVG - Basic Shapes" }, + { + "url": "https://www.w3.org/TR/SVG2/painting.html", + "title": "SVG - Painting" + }, { "url": "https://w3c.github.io/touch-events/", "title": "Touch Events" diff --git a/inputfiles/removedTypes.json b/inputfiles/removedTypes.json index b4d866d93..cc8315a82 100644 --- a/inputfiles/removedTypes.json +++ b/inputfiles/removedTypes.json @@ -80,6 +80,7 @@ "corners": null, "hangingPunctuation": null, "blockOverflow": null, + "colorRendering": null, "continue": null, "lineClamp": null, "maskBorder": null, @@ -186,6 +187,13 @@ ] }, "SVGMatrix": null, + "SVGMarkerElement": { + "properties": { + "property": { + "orient": null + } + } + }, "SVGPatternElement": { "implements": [ "SVGUnitTypes" diff --git a/src/idlfetcher.ts b/src/idlfetcher.ts index 42cb27d86..ac927e292 100644 --- a/src/idlfetcher.ts +++ b/src/idlfetcher.ts @@ -21,7 +21,7 @@ const idlSelector = [ ].join(","); const cssPropSelector = [ - ".propdef dfn", // CSS Fonts, CSS Masking + ".propdef dfn", // CSS Fonts "dfn.css[data-dfn-type=property]" ].join(",");