New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 679268 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug-Regression



Sign in to add a comment

Screencast of remote debugging is huge when desktop DPI is not an integer

Reported by cnsimonc...@gmail.com, Jan 9 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2977.0 Safari/537.36

Steps to reproduce the problem:
1. Set desktop scale to 125%
2. Open chrome://inspect/#devices
3. Connect to a Chrome for Android 55 tab
4. Enable screencast from the toolbar

What is the expected behavior?
The screencast view fits its container.

What went wrong?
The screencast is too huge to use.

Open a DevTools for this remote debugging DevTools, there is an error message in the Console says:
`Request Page.startScreencast failed. {"code":-32602,"message":"Invalid request","data":"maxWidth: integer value expected; maxHeight: integer value expected"}`

Did this work before? Yes It works when screencast from a WebView 37.x

Chrome version: 57.0.2977.0  Channel: dev
OS Version: 10.0
Flash Version: 

After some investigation, I think this line of code may caused this problem: https://cs.chromium.org/chromium/src/third_party/WebKit/Source/devtools/front_end/screencast/ScreencastView.js?rcl=0&l=128

When `window.devicePixelRatio` is not an integer (1.25 in this case), `dimensions.width *= window.devicePixelRatio` will also become a non-integer, while `Page.startScreencast` expects its parameters to be integers.
 

Comment 1 by alph@chromium.org, Jan 10 2017

Components: -Platform>DevTools Platform>DevTools>Mobile
Owner: dgozman@chromium.org
Status: Assigned (was: Unconfirmed)
Cc: dgozman@chromium.org
Owner: allada@chromium.org

Comment 3 by allada@chromium.org, Jan 10 2017

Status: Started (was: Assigned)
Project Member

Comment 4 by bugdroid1@chromium.org, Jan 11 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/275b25d4d93d0eeb6277b3f4f24fbce319ffe1fe

commit 275b25d4d93d0eeb6277b3f4f24fbce319ffe1fe
Author: allada <allada@chromium.org>
Date: Wed Jan 11 04:23:36 2017

[Devtools] Fixes screencast when devtools is screencasting

This patch fixed a bug when devtools is scaled it causes some backend
errors to occur due to expecting an integer instead of float.

R=dgozman
BUG= 679268 

Review-Url: https://codereview.chromium.org/2622633006
Cr-Commit-Position: refs/heads/master@{#442798}

[modify] https://crrev.com/275b25d4d93d0eeb6277b3f4f24fbce319ffe1fe/third_party/WebKit/Source/devtools/front_end/screencast/ScreencastView.js

Comment 5 by allada@chromium.org, Jan 11 2017

Status: Fixed (was: Started)
Thank you! You were correct that was the problem.

Sign in to add a comment