Skip to content

Commit 0ebba93

Browse files
committed
add SVG Painting types
1 parent 80f06eb commit 0ebba93

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 | null;
28292830
flexBasis: string | null;
@@ -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
@@ -2126,6 +2126,14 @@
21262126
}
21272127
]
21282128
},
2129+
"SVGMarkerElement": {
2130+
"element": [
2131+
{
2132+
"namespace": "SVG",
2133+
"name": "marker"
2134+
}
2135+
]
2136+
},
21292137
"SVGMaskElement": {
21302138
"element": [
21312139
{

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
@@ -336,13 +336,17 @@
336336
"local": true
337337
},
338338
{
339-
"url": "https://svgwg.org/svg2-draft/types.html",
339+
"url": "https://www.w3.org/TR/SVG2/types.html",
340340
"title": "SVG - Basic Data Types and Interfaces"
341341
},
342342
{
343-
"url": "https://svgwg.org/svg2-draft/shapes.html",
343+
"url": "https://www.w3.org/TR/SVG2/shapes.html",
344344
"title": "SVG - Basic Shapes"
345345
},
346+
{
347+
"url": "https://www.w3.org/TR/SVG2/painting.html",
348+
"title": "SVG - Painting"
349+
},
346350
{
347351
"url": "https://w3c.github.io/touch-events/",
348352
"title": "Touch Events"

inputfiles/removedTypes.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
"property": {
7171
"hangingPunctuation": null,
7272
"blockOverflow": null,
73+
"colorRendering": null,
7374
"continue": null,
7475
"lineClamp": null,
7576
"maskBorder": null,
@@ -176,6 +177,13 @@
176177
]
177178
},
178179
"SVGMatrix": null,
180+
"SVGMarkerElement": {
181+
"properties": {
182+
"property": {
183+
"orient": null
184+
}
185+
}
186+
},
179187
"SVGPatternElement": {
180188
"implements": [
181189
"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)