feat(webkit): roll to r2031 (#31272)

This commit is contained in:
Playwright Service 2024-06-12 07:06:47 -07:00 committed by GitHub
parent f115ba85d9
commit 6a7bfe63a1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 2 deletions

View File

@ -27,7 +27,7 @@
},
{
"name": "webkit",
"revision": "2029",
"revision": "2031",
"installByDefault": true,
"revisionOverrides": {
"mac10.14": "1446",

View File

@ -716,7 +716,10 @@ export class WKPage implements PageDelegate {
const angle = viewportSize.width > viewportSize.height ? 90 : 0;
// Special handling for macOS 12.
const useLegacySetOrientationOverrideMethod = os.platform() === 'darwin' && parseInt(os.release().split('.')[0], 10) <= 21;
promises.push(this._pageProxySession.send(useLegacySetOrientationOverrideMethod ? 'Page.setOrientationOverride' as any : 'Emulation.setOrientationOverride', { angle }));
if (useLegacySetOrientationOverrideMethod)
promises.push(this._session.send('Page.setOrientationOverride' as any, { angle }));
else
promises.push(this._pageProxySession.send('Emulation.setOrientationOverride', { angle }));
}
await Promise.all(promises);
}