From 92bb2aa6034087be72969cea526dc1973f3435cc Mon Sep 17 00:00:00 2001 From: Bashamega Date: Mon, 3 Nov 2025 12:55:05 +0200 Subject: [PATCH 1/3] Payments --- inputfiles/overridingTypes.jsonc | 21 --------------------- inputfiles/patches/payment.kdl | 9 +++++++++ 2 files changed, 9 insertions(+), 21 deletions(-) create mode 100644 inputfiles/patches/payment.kdl diff --git a/inputfiles/overridingTypes.jsonc b/inputfiles/overridingTypes.jsonc index 5deed68ef..8a194c8a4 100644 --- a/inputfiles/overridingTypes.jsonc +++ b/inputfiles/overridingTypes.jsonc @@ -3364,27 +3364,6 @@ "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" }, diff --git a/inputfiles/patches/payment.kdl b/inputfiles/patches/payment.kdl new file mode 100644 index 000000000..dcf261de8 --- /dev/null +++ b/inputfiles/patches/payment.kdl @@ -0,0 +1,9 @@ +// 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 +} From 8c3cffb6ba6df5bfe1affd5322ac782800506ff4 Mon Sep 17 00:00:00 2001 From: Bashamega Date: Mon, 3 Nov 2025 13:00:12 +0200 Subject: [PATCH 2/3] Rename interfaces --- inputfiles/overridingTypes.jsonc | 3 --- inputfiles/patches/payment.kdl | 2 ++ src/build/patches.ts | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/inputfiles/overridingTypes.jsonc b/inputfiles/overridingTypes.jsonc index 8a194c8a4..4ffd77d95 100644 --- a/inputfiles/overridingTypes.jsonc +++ b/inputfiles/overridingTypes.jsonc @@ -3315,9 +3315,6 @@ } } }, - "ContactAddress": { - "name": "PaymentAddress" - }, "HTMLMediaElement": { "properties": { "property": { diff --git a/inputfiles/patches/payment.kdl b/inputfiles/patches/payment.kdl index dcf261de8..bfef73927 100644 --- a/inputfiles/patches/payment.kdl +++ b/inputfiles/patches/payment.kdl @@ -1,6 +1,8 @@ // Payment Request added shippingAddress with a different type // https://github.com/w3c/payment-request/pull/996 +interface ContactAddress name=PaymentAddress + interface PaymentRequest { property shippingAddress type=PaymentAddress } diff --git a/src/build/patches.ts b/src/build/patches.ts index c9b2683dc..39edb827d 100644 --- a/src/build/patches.ts +++ b/src/build/patches.ts @@ -143,7 +143,7 @@ function handleMixinandInterfaces( node: Node, type: "mixin" | "interface", ): DeepPartial { - const name = node.values[0]; + const name = string(node.properties?.name || node.values[0]); const event: Event[] = []; const property: Record> = {}; From 8b9ed32deda4595c2abf2d029fbe84037ee2592a Mon Sep 17 00:00:00 2001 From: Adam Naji <110662505+Bashamega@users.noreply.github.com> Date: Mon, 3 Nov 2025 14:01:11 +0200 Subject: [PATCH 3/3] Add payment-request.kdl file --- inputfiles/patches/{payment.kdl => payment-request.kdl} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename inputfiles/patches/{payment.kdl => payment-request.kdl} (100%) diff --git a/inputfiles/patches/payment.kdl b/inputfiles/patches/payment-request.kdl similarity index 100% rename from inputfiles/patches/payment.kdl rename to inputfiles/patches/payment-request.kdl