Skip to content

Commit 4ac30f3

Browse files
authored
feat(webkit): roll WebKit to 1246 (#2400)
1 parent 4e8a03c commit 4ac30f3

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

browsers.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
},
1111
{
1212
"name": "webkit",
13-
"revision": "1242"
13+
"revision": "1246"
1414
}
1515
]
1616
}

utils/protocol-types-generator/index.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ async function generateWebKitProtocol(folderPath) {
4040
console.log(`Wrote protocol.ts for WebKit to ${path.relative(process.cwd(), outputPath)}`);
4141
}
4242

43+
const conditionFilter = command => command.condition !== 'defined(WTF_PLATFORM_IOS_FAMILY) && WTF_PLATFORM_IOS_FAMILY';
44+
4345
function jsonToTS(json) {
4446
return `// This is generated from /utils/protocol-types-generator/index.js
4547
type binary = string;
@@ -69,7 +71,7 @@ export module Protocol {${json.domains.map(domain => `${domain.description ? `
6971
${parameter.name}${parameter.optional ? '?' : ''}: ${typeOfProperty(parameter)};`).join(``)}
7072
}` : `
7173
export type ${event.name}Payload = void;`}`).join('')}
72-
${(domain.commands || []).map(command => `${command.description ? `
74+
${(domain.commands || []).filter(conditionFilter).map(command => `${command.description ? `
7375
/**
7476
* ${command.description}
7577
*/` : ''}
@@ -90,10 +92,10 @@ export module Protocol {${json.domains.map(domain => `${domain.description ? `
9092
export interface Events {${json.domains.map(domain => (domain.events || []).map(event => `
9193
"${domain.domain}.${event.name}": ${domain.domain}.${event.name}Payload;`).join('')).join('')}
9294
}
93-
export interface CommandParameters {${json.domains.map(domain => (domain.commands || []).map(command => `
95+
export interface CommandParameters {${json.domains.map(domain => (domain.commands || []).filter(conditionFilter).map(command => `
9496
"${domain.domain}.${command.name}": ${domain.domain}.${command.name}Parameters;`).join('')).join('')}
9597
}
96-
export interface CommandReturnValues {${json.domains.map(domain => (domain.commands || []).map(command => `
98+
export interface CommandReturnValues {${json.domains.map(domain => (domain.commands || []).filter(conditionFilter).map(command => `
9799
"${domain.domain}.${command.name}": ${domain.domain}.${command.name}ReturnValue;`).join('')).join('')}
98100
}
99101
}

0 commit comments

Comments
 (0)