Skip to content

Commit b135c7e

Browse files
saschanazsandersn
authored andcommitted
add SVG Painting types (#727)
1 parent b041075 commit b135c7e

File tree

6 files changed

+82
-7
lines changed

6 files changed

+82
-7
lines changed

baselines/dom.generated.d.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2816,6 +2816,7 @@ interface CSSStyleDeclaration {
28162816
clipPath: string;
28172817
clipRule: string;
28182818
color: string | null;
2819+
colorInterpolation: string;
28192820
colorInterpolationFilters: string;
28202821
columnCount: string;
28212822
columnFill: string;
@@ -2923,10 +2924,10 @@ interface CSSStyleDeclaration {
29232924
marginLeft: string;
29242925
marginRight: string;
29252926
marginTop: string;
2926-
marker: string | null;
2927-
markerEnd: string | null;
2928-
markerMid: string | null;
2929-
markerStart: string | null;
2927+
marker: string;
2928+
markerEnd: string;
2929+
markerMid: string;
2930+
markerStart: string;
29302931
mask: string;
29312932
maskComposite: string;
29322933
maskImage: string;
@@ -3016,6 +3017,7 @@ interface CSSStyleDeclaration {
30163017
pageBreakAfter: string;
30173018
pageBreakBefore: string;
30183019
pageBreakInside: string;
3020+
paintOrder: string;
30193021
readonly parentRule: CSSRule;
30203022
penAction: string | null;
30213023
perspective: string;
@@ -3035,6 +3037,7 @@ interface CSSStyleDeclaration {
30353037
rubyPosition: string | null;
30363038
scale: string;
30373039
scrollBehavior: string;
3040+
shapeRendering: string;
30383041
stopColor: string | null;
30393042
stopOpacity: string | null;
30403043
stroke: string;
@@ -3065,6 +3068,7 @@ interface CSSStyleDeclaration {
30653068
textKashidaSpace: string | null;
30663069
textOrientation: string;
30673070
textOverflow: string;
3071+
textRendering: string;
30683072
textShadow: string;
30693073
textTransform: string;
30703074
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
@@ -408,13 +408,17 @@
408408
"local": true
409409
},
410410
{
411-
"url": "https://svgwg.org/svg2-draft/types.html",
411+
"url": "https://www.w3.org/TR/SVG2/types.html",
412412
"title": "SVG - Basic Data Types and Interfaces"
413413
},
414414
{
415-
"url": "https://svgwg.org/svg2-draft/shapes.html",
415+
"url": "https://www.w3.org/TR/SVG2/shapes.html",
416416
"title": "SVG - Basic Shapes"
417417
},
418+
{
419+
"url": "https://www.w3.org/TR/SVG2/painting.html",
420+
"title": "SVG - Painting"
421+
},
418422
{
419423
"url": "https://w3c.github.io/touch-events/",
420424
"title": "Touch Events"

inputfiles/removedTypes.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@
9090
"borderStartEndRadius": null,
9191
"borderStartStartRadius": null,
9292
"boxDecorationBreak": null,
93+
"colorRendering": null,
9394
"continue": null,
9495
"cornerShape": null,
9596
"corners": null,
@@ -231,6 +232,13 @@
231232
]
232233
},
233234
"SVGMatrix": null,
235+
"SVGMarkerElement": {
236+
"properties": {
237+
"property": {
238+
"orient": null
239+
}
240+
}
241+
},
234242
"SVGPatternElement": {
235243
"implements": [
236244
"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)