diff --git a/packages/playwright-core/browsers.json b/packages/playwright-core/browsers.json index 7f2ce25153..7ecc202261 100644 --- a/packages/playwright-core/browsers.json +++ b/packages/playwright-core/browsers.json @@ -33,7 +33,7 @@ }, { "name": "webkit", - "revision": "1668", + "revision": "1673", "installByDefault": true, "revisionOverrides": { "mac10.14": "1446", diff --git a/packages/playwright-core/src/server/webkit/protocol.d.ts b/packages/playwright-core/src/server/webkit/protocol.d.ts index 3b0420ab26..a7c56c19f4 100644 --- a/packages/playwright-core/src/server/webkit/protocol.d.ts +++ b/packages/playwright-core/src/server/webkit/protocol.d.ts @@ -537,6 +537,10 @@ export module Protocol { * Pseudo-style identifier (see enum PseudoId in RenderStyleConstants.h). */ export type PseudoId = "first-line"|"first-letter"|"highlight"|"marker"|"before"|"after"|"selection"|"backdrop"|"scrollbar"|"scrollbar-thumb"|"scrollbar-button"|"scrollbar-track"|"scrollbar-track-piece"|"scrollbar-corner"|"resizer"; + /** + * Pseudo-style identifier (see enum PseudoId in RenderStyleConstants.h). + */ + export type ForceablePseudoClass = "active"|"focus"|"focus-visible"|"focus-within"|"hover"|"target"|"visited"; /** * CSS rule collection for a single pseudo style. */ @@ -1167,7 +1171,7 @@ export module Protocol { /** * Element pseudo classes to force when computing the element's style. */ - forcedPseudoClasses: "active"|"focus"|"hover"|"visited"[]; + forcedPseudoClasses: ForceablePseudoClass[]; } export type forcePseudoStateReturnValue = { } @@ -5182,6 +5186,10 @@ the top of the viewport and Y increases as it proceeds towards the bottom of the * Number of seconds since epoch. */ export type Walltime = number; + /** + * Controls how much referrer information is sent with the request + */ + export type ReferrerPolicy = "empty-string"|"no-referrer"|"no-referrer-when-downgrade"|"same-origin"|"origin"|"strict-origin"|"origin-when-cross-origin"|"strict-origin-when-cross-origin"|"unsafe-url"; /** * Request / response headers as keys / values of JSON object. */ @@ -5259,6 +5267,14 @@ the top of the viewport and Y increases as it proceeds towards the bottom of the * HTTP POST request data. */ postData?: string; + /** + * The level of included referrer information. + */ + referrerPolicy?: ReferrerPolicy; + /** + * The base64 cryptographic hash of the resource. + */ + integrity?: string; } /** * HTTP response data. diff --git a/tests/library/emulation-focus.spec.ts-snapshots/grid-cell-0-webkit.png b/tests/library/emulation-focus.spec.ts-snapshots/grid-cell-0-webkit.png index aa981f033f..8a2228422e 100644 Binary files a/tests/library/emulation-focus.spec.ts-snapshots/grid-cell-0-webkit.png and b/tests/library/emulation-focus.spec.ts-snapshots/grid-cell-0-webkit.png differ diff --git a/tests/library/emulation-focus.spec.ts-snapshots/screenshot-sanity-webkit.png b/tests/library/emulation-focus.spec.ts-snapshots/screenshot-sanity-webkit.png index af070c52a8..d9cc944393 100644 Binary files a/tests/library/emulation-focus.spec.ts-snapshots/screenshot-sanity-webkit.png and b/tests/library/emulation-focus.spec.ts-snapshots/screenshot-sanity-webkit.png differ diff --git a/tests/library/screenshot.spec.ts-snapshots/grid-cell-0-webkit.png b/tests/library/screenshot.spec.ts-snapshots/grid-cell-0-webkit.png index aa981f033f..8a2228422e 100644 Binary files a/tests/library/screenshot.spec.ts-snapshots/grid-cell-0-webkit.png and b/tests/library/screenshot.spec.ts-snapshots/grid-cell-0-webkit.png differ diff --git a/tests/library/screenshot.spec.ts-snapshots/grid-cell-1-webkit.png b/tests/library/screenshot.spec.ts-snapshots/grid-cell-1-webkit.png index a1d76a1a89..52a9211d72 100644 Binary files a/tests/library/screenshot.spec.ts-snapshots/grid-cell-1-webkit.png and b/tests/library/screenshot.spec.ts-snapshots/grid-cell-1-webkit.png differ diff --git a/tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-clip-css-size-webkit.png b/tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-clip-css-size-webkit.png index 6d0a713e29..d387e1d1b8 100644 Binary files a/tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-clip-css-size-webkit.png and b/tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-clip-css-size-webkit.png differ diff --git a/tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-clip-webkit.png b/tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-clip-webkit.png index 647b28d7cc..ab210ad996 100644 Binary files a/tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-clip-webkit.png and b/tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-clip-webkit.png differ diff --git a/tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-css-size-webkit.png b/tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-css-size-webkit.png index d0107b63be..82d711dcdb 100644 Binary files a/tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-css-size-webkit.png and b/tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-css-size-webkit.png differ diff --git a/tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-webkit.png b/tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-webkit.png index 77a2f9f97e..7e9ca41951 100644 Binary files a/tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-webkit.png and b/tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-webkit.png differ diff --git a/tests/library/screenshot.spec.ts-snapshots/screenshot-element-mobile-dsf-webkit.png b/tests/library/screenshot.spec.ts-snapshots/screenshot-element-mobile-dsf-webkit.png index eefbc4136e..238a84fcae 100644 Binary files a/tests/library/screenshot.spec.ts-snapshots/screenshot-element-mobile-dsf-webkit.png and b/tests/library/screenshot.spec.ts-snapshots/screenshot-element-mobile-dsf-webkit.png differ diff --git a/tests/library/screenshot.spec.ts-snapshots/screenshot-element-mobile-webkit.png b/tests/library/screenshot.spec.ts-snapshots/screenshot-element-mobile-webkit.png index 1f74a3bafb..ce2d0b098d 100644 Binary files a/tests/library/screenshot.spec.ts-snapshots/screenshot-element-mobile-webkit.png and b/tests/library/screenshot.spec.ts-snapshots/screenshot-element-mobile-webkit.png differ diff --git a/tests/page/elementhandle-bounding-box.spec.ts b/tests/page/elementhandle-bounding-box.spec.ts index f89bf6540e..003e4a6d09 100644 --- a/tests/page/elementhandle-bounding-box.spec.ts +++ b/tests/page/elementhandle-bounding-box.spec.ts @@ -26,6 +26,10 @@ it('should work', async ({ page, server, browserName, headless, isLinux }) => { await page.goto(server.PREFIX + '/grid.html'); const elementHandle = await page.$('.box:nth-of-type(13)'); const box = await elementHandle.boundingBox(); + if (browserName === 'webkit') { + // Upstream regression: https://bugs.webkit.org/show_bug.cgi?id=242079 + box.y = Math.ceil(box.y); + } expect(box).toEqual({ x: 100, y: 50, width: 50, height: 50 }); }); diff --git a/tests/page/elementhandle-screenshot.spec.ts-snapshots/screenshot-element-bounding-box-webkit.png b/tests/page/elementhandle-screenshot.spec.ts-snapshots/screenshot-element-bounding-box-webkit.png index 1f74a3bafb..ce2d0b098d 100644 Binary files a/tests/page/elementhandle-screenshot.spec.ts-snapshots/screenshot-element-bounding-box-webkit.png and b/tests/page/elementhandle-screenshot.spec.ts-snapshots/screenshot-element-bounding-box-webkit.png differ diff --git a/tests/page/locator-misc-2.spec.ts b/tests/page/locator-misc-2.spec.ts index 4d13c23c60..7bea570533 100644 --- a/tests/page/locator-misc-2.spec.ts +++ b/tests/page/locator-misc-2.spec.ts @@ -114,6 +114,10 @@ it('should return bounding box', async ({ page, server, browserName, headless, i await page.goto(server.PREFIX + '/grid.html'); const element = page.locator('.box:nth-of-type(13)'); const box = await element.boundingBox(); + if (browserName === 'webkit') { + // Upstream regression: https://bugs.webkit.org/show_bug.cgi?id=242079 + box.y = Math.ceil(box.y); + } expect(box).toEqual({ x: 100, y: 50, width: 50, height: 50 }); }); diff --git a/tests/page/locator-misc-2.spec.ts-snapshots/screenshot-element-bounding-box-webkit.png b/tests/page/locator-misc-2.spec.ts-snapshots/screenshot-element-bounding-box-webkit.png index dea5418fac..ce2d0b098d 100644 Binary files a/tests/page/locator-misc-2.spec.ts-snapshots/screenshot-element-bounding-box-webkit.png and b/tests/page/locator-misc-2.spec.ts-snapshots/screenshot-element-bounding-box-webkit.png differ diff --git a/tests/page/page-screenshot.spec.ts-snapshots/grid-cell-1-webkit.png b/tests/page/page-screenshot.spec.ts-snapshots/grid-cell-1-webkit.png index a1d76a1a89..52a9211d72 100644 Binary files a/tests/page/page-screenshot.spec.ts-snapshots/grid-cell-1-webkit.png and b/tests/page/page-screenshot.spec.ts-snapshots/grid-cell-1-webkit.png differ diff --git a/tests/page/page-screenshot.spec.ts-snapshots/mask-should-work-webkit.png b/tests/page/page-screenshot.spec.ts-snapshots/mask-should-work-webkit.png index 419417be4e..ae8689ca48 100644 Binary files a/tests/page/page-screenshot.spec.ts-snapshots/mask-should-work-webkit.png and b/tests/page/page-screenshot.spec.ts-snapshots/mask-should-work-webkit.png differ diff --git a/tests/page/page-screenshot.spec.ts-snapshots/mask-should-work-with-elementhandle-webkit.png b/tests/page/page-screenshot.spec.ts-snapshots/mask-should-work-with-elementhandle-webkit.png index f31b468ffa..87e462e9d4 100644 Binary files a/tests/page/page-screenshot.spec.ts-snapshots/mask-should-work-with-elementhandle-webkit.png and b/tests/page/page-screenshot.spec.ts-snapshots/mask-should-work-with-elementhandle-webkit.png differ diff --git a/tests/page/page-screenshot.spec.ts-snapshots/mask-should-work-with-locator-webkit.png b/tests/page/page-screenshot.spec.ts-snapshots/mask-should-work-with-locator-webkit.png index f31b468ffa..87e462e9d4 100644 Binary files a/tests/page/page-screenshot.spec.ts-snapshots/mask-should-work-with-locator-webkit.png and b/tests/page/page-screenshot.spec.ts-snapshots/mask-should-work-with-locator-webkit.png differ diff --git a/tests/page/page-screenshot.spec.ts-snapshots/screenshot-clip-rect-webkit.png b/tests/page/page-screenshot.spec.ts-snapshots/screenshot-clip-rect-webkit.png index 7b84d4aecb..d387e1d1b8 100644 Binary files a/tests/page/page-screenshot.spec.ts-snapshots/screenshot-clip-rect-webkit.png and b/tests/page/page-screenshot.spec.ts-snapshots/screenshot-clip-rect-webkit.png differ diff --git a/tests/page/page-screenshot.spec.ts-snapshots/screenshot-grid-fullpage-webkit.png b/tests/page/page-screenshot.spec.ts-snapshots/screenshot-grid-fullpage-webkit.png index 8f12800e5c..6e2401d926 100644 Binary files a/tests/page/page-screenshot.spec.ts-snapshots/screenshot-grid-fullpage-webkit.png and b/tests/page/page-screenshot.spec.ts-snapshots/screenshot-grid-fullpage-webkit.png differ diff --git a/tests/page/page-screenshot.spec.ts-snapshots/screenshot-iframe-webkit.png b/tests/page/page-screenshot.spec.ts-snapshots/screenshot-iframe-webkit.png index bfaaf908ed..b9f6537140 100644 Binary files a/tests/page/page-screenshot.spec.ts-snapshots/screenshot-iframe-webkit.png and b/tests/page/page-screenshot.spec.ts-snapshots/screenshot-iframe-webkit.png differ diff --git a/tests/page/page-screenshot.spec.ts-snapshots/screenshot-offscreen-clip-webkit.png b/tests/page/page-screenshot.spec.ts-snapshots/screenshot-offscreen-clip-webkit.png index 2b8dc1065f..90d95bddb8 100644 Binary files a/tests/page/page-screenshot.spec.ts-snapshots/screenshot-offscreen-clip-webkit.png and b/tests/page/page-screenshot.spec.ts-snapshots/screenshot-offscreen-clip-webkit.png differ diff --git a/tests/page/page-screenshot.spec.ts-snapshots/screenshot-sanity-webkit.png b/tests/page/page-screenshot.spec.ts-snapshots/screenshot-sanity-webkit.png index af070c52a8..d9cc944393 100644 Binary files a/tests/page/page-screenshot.spec.ts-snapshots/screenshot-sanity-webkit.png and b/tests/page/page-screenshot.spec.ts-snapshots/screenshot-sanity-webkit.png differ diff --git a/tests/page/page-screenshot.spec.ts-snapshots/should-mask-in-parallel-1-webkit.png b/tests/page/page-screenshot.spec.ts-snapshots/should-mask-in-parallel-1-webkit.png index c1e1b21504..2e281b6675 100644 Binary files a/tests/page/page-screenshot.spec.ts-snapshots/should-mask-in-parallel-1-webkit.png and b/tests/page/page-screenshot.spec.ts-snapshots/should-mask-in-parallel-1-webkit.png differ diff --git a/tests/page/page-screenshot.spec.ts-snapshots/should-mask-in-parallel-2-webkit.png b/tests/page/page-screenshot.spec.ts-snapshots/should-mask-in-parallel-2-webkit.png index 1cb1bf352f..6abe4d43de 100644 Binary files a/tests/page/page-screenshot.spec.ts-snapshots/should-mask-in-parallel-2-webkit.png and b/tests/page/page-screenshot.spec.ts-snapshots/should-mask-in-parallel-2-webkit.png differ diff --git a/tests/page/page-screenshot.spec.ts-snapshots/should-mask-inside-iframe-webkit.png b/tests/page/page-screenshot.spec.ts-snapshots/should-mask-inside-iframe-webkit.png index 419417be4e..ae8689ca48 100644 Binary files a/tests/page/page-screenshot.spec.ts-snapshots/should-mask-inside-iframe-webkit.png and b/tests/page/page-screenshot.spec.ts-snapshots/should-mask-inside-iframe-webkit.png differ diff --git a/tests/page/page-screenshot.spec.ts-snapshots/should-mask-multiple-elements-webkit.png b/tests/page/page-screenshot.spec.ts-snapshots/should-mask-multiple-elements-webkit.png index 777055207c..04425b1378 100644 Binary files a/tests/page/page-screenshot.spec.ts-snapshots/should-mask-multiple-elements-webkit.png and b/tests/page/page-screenshot.spec.ts-snapshots/should-mask-multiple-elements-webkit.png differ