Skip to content

Commit 9f1db18

Browse files
Bashamegasaschanaz
andauthored
Convert all enums to KDL format in addedTypes (#2099)
Co-authored-by: saschanaz <[email protected]>
1 parent 848551a commit 9f1db18

File tree

8 files changed

+68
-92
lines changed

8 files changed

+68
-92
lines changed

baselines/dom.generated.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40070,7 +40070,7 @@ type RTCRtpTransceiverDirection = "inactive" | "recvonly" | "sendonly" | "sendre
4007040070
type RTCSctpTransportState = "closed" | "connected" | "connecting";
4007140071
type RTCSdpType = "answer" | "offer" | "pranswer" | "rollback";
4007240072
type RTCSignalingState = "closed" | "have-local-offer" | "have-local-pranswer" | "have-remote-offer" | "have-remote-pranswer" | "stable";
40073-
type RTCStatsIceCandidatePairState = "failed" | "frozen" | "in-progress" | "inprogress" | "succeeded" | "waiting";
40073+
type RTCStatsIceCandidatePairState = "failed" | "frozen" | "in-progress" | "succeeded" | "waiting";
4007440074
type RTCStatsType = "candidate-pair" | "certificate" | "codec" | "data-channel" | "inbound-rtp" | "local-candidate" | "media-playout" | "media-source" | "outbound-rtp" | "peer-connection" | "remote-candidate" | "remote-inbound-rtp" | "remote-outbound-rtp" | "transport";
4007540075
type ReadableStreamReaderMode = "byob";
4007640076
type ReadableStreamType = "bytes";

baselines/ts5.5/dom.generated.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40047,7 +40047,7 @@ type RTCRtpTransceiverDirection = "inactive" | "recvonly" | "sendonly" | "sendre
4004740047
type RTCSctpTransportState = "closed" | "connected" | "connecting";
4004840048
type RTCSdpType = "answer" | "offer" | "pranswer" | "rollback";
4004940049
type RTCSignalingState = "closed" | "have-local-offer" | "have-local-pranswer" | "have-remote-offer" | "have-remote-pranswer" | "stable";
40050-
type RTCStatsIceCandidatePairState = "failed" | "frozen" | "in-progress" | "inprogress" | "succeeded" | "waiting";
40050+
type RTCStatsIceCandidatePairState = "failed" | "frozen" | "in-progress" | "succeeded" | "waiting";
4005140051
type RTCStatsType = "candidate-pair" | "certificate" | "codec" | "data-channel" | "inbound-rtp" | "local-candidate" | "media-playout" | "media-source" | "outbound-rtp" | "peer-connection" | "remote-candidate" | "remote-inbound-rtp" | "remote-outbound-rtp" | "transport";
4005240052
type ReadableStreamReaderMode = "byob";
4005340053
type ReadableStreamType = "bytes";

baselines/ts5.6/dom.generated.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40070,7 +40070,7 @@ type RTCRtpTransceiverDirection = "inactive" | "recvonly" | "sendonly" | "sendre
4007040070
type RTCSctpTransportState = "closed" | "connected" | "connecting";
4007140071
type RTCSdpType = "answer" | "offer" | "pranswer" | "rollback";
4007240072
type RTCSignalingState = "closed" | "have-local-offer" | "have-local-pranswer" | "have-remote-offer" | "have-remote-pranswer" | "stable";
40073-
type RTCStatsIceCandidatePairState = "failed" | "frozen" | "in-progress" | "inprogress" | "succeeded" | "waiting";
40073+
type RTCStatsIceCandidatePairState = "failed" | "frozen" | "in-progress" | "succeeded" | "waiting";
4007440074
type RTCStatsType = "candidate-pair" | "certificate" | "codec" | "data-channel" | "inbound-rtp" | "local-candidate" | "media-playout" | "media-source" | "outbound-rtp" | "peer-connection" | "remote-candidate" | "remote-inbound-rtp" | "remote-outbound-rtp" | "transport";
4007540075
type ReadableStreamReaderMode = "byob";
4007640076
type ReadableStreamType = "bytes";

inputfiles/addedTypes.jsonc

Lines changed: 0 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -23,95 +23,6 @@
2323
}
2424
}
2525
},
26-
"callbackInterfaces": {
27-
"interface": {}
28-
},
29-
"enums": {
30-
"enum": {
31-
"InsertPosition": {
32-
"name": "InsertPosition",
33-
"value": [
34-
"beforebegin",
35-
"beforeend",
36-
"afterbegin",
37-
"afterend"
38-
]
39-
},
40-
"FontDisplay": {
41-
"name": "FontDisplay",
42-
// https://w3c.github.io/csswg-drafts/css-fonts-4/#font-display-desc
43-
"value": [
44-
"auto",
45-
"block",
46-
"swap",
47-
"fallback",
48-
"optional"
49-
]
50-
},
51-
"RTCStatsIceCandidatePairState": {
52-
"value": [
53-
"inprogress"
54-
]
55-
},
56-
"GlobalCompositeOperation": {
57-
"name": "GlobalCompositeOperation",
58-
"value": [
59-
"source-over",
60-
"source-in",
61-
"source-out",
62-
"source-atop",
63-
"destination-over",
64-
"destination-in",
65-
"destination-out",
66-
"destination-atop",
67-
"lighter",
68-
"copy",
69-
"xor",
70-
"multiply",
71-
"screen",
72-
"overlay",
73-
"darken",
74-
"lighten",
75-
"color-dodge",
76-
"color-burn",
77-
"hard-light",
78-
"soft-light",
79-
"difference",
80-
"exclusion",
81-
"hue",
82-
"saturation",
83-
"color",
84-
"luminosity"
85-
]
86-
},
87-
"PermissionName": {
88-
"name": "PermissionName",
89-
// This is a subset of the permissions defined in the spec:
90-
// https://w3c.github.io/powerful-features-registry/#registry-table-of-powerful-features
91-
// Please add a feature only when it's supported by multiple engines.
92-
"value": [
93-
// Full support: https://developer.mozilla.org/en-US/docs/Web/API/Permissions_API#browser_compatibility
94-
"camera",
95-
// Full support: https://developer.mozilla.org/en-US/docs/Web/API/Geolocation_API#browser_compatibility
96-
"geolocation",
97-
// Full support: https://developer.mozilla.org/en-US/docs/Web/API/Permissions_API#browser_compatibility
98-
"microphone",
99-
// Gecko and Blink: https://developer.mozilla.org/en-US/docs/Web/API/Web_MIDI_API#browser_compatibility
100-
"midi",
101-
// Full support: https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API#browser_compatibility
102-
"notifications",
103-
// Gecko and Blink: https://developer.mozilla.org/en-US/docs/Web/API/Storage_API#browser_compatibility
104-
"persistent-storage",
105-
// Full support: https://developer.mozilla.org/en-US/docs/Web/API/Push_API#browser_compatibility
106-
"push",
107-
// Full support: https://developer.mozilla.org/en-US/docs/Web/API/Screen_Wake_Lock_API#browser_compatibility
108-
"screen-wake-lock",
109-
// Full support: https://developer.mozilla.org/en-US/docs/Web/API/Storage_Access_API#browser_compatibility
110-
"storage-access"
111-
]
112-
}
113-
}
114-
},
11526
"interfaces": {
11627
"interface": {
11728
// ImportMeta is not a true DOM interface, but we are forced to declare it as one in order to emit method definitions.

inputfiles/patches/css-font.kdl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
enum FontDisplay {
2+
// https://w3c.github.io/csswg-drafts/css-fonts-4/#font-display-desc
3+
auto
4+
block
5+
swap
6+
fallback
7+
optional
8+
}

inputfiles/patches/dom.kdl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
enum InsertPosition {
2+
beforebegin
3+
beforeend
4+
afterbegin
5+
afterend
6+
}

inputfiles/patches/html-canvas.kdl

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
enum GlobalCompositeOperation {
2+
source-over
3+
source-in
4+
source-out
5+
source-atop
6+
destination-over
7+
destination-in
8+
destination-out
9+
destination-atop
10+
lighter
11+
copy
12+
xor
13+
multiply
14+
screen
15+
overlay
16+
darken
17+
lighten
18+
color-dodge
19+
color-burn
20+
hard-light
21+
soft-light
22+
difference
23+
exclusion
24+
hue
25+
saturation
26+
color
27+
luminosity
28+
}

inputfiles/patches/permissions.kdl

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// This is a subset of the permissions defined in the spec:
2+
// https://w3c.github.io/powerful-features-registry/#registry-table-of-powerful-features
3+
// Please add a feature only when it's supported by multiple engines.
4+
enum PermissionName {
5+
// Full support: https://developer.mozilla.org/en-US/docs/Web/API/Permissions_API#browser_compatibility
6+
camera
7+
// Full support: https://developer.mozilla.org/en-US/docs/Web/API/Geolocation_API#browser_compatibility
8+
geolocation
9+
// Full support: https://developer.mozilla.org/en-US/docs/Web/API/Permissions_API#browser_compatibility
10+
microphone
11+
// Gecko and Blink: https://developer.mozilla.org/en-US/docs/Web/API/Web_MIDI_API#browser_compatibility
12+
midi
13+
// Full support: https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API#browser_compatibility
14+
notifications
15+
// Gecko and Blink: https://developer.mozilla.org/en-US/docs/Web/API/Storage_API#browser_compatibility
16+
persistent-storage
17+
// Full support: https://developer.mozilla.org/en-US/docs/Web/API/Push_API#browser_compatibility
18+
push
19+
// Full support: https://developer.mozilla.org/en-US/docs/Web/API/Screen_Wake_Lock_API#browser_compatibility
20+
screen-wake-lock
21+
// Full support: https://developer.mozilla.org/en-US/docs/Web/API/Storage_Access_API#browser_compatibility
22+
storage-access
23+
}

0 commit comments

Comments
 (0)