Skip to content

Commit 56c2762

Browse files
committed
add SVG Painting types
1 parent dbaff83 commit 56c2762

File tree

6 files changed

+93
-18
lines changed

6 files changed

+93
-18
lines changed

baselines/dom.generated.d.ts

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2799,6 +2799,7 @@ interface CSSStyleDeclaration {
27992799
clipPath: string;
28002800
clipRule: string;
28012801
color: string | null;
2802+
colorInterpolation: string;
28022803
colorInterpolationFilters: string;
28032804
columnCount: string;
28042805
columnFill: string;
@@ -2821,9 +2822,9 @@ interface CSSStyleDeclaration {
28212822
dominantBaseline: string | null;
28222823
emptyCells: string | null;
28232824
enableBackground: string | null;
2824-
fill: string | null;
2825-
fillOpacity: string | null;
2826-
fillRule: string | null;
2825+
fill: string;
2826+
fillOpacity: string;
2827+
fillRule: string;
28272828
filter: string;
28282829
flex: string;
28292830
flexBasis: string;
@@ -2900,10 +2901,10 @@ interface CSSStyleDeclaration {
29002901
marginLeft: string | null;
29012902
marginRight: string | null;
29022903
marginTop: string | null;
2903-
marker: string | null;
2904-
markerEnd: string | null;
2905-
markerMid: string | null;
2906-
markerStart: string | null;
2904+
marker: string;
2905+
markerEnd: string;
2906+
markerMid: string;
2907+
markerStart: string;
29072908
mask: string;
29082909
maskComposite: string;
29092910
maskImage: string;
@@ -2985,6 +2986,7 @@ interface CSSStyleDeclaration {
29852986
pageBreakAfter: string | null;
29862987
pageBreakBefore: string | null;
29872988
pageBreakInside: string | null;
2989+
paintOrder: string;
29882990
readonly parentRule: CSSRule;
29892991
penAction: string | null;
29902992
perspective: string | null;
@@ -3004,16 +3006,17 @@ interface CSSStyleDeclaration {
30043006
rubyPosition: string | null;
30053007
scale: string | null;
30063008
scrollBehavior: string;
3009+
shapeRendering: string;
30073010
stopColor: string | null;
30083011
stopOpacity: string | null;
3009-
stroke: string | null;
3010-
strokeDasharray: string | null;
3011-
strokeDashoffset: string | null;
3012-
strokeLinecap: string | null;
3013-
strokeLinejoin: string | null;
3014-
strokeMiterlimit: string | null;
3015-
strokeOpacity: string | null;
3016-
strokeWidth: string | null;
3012+
stroke: string;
3013+
strokeDasharray: string;
3014+
strokeDashoffset: string;
3015+
strokeLinecap: string;
3016+
strokeLinejoin: string;
3017+
strokeMiterlimit: string;
3018+
strokeOpacity: string;
3019+
strokeWidth: string;
30173020
tabSize: string;
30183021
tableLayout: string | null;
30193022
textAlign: string;
@@ -3034,6 +3037,7 @@ interface CSSStyleDeclaration {
30343037
textKashidaSpace: string | null;
30353038
textOrientation: string;
30363039
textOverflow: string;
3040+
textRendering: string;
30373041
textShadow: string;
30383042
textTransform: string;
30393043
textUnderlinePosition: string;

inputfiles/addedTypes.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2113,6 +2113,14 @@
21132113
}
21142114
]
21152115
},
2116+
"SVGMarkerElement": {
2117+
"element": [
2118+
{
2119+
"namespace": "SVG",
2120+
"name": "marker"
2121+
}
2122+
]
2123+
},
21162124
"SVGMaskElement": {
21172125
"element": [
21182126
{

inputfiles/idl/SVG - Painting.widl

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
[Exposed=Window]
2+
interface SVGMarkerElement : SVGElement {
3+
4+
// Marker Unit Types
5+
const unsigned short SVG_MARKERUNITS_UNKNOWN = 0;
6+
const unsigned short SVG_MARKERUNITS_USERSPACEONUSE = 1;
7+
const unsigned short SVG_MARKERUNITS_STROKEWIDTH = 2;
8+
9+
// Marker Orientation Types
10+
const unsigned short SVG_MARKER_ORIENT_UNKNOWN = 0;
11+
const unsigned short SVG_MARKER_ORIENT_AUTO = 1;
12+
const unsigned short SVG_MARKER_ORIENT_ANGLE = 2;
13+
14+
[SameObject] readonly attribute SVGAnimatedLength refX;
15+
[SameObject] readonly attribute SVGAnimatedLength refY;
16+
[SameObject] readonly attribute SVGAnimatedEnumeration markerUnits;
17+
[SameObject] readonly attribute SVGAnimatedLength markerWidth;
18+
[SameObject] readonly attribute SVGAnimatedLength markerHeight;
19+
[SameObject] readonly attribute SVGAnimatedEnumeration orientType;
20+
[SameObject] readonly attribute SVGAnimatedAngle orientAngle;
21+
attribute DOMString orient;
22+
23+
void setOrientToAuto();
24+
void setOrientToAngle(SVGAngle angle);
25+
};
26+
27+
SVGMarkerElement includes SVGFitToViewBox;
28+
29+
partial interface CSSStyleDeclaration {
30+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString fill;
31+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString fillRule;
32+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString fillOpacity;
33+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString stroke;
34+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString strokeOpacity;
35+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString strokeWidth;
36+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString strokeLinecap;
37+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString strokeLinejoin;
38+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString strokeMiterlimit;
39+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString strokeDasharray;
40+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString strokeDashoffset;
41+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString markerStart;
42+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString markerMid;
43+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString markerEnd;
44+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString marker;
45+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString paintOrder;
46+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString colorInterpolation;
47+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString colorRendering;
48+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString shapeRendering;
49+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString textRendering;
50+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString imageRendering;
51+
};

inputfiles/idlSources.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,13 +356,17 @@
356356
"local": true
357357
},
358358
{
359-
"url": "https://svgwg.org/svg2-draft/types.html",
359+
"url": "https://www.w3.org/TR/SVG2/types.html",
360360
"title": "SVG - Basic Data Types and Interfaces"
361361
},
362362
{
363-
"url": "https://svgwg.org/svg2-draft/shapes.html",
363+
"url": "https://www.w3.org/TR/SVG2/shapes.html",
364364
"title": "SVG - Basic Shapes"
365365
},
366+
{
367+
"url": "https://www.w3.org/TR/SVG2/painting.html",
368+
"title": "SVG - Painting"
369+
},
366370
{
367371
"url": "https://w3c.github.io/touch-events/",
368372
"title": "Touch Events"

inputfiles/removedTypes.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
"corners": null,
8181
"hangingPunctuation": null,
8282
"blockOverflow": null,
83+
"colorRendering": null,
8384
"continue": null,
8485
"lineClamp": null,
8586
"maskBorder": null,
@@ -186,6 +187,13 @@
186187
]
187188
},
188189
"SVGMatrix": null,
190+
"SVGMarkerElement": {
191+
"properties": {
192+
"property": {
193+
"orient": null
194+
}
195+
}
196+
},
189197
"SVGPatternElement": {
190198
"implements": [
191199
"SVGUnitTypes"

src/idlfetcher.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const idlSelector = [
2121
].join(",");
2222

2323
const cssPropSelector = [
24-
".propdef dfn", // CSS Fonts, CSS Masking
24+
".propdef dfn", // CSS Fonts
2525
"dfn.css[data-dfn-type=property]"
2626
].join(",");
2727

0 commit comments

Comments
 (0)