From a3819e684afc50ccc74a221026d4a5486637607e Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Wed, 18 Jun 2025 10:35:43 +0200 Subject: [PATCH 1/2] Iterate inheritance chain when searching for PutForwards --- src/build/emitter.ts | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/build/emitter.ts b/src/build/emitter.ts index b6e84c3ea..79654f016 100644 --- a/src/build/emitter.ts +++ b/src/build/emitter.ts @@ -827,6 +827,21 @@ export function emitWebIdl( ); } + function getPropertyFromInterface( + i: Browser.Interface, + propertyName: string, + ) { + let property; + let currentInterface: Browser.Interface | undefined = i; + while (!property && currentInterface) { + property = currentInterface.properties?.property[propertyName]; + currentInterface = currentInterface.extends + ? allInterfacesMap[currentInterface.extends] + : undefined; + } + return property; + } + function emitProperty( prefix: string, i: Browser.Interface, @@ -871,8 +886,10 @@ export function emitWebIdl( if (!prefix && canPutForward && p.putForwards) { printer.printLine(`get ${p.name}${optionalModifier}(): ${pType};`); - const forwardingProperty = - allInterfacesMap[pType].properties?.property[p.putForwards]; + const forwardingProperty = getPropertyFromInterface( + allInterfacesMap[pType], + p.putForwards, + ); if (!forwardingProperty) { throw new Error("Couldn't find [PutForwards]"); } From 814420e57fb505e38461c2a10cbde886c073000d Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Wed, 18 Jun 2025 10:38:07 +0200 Subject: [PATCH 2/2] Update overridingTypes.jsonc --- inputfiles/overridingTypes.jsonc | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/inputfiles/overridingTypes.jsonc b/inputfiles/overridingTypes.jsonc index 90df8768e..a3a1adfb7 100644 --- a/inputfiles/overridingTypes.jsonc +++ b/inputfiles/overridingTypes.jsonc @@ -1080,17 +1080,6 @@ } } }, - "Notification": { - "properties": { - "property": { - "maxActions": { - // BCD incorrectly indicates Firefox support - // https://bugzilla.mozilla.org/show_bug.cgi?id=1225110#c31 - "exposed": "" - } - } - } - }, "IDBObjectStore": { "methods": { "method": {