Skip to content

Commit d0c1b1f

Browse files
saschanazsandersn
authored andcommitted
add CSS Masking types (#713)
1 parent 17da3fe commit d0c1b1f

File tree

5 files changed

+79
-7
lines changed

5 files changed

+79
-7
lines changed

baselines/dom.generated.d.ts

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2795,9 +2795,9 @@ interface CSSStyleDeclaration {
27952795
captionSide: string | null;
27962796
caretColor: string;
27972797
clear: string | null;
2798-
clip: string | null;
2799-
clipPath: string | null;
2800-
clipRule: string | null;
2798+
clip: string;
2799+
clipPath: string;
2800+
clipRule: string;
28012801
color: string | null;
28022802
colorInterpolationFilters: string;
28032803
columnCount: string;
@@ -2904,8 +2904,13 @@ interface CSSStyleDeclaration {
29042904
markerEnd: string | null;
29052905
markerMid: string | null;
29062906
markerStart: string | null;
2907-
mask: string | null;
2908-
maskImage: string | null;
2907+
mask: string;
2908+
maskComposite: string;
2909+
maskImage: string;
2910+
maskPosition: string;
2911+
maskRepeat: string;
2912+
maskSize: string;
2913+
maskType: string;
29092914
maxHeight: string | null;
29102915
maxWidth: string | null;
29112916
minHeight: string | null;
@@ -12998,8 +13003,9 @@ declare var SVGCircleElement: {
1299813003
};
1299913004

1300013005
/** Provides access to the properties of <clipPath> elements, as well as methods to manipulate them. */
13001-
interface SVGClipPathElement extends SVGGraphicsElement {
13006+
interface SVGClipPathElement extends SVGElement {
1300213007
readonly clipPathUnits: SVGAnimatedEnumeration;
13008+
readonly transform: SVGAnimatedTransformList;
1300313009
addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGClipPathElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1300413010
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
1300513011
removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGClipPathElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
@@ -13903,7 +13909,7 @@ declare var SVGMarkerElement: {
1390313909
};
1390413910

1390513911
/** Provides access to the properties of <mask> elements, as well as methods to manipulate them. */
13906-
interface SVGMaskElement extends SVGElement, SVGTests {
13912+
interface SVGMaskElement extends SVGElement {
1390713913
readonly height: SVGAnimatedLength;
1390813914
readonly maskContentUnits: SVGAnimatedEnumeration;
1390913915
readonly maskUnits: SVGAnimatedEnumeration;

inputfiles/addedTypes.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1902,6 +1902,14 @@
19021902
}
19031903
]
19041904
},
1905+
"SVGClipPathElement": {
1906+
"element": [
1907+
{
1908+
"namespace": "SVG",
1909+
"name": "clipPath"
1910+
}
1911+
]
1912+
},
19051913
"SVGEllipseElement": {
19061914
"element": [
19071915
{
@@ -2118,6 +2126,14 @@
21182126
}
21192127
]
21202128
},
2129+
"SVGMaskElement": {
2130+
"element": [
2131+
{
2132+
"namespace": "SVG",
2133+
"name": "mask"
2134+
}
2135+
]
2136+
},
21212137
"SVGPolygonElement": {
21222138
"element": [
21232139
{

inputfiles/idl/CSS Masking.widl

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
interface SVGClipPathElement : SVGElement {
2+
readonly attribute SVGAnimatedEnumeration clipPathUnits;
3+
readonly attribute SVGAnimatedTransformList transform;
4+
};
5+
6+
interface SVGMaskElement : SVGElement {
7+
readonly attribute SVGAnimatedEnumeration maskUnits;
8+
readonly attribute SVGAnimatedEnumeration maskContentUnits;
9+
readonly attribute SVGAnimatedLength x;
10+
readonly attribute SVGAnimatedLength y;
11+
readonly attribute SVGAnimatedLength width;
12+
readonly attribute SVGAnimatedLength height;
13+
};
14+
15+
partial interface CSSStyleDeclaration {
16+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString clipPath;
17+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString clipRule;
18+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString maskImage;
19+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString maskMode;
20+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString maskRepeat;
21+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString maskPosition;
22+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString maskClip;
23+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString maskOrigin;
24+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString maskSize;
25+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString maskComposite;
26+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString mask;
27+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString maskBorderSource;
28+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString maskBorderMode;
29+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString maskBorderSlice;
30+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString maskBorderWidth;
31+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString maskBorderOutset;
32+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString maskBorderRepeat;
33+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString maskBorder;
34+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString maskType;
35+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString clip;
36+
};

inputfiles/idlSources.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@
3232
"url": "https://drafts.csswg.org/css-images-3/",
3333
"title": "CSS Images"
3434
},
35+
{
36+
"url": "https://drafts.fxtf.org/css-masking-1/",
37+
"title": "CSS Masking"
38+
},
3539
{
3640
"url": "https://www.w3.org/TR/css-multicol-1/",
3741
"title": "CSS Multi-column Layout"

inputfiles/removedTypes.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,16 @@
6969
"properties": {
7070
"property": {
7171
"hangingPunctuation": null,
72+
"maskBorder": null,
73+
"maskBorderMode": null,
74+
"maskBorderOutset": null,
75+
"maskBorderRepeat": null,
76+
"maskBorderSlice": null,
77+
"maskBorderSource": null,
78+
"maskBorderWidth": null,
79+
"maskClip": null,
80+
"maskMode": null,
81+
"maskOrigin": null,
7282
"textAlignAll": null
7383
}
7484
}

0 commit comments

Comments
 (0)