New issue
Advanced search Search tips

Issue 905926 link

Starred by 1 user

Issue metadata

Status: Assigned
Merged: issue 905950
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

Device emulation size incorrect for pages with iframes using CDP (non-headless)

Reported by killiank...@gmail.com, Nov 16

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36

Steps to reproduce the problem:
1. Launch chrome in default mode (non headless)
2. Send Emulation.setDeviceMetricsOverride via CDP
3. Navigate to https://www.youtube.com/watch?v=ZSQJbA9ZuL0 via CDP
4. Capture a screenshot via CDP
5. Observe incorrect viewport size

Here is a repro using puppeteer:
https://gist.github.com/kkoenig/84a87f1059d27167ee3eb86b0660f4f0

What is the expected behavior?
The screenshot viewport should remain the same regardless of the site contents

What went wrong?
The captured viewport size does not match the emulated viewport size for certain pages.

Did this work before? No 

Chrome version: 70.0.3538.102  Channel: stable
OS Version: Ubuntu 18.04.1 LTS
Flash Version: 

See the following CL by Jianzhou Feng:
https://chromium-review.googlesource.com/c/chromium/src/+/846611

Additional logic based on is_main_frame may be needed to handle the iframe case
 
correct_size.png
34.5 KB View Download
incorrect_size.png
4.9 KB View Download
Labels: Needs-Triage-M70
Mergedinto: 905950
Status: Duplicate (was: Unconfirmed)
Owner: dgozman@chromium.org
Status: Assigned (was: Duplicate)
This is probably out-of-process iframe not getting the correct emulation parameters. We should work on that.

Sign in to add a comment