From 04234b7f26f85c4b67e007943db5eb7f41b52e88 Mon Sep 17 00:00:00 2001 From: Bashamega Date: Wed, 5 Nov 2025 07:50:06 +0200 Subject: [PATCH 1/4] Migrate CSSFontFaceRule and CSSStyleProperties --- inputfiles/addedTypes.jsonc | 12 ------------ inputfiles/overridingTypes.jsonc | 24 ------------------------ inputfiles/patches/css-font.kdl | 7 +++++++ inputfiles/patches/cssom.kdl | 11 ++++++++++- src/build/patches.ts | 2 ++ 5 files changed, 19 insertions(+), 37 deletions(-) diff --git a/inputfiles/addedTypes.jsonc b/inputfiles/addedTypes.jsonc index 38ff4848d..a84e4811c 100644 --- a/inputfiles/addedTypes.jsonc +++ b/inputfiles/addedTypes.jsonc @@ -100,18 +100,6 @@ ] } }, - "CSSStyleProperties": { - "properties": { - "property": { - "imageOrientation": { - "deprecated": true - }, - "wordWrap": { - "deprecated": true - } - } - } - }, "Window": { "name": "Window", "methods": { diff --git a/inputfiles/overridingTypes.jsonc b/inputfiles/overridingTypes.jsonc index 7f9f9c6ff..08f36d611 100644 --- a/inputfiles/overridingTypes.jsonc +++ b/inputfiles/overridingTypes.jsonc @@ -3253,30 +3253,6 @@ } } }, - "CSSFontFaceRule": { - "properties": { - "property": { - "style": { - // CSS Fonts Level 4 now says CSSFontFaceDescriptors but nobody implements it as of 2024-04 - // https://github.com/w3c/csswg-drafts/pull/9686 - "type": "CSSStyleProperties" - } - } - } - }, - "CSSStyleProperties": { - "properties": { - "property": { - "cssFloat": { - "mdnUrl": "https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/cssFloat" - }, - "webkitLineClamp": { - // The corresponding standardized property is not supported by anyone as of 2024-10. - "deprecated": false - } - } - } - }, "HTMLMediaElement": { "properties": { "property": { diff --git a/inputfiles/patches/css-font.kdl b/inputfiles/patches/css-font.kdl index 9b4c1fdac..369321260 100644 --- a/inputfiles/patches/css-font.kdl +++ b/inputfiles/patches/css-font.kdl @@ -10,3 +10,10 @@ enum FontDisplay { dictionary FontFaceDescriptors { member display type=FontDisplay } + +interface CSSFontFaceRule { + // CSS Fonts Level 4 now says CSSFontFaceDescriptors + // but nobody implements it as of 2024-04 + // https://github.com/w3c/csswg-drafts/pull/9686 + property style type=CSSStyleProperties +} diff --git a/inputfiles/patches/cssom.kdl b/inputfiles/patches/cssom.kdl index a3baf2c5c..df9871a65 100644 --- a/inputfiles/patches/cssom.kdl +++ b/inputfiles/patches/cssom.kdl @@ -6,4 +6,13 @@ interface CSSStyleDeclaration \ forward=CSSStyleDeclarationBase \ forwardExtends=CSSStyleProperties -interface CSSStyleProperties replaceReference=CSSStyleDeclaration +interface CSSStyleProperties replaceReference=CSSStyleDeclaration { + property imageOrientation deprecated=#true + property wordWrap deprecated=#true + + // The corresponding standardized property is not supported by + // anyone as of 2024-10. + property webkitLineClamp deprecated=#false + + property cssFloat mdnUrl="https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/cssFloat" +} diff --git a/src/build/patches.ts b/src/build/patches.ts index 48b18c179..ab524f6ed 100644 --- a/src/build/patches.ts +++ b/src/build/patches.ts @@ -231,6 +231,8 @@ function handleProperty(child: Node): Partial { ...optionalMember("overrideType", "string", child.properties?.overrideType), ...optionalMember("type", "string", child.properties?.type), ...optionalMember("readonly", "boolean", child.properties?.readonly), + ...optionalMember("deprecated", "boolean", child.properties?.deprecated), + ...optionalMember("mdnUrl", "string", child.properties?.mdnUrl), }; } From 928d173aa8e97be28f985d6dc85778edc6b68fa6 Mon Sep 17 00:00:00 2001 From: Bashamega Date: Wed, 5 Nov 2025 10:13:46 +0200 Subject: [PATCH 2/4] - --- baselines/dom.generated.d.ts | 3 +-- baselines/ts5.5/dom.generated.d.ts | 3 +-- baselines/ts5.6/dom.generated.d.ts | 3 +-- baselines/ts5.9/dom.generated.d.ts | 3 +-- inputfiles/patches/cssom.kdl | 2 -- 5 files changed, 4 insertions(+), 10 deletions(-) diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index ef02a6a76..772eec0b0 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -6917,7 +6917,7 @@ interface CSSStyleProperties extends CSSStyleDeclarationBase { /** * The **`cssFloat`** property of the CSSStyleProperties interface returns the CSS float property. * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/cssFloat) + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleProperties/cssFloat) */ cssFloat: string; /** @@ -7339,7 +7339,6 @@ interface CSSStyleProperties extends CSSStyleDeclarationBase { hyphens: string; /** * The image-orientation CSS property specifies a layout-independent correction to the orientation of an image. - * @deprecated * * [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/image-orientation) */ diff --git a/baselines/ts5.5/dom.generated.d.ts b/baselines/ts5.5/dom.generated.d.ts index 2c25f0954..3ffe9e6d3 100644 --- a/baselines/ts5.5/dom.generated.d.ts +++ b/baselines/ts5.5/dom.generated.d.ts @@ -6907,7 +6907,7 @@ interface CSSStyleProperties extends CSSStyleDeclarationBase { /** * The **`cssFloat`** property of the CSSStyleProperties interface returns the CSS float property. * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/cssFloat) + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleProperties/cssFloat) */ cssFloat: string; /** @@ -7329,7 +7329,6 @@ interface CSSStyleProperties extends CSSStyleDeclarationBase { hyphens: string; /** * The image-orientation CSS property specifies a layout-independent correction to the orientation of an image. - * @deprecated * * [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/image-orientation) */ diff --git a/baselines/ts5.6/dom.generated.d.ts b/baselines/ts5.6/dom.generated.d.ts index 0103427c4..5946e9f1d 100644 --- a/baselines/ts5.6/dom.generated.d.ts +++ b/baselines/ts5.6/dom.generated.d.ts @@ -6914,7 +6914,7 @@ interface CSSStyleProperties extends CSSStyleDeclarationBase { /** * The **`cssFloat`** property of the CSSStyleProperties interface returns the CSS float property. * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/cssFloat) + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleProperties/cssFloat) */ cssFloat: string; /** @@ -7336,7 +7336,6 @@ interface CSSStyleProperties extends CSSStyleDeclarationBase { hyphens: string; /** * The image-orientation CSS property specifies a layout-independent correction to the orientation of an image. - * @deprecated * * [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/image-orientation) */ diff --git a/baselines/ts5.9/dom.generated.d.ts b/baselines/ts5.9/dom.generated.d.ts index 857e9bd69..837844f07 100644 --- a/baselines/ts5.9/dom.generated.d.ts +++ b/baselines/ts5.9/dom.generated.d.ts @@ -6914,7 +6914,7 @@ interface CSSStyleProperties extends CSSStyleDeclarationBase { /** * The **`cssFloat`** property of the CSSStyleProperties interface returns the CSS float property. * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/cssFloat) + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleProperties/cssFloat) */ cssFloat: string; /** @@ -7336,7 +7336,6 @@ interface CSSStyleProperties extends CSSStyleDeclarationBase { hyphens: string; /** * The image-orientation CSS property specifies a layout-independent correction to the orientation of an image. - * @deprecated * * [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/image-orientation) */ diff --git a/inputfiles/patches/cssom.kdl b/inputfiles/patches/cssom.kdl index df9871a65..2a16cbd96 100644 --- a/inputfiles/patches/cssom.kdl +++ b/inputfiles/patches/cssom.kdl @@ -7,12 +7,10 @@ interface CSSStyleDeclaration \ forwardExtends=CSSStyleProperties interface CSSStyleProperties replaceReference=CSSStyleDeclaration { - property imageOrientation deprecated=#true property wordWrap deprecated=#true // The corresponding standardized property is not supported by // anyone as of 2024-10. property webkitLineClamp deprecated=#false - property cssFloat mdnUrl="https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/cssFloat" } From bbb0603125a1f94d983aa9905af21d6829a8c910 Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Thu, 6 Nov 2025 10:22:52 +0900 Subject: [PATCH 3/4] Update inputfiles/patches/cssom.kdl --- inputfiles/patches/cssom.kdl | 1 - 1 file changed, 1 deletion(-) diff --git a/inputfiles/patches/cssom.kdl b/inputfiles/patches/cssom.kdl index 2a16cbd96..ca89ead1f 100644 --- a/inputfiles/patches/cssom.kdl +++ b/inputfiles/patches/cssom.kdl @@ -12,5 +12,4 @@ interface CSSStyleProperties replaceReference=CSSStyleDeclaration { // The corresponding standardized property is not supported by // anyone as of 2024-10. property webkitLineClamp deprecated=#false - } From 1357179a4c5349894cb8a59e2aa3a1c839bc205d Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Thu, 6 Nov 2025 10:23:10 +0900 Subject: [PATCH 4/4] Update src/build/patches.ts --- src/build/patches.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/build/patches.ts b/src/build/patches.ts index ab524f6ed..763aec888 100644 --- a/src/build/patches.ts +++ b/src/build/patches.ts @@ -232,7 +232,6 @@ function handleProperty(child: Node): Partial { ...optionalMember("type", "string", child.properties?.type), ...optionalMember("readonly", "boolean", child.properties?.readonly), ...optionalMember("deprecated", "boolean", child.properties?.deprecated), - ...optionalMember("mdnUrl", "string", child.properties?.mdnUrl), }; }