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

Issue 786993 link

Starred by 6 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows
Pri: 2
Type: Bug



Sign in to add a comment

DevTools: capturing area screenshot is wrong with page zoom

Reported by vitezsla...@gmail.com, Nov 20 2017

Issue description

Chrome Version       : 62.0.3202.94
OS Version: 10.0
URLs (if applicable) :
Other browsers tested:
  Add OK or FAIL after other browsers where you have tested this issue:
     Safari 5:
  Firefox 4.x:
     IE 7/8/9:

This issue is related to the "Screenshots of a portion of the viewport" feature introduced in https://developers.google.com/web/updates/2017/08/devtools-release-notes#screenshot-areas

What steps will reproduce the problem?
1. Set windows scaling above 100%
2. Open dev tools and try making a rectangular selection for a screenshot
3. The rectangle does not match the mouse position

What is the expected result?
Expected is that the START and END point of mouse movement matches the selection.


What happens instead of that?
The selection is offsetted. See screenshot attached.

Please provide any additional information below. Attach a screenshot if
possible.

UserAgentString: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36



 
chrome62 rectangular screenshot issue.jpg
100 KB View Download
Labels: Needs-Triage-M62
Cc: sc00335...@techmahindra.com lushnikov@chromium.org
Components: Platform>DevTools
Labels: -Pri-3 M-64 Triaged-ET OS-Linux Pri-2
Status: Untriaged (was: Unconfirmed)
Able to reproduce this issue on reported version 62.0.3202.94 and on latest canary 64.0.3267.0 using Windows 10 and Ubuntu 14.04 when scale > 100% in windows and scale 1.38 in Ubuntu 14.04. Issue is not reproducible on Mac 10.13.1.

This issue is seen from the introduction of Screenshots of a portion of the viewport feature in M62. Hence considering this issue as Non-Regression and marking sa Untriaged.

Thanks!
Owner: dgozman@chromium.org
Status: Assigned (was: Untriaged)
Summary: DevTools: capturing area screenshot is wrong with page zoom (was: Mismatching position of a portion of the viewport when windows scaling is > 1)
Thank you for the report!
Cc: dgozman@chromium.org
 Issue 785776  has been merged into this issue.
Cc: pnangunoori@chromium.org
 Issue 761830  has been merged into this issue.
Cc: divya.pa...@techmahindra.com
 Issue 784167  has been merged into this issue.
Sorry for late response. I tried to repro this one, but I'm not sure what zoom are you talking about? This works fine with browser zoom (the Ctrl+/- one). Perhaps, this is about some other form of zoom?
What steps will reproduce the problem?
1. Set windows scaling above 100%
2. Open dev tools and try making a rectangular selection for a screenshot
3. The rectangle does not match the mouse position
area-screenshot.gif
107 KB View Download
Owner: alph@chromium.org
It's reproducible on Linux with DPR != 1.0
Project Member

Comment 12 by bugdroid1@chromium.org, Jan 10

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

commit a2f3e1a8e91b743e872b809b6249aa32e45df7f3
Author: Alexei Filippov <alph@chromium.org>
Date: Thu Jan 10 18:21:44 2019

DevTools: Fix screenshot selection overlay position on Linux and Win.

BUG=786993

Change-Id: I33a0a6d82dd3ab3c19320582de14d5b204c29ead
Reviewed-on: https://chromium-review.googlesource.com/c/1401433
Commit-Queue: Alexei Filippov <alph@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#621646}
[modify] https://crrev.com/a2f3e1a8e91b743e872b809b6249aa32e45df7f3/third_party/blink/renderer/core/inspector/InspectorOverlayPage.html
[modify] https://crrev.com/a2f3e1a8e91b743e872b809b6249aa32e45df7f3/third_party/blink/renderer/core/inspector/inspector_overlay_agent.cc

Project Member

Comment 13 by bugdroid1@chromium.org, Jan 14

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

commit 5b40045127ca9fe6b94c5c8249b780a7e5e71bbd
Author: Alexei Filippov <alph@chromium.org>
Date: Mon Jan 14 21:13:43 2019

DevTools: Make area and node screenshots work on Win and Linux.

Convert coordinates to device pixels on appropriate platforms.

BUG=786993

Change-Id: I0e9080185073fcf3230604cec53eddf07766096f
Reviewed-on: https://chromium-review.googlesource.com/c/1407609
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#622602}
[modify] https://crrev.com/5b40045127ca9fe6b94c5c8249b780a7e5e71bbd/content/browser/devtools/protocol/page_handler.cc
[modify] https://crrev.com/5b40045127ca9fe6b94c5c8249b780a7e5e71bbd/third_party/blink/renderer/core/inspector/inspector_overlay_agent.cc

Project Member

Comment 14 by bugdroid1@chromium.org, Jan 15

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

commit e1012dd85f495321ff0f361687e16275efc90d9b
Author: Alexei Filippov <alph@chromium.org>
Date: Tue Jan 15 05:26:52 2019

DevTools: Fix screenshot capture for scrolled pages.

BUG=786993

Change-Id: I92226fc7daf17d39366a177bf21b82dd34bc9623
Reviewed-on: https://chromium-review.googlesource.com/c/1410263
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#622742}
[modify] https://crrev.com/e1012dd85f495321ff0f361687e16275efc90d9b/third_party/blink/renderer/core/inspector/inspector_overlay_agent.cc

Sign in to add a comment