Skip to content

Commit 2cea3f6

Browse files
Bashamegasaschanaz
andauthored
Migrate CSSFontFaceRule and CSSStyleProperties (microsoft#2238)
Co-authored-by: Kagami Sascha Rosylight <[email protected]>
1 parent 53ab565 commit 2cea3f6

File tree

9 files changed

+19
-45
lines changed

9 files changed

+19
-45
lines changed

baselines/dom.generated.d.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6917,7 +6917,7 @@ interface CSSStyleProperties extends CSSStyleDeclarationBase {
69176917
/**
69186918
* The **`cssFloat`** property of the CSSStyleProperties interface returns the CSS float property.
69196919
*
6920-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/cssFloat)
6920+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleProperties/cssFloat)
69216921
*/
69226922
cssFloat: string;
69236923
/**
@@ -7339,7 +7339,6 @@ interface CSSStyleProperties extends CSSStyleDeclarationBase {
73397339
hyphens: string;
73407340
/**
73417341
* The image-orientation CSS property specifies a layout-independent correction to the orientation of an image.
7342-
* @deprecated
73437342
*
73447343
* [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/image-orientation)
73457344
*/

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6907,7 +6907,7 @@ interface CSSStyleProperties extends CSSStyleDeclarationBase {
69076907
/**
69086908
* The **`cssFloat`** property of the CSSStyleProperties interface returns the CSS float property.
69096909
*
6910-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/cssFloat)
6910+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleProperties/cssFloat)
69116911
*/
69126912
cssFloat: string;
69136913
/**
@@ -7329,7 +7329,6 @@ interface CSSStyleProperties extends CSSStyleDeclarationBase {
73297329
hyphens: string;
73307330
/**
73317331
* The image-orientation CSS property specifies a layout-independent correction to the orientation of an image.
7332-
* @deprecated
73337332
*
73347333
* [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/image-orientation)
73357334
*/

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6914,7 +6914,7 @@ interface CSSStyleProperties extends CSSStyleDeclarationBase {
69146914
/**
69156915
* The **`cssFloat`** property of the CSSStyleProperties interface returns the CSS float property.
69166916
*
6917-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/cssFloat)
6917+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleProperties/cssFloat)
69186918
*/
69196919
cssFloat: string;
69206920
/**
@@ -7336,7 +7336,6 @@ interface CSSStyleProperties extends CSSStyleDeclarationBase {
73367336
hyphens: string;
73377337
/**
73387338
* The image-orientation CSS property specifies a layout-independent correction to the orientation of an image.
7339-
* @deprecated
73407339
*
73417340
* [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/image-orientation)
73427341
*/

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6914,7 +6914,7 @@ interface CSSStyleProperties extends CSSStyleDeclarationBase {
69146914
/**
69156915
* The **`cssFloat`** property of the CSSStyleProperties interface returns the CSS float property.
69166916
*
6917-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/cssFloat)
6917+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleProperties/cssFloat)
69186918
*/
69196919
cssFloat: string;
69206920
/**
@@ -7336,7 +7336,6 @@ interface CSSStyleProperties extends CSSStyleDeclarationBase {
73367336
hyphens: string;
73377337
/**
73387338
* The image-orientation CSS property specifies a layout-independent correction to the orientation of an image.
7339-
* @deprecated
73407339
*
73417340
* [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/image-orientation)
73427341
*/

inputfiles/addedTypes.jsonc

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -100,18 +100,6 @@
100100
]
101101
}
102102
},
103-
"CSSStyleProperties": {
104-
"properties": {
105-
"property": {
106-
"imageOrientation": {
107-
"deprecated": true
108-
},
109-
"wordWrap": {
110-
"deprecated": true
111-
}
112-
}
113-
}
114-
},
115103
"Window": {
116104
"name": "Window",
117105
"methods": {

inputfiles/overridingTypes.jsonc

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3253,30 +3253,6 @@
32533253
}
32543254
}
32553255
},
3256-
"CSSFontFaceRule": {
3257-
"properties": {
3258-
"property": {
3259-
"style": {
3260-
// CSS Fonts Level 4 now says CSSFontFaceDescriptors but nobody implements it as of 2024-04
3261-
// https://github.com/w3c/csswg-drafts/pull/9686
3262-
"type": "CSSStyleProperties"
3263-
}
3264-
}
3265-
}
3266-
},
3267-
"CSSStyleProperties": {
3268-
"properties": {
3269-
"property": {
3270-
"cssFloat": {
3271-
"mdnUrl": "https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/cssFloat"
3272-
},
3273-
"webkitLineClamp": {
3274-
// The corresponding standardized property is not supported by anyone as of 2024-10.
3275-
"deprecated": false
3276-
}
3277-
}
3278-
}
3279-
},
32803256
"HTMLMediaElement": {
32813257
"properties": {
32823258
"property": {

inputfiles/patches/css-font.kdl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,10 @@ enum FontDisplay {
1010
dictionary FontFaceDescriptors {
1111
member display type=FontDisplay
1212
}
13+
14+
interface CSSFontFaceRule {
15+
// CSS Fonts Level 4 now says CSSFontFaceDescriptors
16+
// but nobody implements it as of 2024-04
17+
// https://github.com/w3c/csswg-drafts/pull/9686
18+
property style type=CSSStyleProperties
19+
}

inputfiles/patches/cssom.kdl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,10 @@ interface CSSStyleDeclaration \
66
forward=CSSStyleDeclarationBase \
77
forwardExtends=CSSStyleProperties
88

9-
interface CSSStyleProperties replaceReference=CSSStyleDeclaration
9+
interface CSSStyleProperties replaceReference=CSSStyleDeclaration {
10+
property wordWrap deprecated=#true
11+
12+
// The corresponding standardized property is not supported by
13+
// anyone as of 2024-10.
14+
property webkitLineClamp deprecated=#false
15+
}

src/build/patches.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ function handleProperty(child: Node): Partial<Property> {
239239
...optionalMember("overrideType", "string", child.properties?.overrideType),
240240
...optionalMember("type", "string", child.properties?.type),
241241
...optionalMember("readonly", "boolean", child.properties?.readonly),
242+
...optionalMember("deprecated", "boolean", child.properties?.deprecated),
242243
};
243244
}
244245

0 commit comments

Comments
 (0)