feat(webkit): roll to r1588 (#10976)

This commit is contained in:
Yury Semikhatsky 2021-12-16 12:43:57 -08:00 committed by GitHub
parent 7c3629b72a
commit 921aa02ce4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 30 additions and 7 deletions

View file

@ -23,7 +23,7 @@
},
{
"name": "webkit",
"revision": "1586",
"revision": "1588",
"installByDefault": true,
"revisionOverrides": {
"mac10.14": "1446"

View file

@ -849,17 +849,17 @@ export module Protocol {
range?: SourceRange;
}
/**
* CSS @media (as well as other users of media queries, like @import, <style>, <link>, etc.) and @supports descriptor.
* CSS @media (as well as other users of media queries, like @import, <style>, <link>, etc.), @supports, and @layer descriptor.
*/
export interface Grouping {
/**
* Media query text.
* Source of the media query: "media-rule" if specified by a @media rule, "media-import-rule" if specified by an @import rule, "media-link-node" if specified by a "media" attribute in a linked style sheet's LINK tag, "media-style-node" if specified by a "media" attribute in an inline style sheet's STYLE tag, "supports-rule" if specified by an @supports rule, "layer-rule" if specified by an @layer rule.
*/
text: string;
type: "media-rule"|"media-import-rule"|"media-link-node"|"media-style-node"|"supports-rule"|"layer-rule"|"layer-import-rule";
/**
* Source of the media query: "media-rule" if specified by a @media rule, "media-import-rule" if specified by an @import rule, "media-link-node" if specified by a "media" attribute in a linked style sheet's LINK tag, "media-style-node" if specified by a "media" attribute in an inline style sheet's STYLE tag, "supports-rule" if specified by an @supports rule, .
* Query text if specified by a @media or @supports rule. Layer name (or not present for anonymous layers) for @layer rules.
*/
type: "media-rule"|"media-import-rule"|"media-link-node"|"media-style-node"|"supports-rule";
text?: string;
/**
* URL of the document containing the CSS grouping.
*/

View file

@ -30,7 +30,7 @@ it('should work', async ({ page, server, browserName, headless }) => {
});
it('should handle nested frames', async ({ page, server }) => {
await page.setViewportSize({ width: 500, height: 500 });
await page.setViewportSize({ width: 616, height: 500 });
await page.goto(server.PREFIX + '/frames/nested-frames.html');
const nestedFrame = page.frames().find(frame => frame.name() === 'dos');
const elementHandle = await nestedFrame.$('div');
@ -38,6 +38,29 @@ it('should handle nested frames', async ({ page, server }) => {
expect(box).toEqual({ x: 24, y: 224, width: 268, height: 18 });
});
it('should get frame box', async ({ page, browserName }) => {
it.fail(browserName === 'webkit', 'https://github.com/microsoft/playwright/issues/10977');
await page.setViewportSize({ width: 200, height: 200 });
await page.setContent(`<style>
body {
display: flex;
height: 500px;
margin: 0px;
}
body iframe {
flex-shrink: 1;
border: 0;
background-color: green;
}
</style>
<iframe></iframe>
`);
const elementHandle = await page.$('iframe');
const box = await elementHandle.boundingBox();
expect(box).toEqual({ x: 0, y: 0, width: 300, height: 500 });
});
it('should handle scroll offset and click', async ({ page, server }) => {
await page.setContent(`
<style>* { margin: 0; padding: 0; }</style>