Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion baselines/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31943,7 +31943,7 @@ declare var StorageManager: {
new(): StorageManager;
};

/** @deprecated */
/** @deprecated Do not use */
interface StyleMedia {
type: string;
matchMedium(mediaquery: string): boolean;
Expand Down
2 changes: 1 addition & 1 deletion baselines/ts5.5/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31918,7 +31918,7 @@ declare var StorageManager: {
new(): StorageManager;
};

/** @deprecated */
/** @deprecated Do not use */
interface StyleMedia {
type: string;
matchMedium(mediaquery: string): boolean;
Expand Down
2 changes: 1 addition & 1 deletion baselines/ts5.6/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31940,7 +31940,7 @@ declare var StorageManager: {
new(): StorageManager;
};

/** @deprecated */
/** @deprecated Do not use */
interface StyleMedia {
type: string;
matchMedium(mediaquery: string): boolean;
Expand Down
2 changes: 1 addition & 1 deletion baselines/ts5.9/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31940,7 +31940,7 @@ declare var StorageManager: {
new(): StorageManager;
};

/** @deprecated */
/** @deprecated Do not use */
interface StyleMedia {
type: string;
matchMedium(mediaquery: string): boolean;
Expand Down
57 changes: 1 addition & 56 deletions inputfiles/addedTypes.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,6 @@
]
}
},
"DeviceMotionEventAcceleration": {
"noInterfaceObject": true
},
"DeviceMotionEventRotationRate": {
"noInterfaceObject": true
},
"HTMLImageElement": {
"name": "HTMLImageElement",
"properties": {
Expand All @@ -106,18 +100,7 @@
]
}
},
"CSSStyleProperties": {
"properties": {
"property": {
"imageOrientation": {
"deprecated": true
},
"wordWrap": {
"deprecated": true
}
}
}
},

"Window": {
"name": "Window",
"methods": {
Expand All @@ -132,18 +115,6 @@
],
"events": {
"event": [
{
"name": "devicemotion",
"type": "DeviceMotionEvent"
},
{
"name": "deviceorientation",
"type": "DeviceOrientationEvent"
},
{
"name": "deviceorientationabsolute",
"type": "DeviceOrientationEvent"
},
{
"name": "gamepadconnected",
"type": "GamepadEvent"
Expand Down Expand Up @@ -394,32 +365,6 @@
]
}
},
// This is used in the React d.ts files, and not including
// it would force an update for anyone using React.
"StyleMedia": {
"name": "StyleMedia",
"exposed": "Window",
"noInterfaceObject": true,
"deprecated": true,
"properties": {
"property": {
"type": {
"name": "type",
"type": "DOMString"
}
}
},
"methods": {
"method": {
"matchMedium": {
"name": "matchMedium",
"overrideSignatures": [
"matchMedium(mediaquery: string): boolean"
]
}
}
}
},
"Navigator": {
"name": "Navigator",
"properties": {
Expand Down
60 changes: 0 additions & 60 deletions inputfiles/overridingTypes.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -3297,30 +3297,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
}
}
}
},
"ContactAddress": {
"name": "PaymentAddress"
},
Expand Down Expand Up @@ -3369,48 +3345,12 @@
"MediaSource": {
"exposed": "Window"
},

// Payment Request added shippingAddress with a different type
// https://github.com/w3c/payment-request/pull/996
"PaymentRequest": {
"properties": {
"property": {
"shippingAddress": {
"type": "PaymentAddress"
}
}
}
},
"PaymentResponse": {
"properties": {
"property": {
"shippingAddress": {
"type": "PaymentAddress"
}
}
}
},

"SourceBuffer": {
"exposed": "Window"
},
"SourceBufferList": {
"exposed": "Window"
},
"StylePropertyMapReadOnly": {
"methods": {
"method": {
"get": {
// https://github.com/w3c/css-houdini-drafts/pull/1087
"signature": {
"0": {
"overrideType": "undefined | CSSStyleValue"
}
}
}
}
}
},
"HTMLImageElement": {
"properties": {
"property": {
Expand Down
5 changes: 5 additions & 0 deletions inputfiles/patches/css-font.kdl
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@ enum FontDisplay {
fallback
optional
}

interface CSSFontFaceRule {
property style type=CSSStyleProperties
}

19 changes: 18 additions & 1 deletion inputfiles/patches/cssom.kdl
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,21 @@ interface CSSStyleDeclaration \
forward=CSSStyleDeclarationBase \
forwardExtends=CSSStyleProperties

interface CSSStyleProperties replaceReference=CSSStyleDeclaration
interface CSSStyleProperties replaceReference=CSSStyleDeclaration {
property imageOrientation deprecated=#true
property wordWrap deprecated=#true
property cssFloat mdnUrl="https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/cssFloat"

// The corresponding standardized property is not supported by anyone as of 2024-10.
property webkitLineClamp deprecated=#false
}

// This is used in the React d.ts files, and not including
// it would force an update for anyone using React.
interface StyleMedia exposed=Window noInterfaceObject=#true deprecated="Do not use" {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had to add a string until #2187 is merged

property type type=DOMString

method matchMedium returns=boolean {
param mediaquery type=DOMString
}
}
8 changes: 8 additions & 0 deletions inputfiles/patches/device-motion.kdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
interface DeviceMotionEventAcceleration noInterfaceObject=#true
interface DeviceMotionEventRotationRate noInterfaceObject=#true

interface Window {
event devicemotion type=DeviceMotionEvent
event deviceorientation type=DeviceOrientationEvent
event deviceorientationabsolute type=DeviceOrientationEvent
}
10 changes: 10 additions & 0 deletions inputfiles/patches/payments.kdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Payment Request added shippingAddress with a different type
// https://github.com/w3c/payment-request/pull/996

interface PaymentRequest {
property shippingAddress type=PaymentAddress
}

interface PaymentResponse {
property shippingAddress type=PaymentAddress
}
2 changes: 2 additions & 0 deletions src/build/patches.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@ function handleProperty(child: Node): Partial<Property> {
...optionalMember("optional", "boolean", child.properties?.optional),
...optionalMember("overrideType", "string", child.properties?.overrideType),
...optionalMember("type", "string", child.properties?.type),
...optionalMember("deprecated", "boolean", child.properties?.deprecated),
...optionalMember("mdnUrl", "string", child.properties?.mdnUrl),
};
}

Expand Down