New issue
Advanced search Search tips

Issue 801218 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 8
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

DevTools: Image with border shows incorrect size

Reported by scott.vi...@gmail.com, Jan 11 2018

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36

Steps to reproduce the problem:
1. Open https://jsfiddle.net/9ux0pw8r/1/
2. Inspect the placeholder image.
3. In Dev Tools, hover over the image URL. (a)
4. Next, uncomment the box-sizing property and check again. (b)

What is the expected behavior?
The popup should show the correct image size.

What went wrong?
At (a) it shows a bigger size due to the border, plus "Natural: 350x150". This implies the image is not being shown at its natural resolution, but it is.

At (b) it just shows the size in the popup (350x150 pixels) but here the image is NOT being shown at its natural resolution - it's showing at 330x130 instead.

Did this work before? N/A 

Chrome version: 63.0.3239.132  Channel: stable
OS Version: OS X 10.13.2
Flash Version:
 
Labels: M-65 Triaged-ET Needs-Triage-M63 OS-Linux OS-Windows
Status: Untriaged (was: Unconfirmed)
Able to reproduce the issue on Mac 10.12.6, Win-10 and Ubuntu 14.04 using chrome reported version #63.0.3239.132 and latest canary # 65.0.3318.0.
This is a non-regression issue as it is observed from M50 old builds. 

Hence, marking it as untriaged to get more inputs from dev team.

Thanks...!!

Comment 2 by l...@chromium.org, Jan 22 2018

Owner: l...@chromium.org
Status: Assigned (was: Untriaged)
Summary: DevTools: Image with border shows incorrect size (was: Image with border shows incorrect size in Dev Tools)
Project Member

Comment 3 by bugdroid1@chromium.org, Oct 6

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

commit a73757aba48e30c90833b13576c15fba83c90f77
Author: Erik Luo <luoe@chromium.org>
Date: Sat Oct 06 03:42:35 2018

DevTools: report correct image sizes in popover

Instead of showing offset, naturalW/H in image preview popover,
- Rendered size: better than 'offset', which includes unwanted
  padding, border.
- Intrinsic size: based on the natural size when loaded by DevTools
  without any density descriptor, also the original resource size.

OffsetW/H is no longer shown, but info available in the box model
and overlay highlight.

Bug:  788114 ,  801218 
Change-Id: I6ec08c5bcd62c0cb3d8815a1d7079cccb022ef5d
Reviewed-on: https://chromium-review.googlesource.com/c/1256072
Reviewed-by: Andrey Lushnikov <lushnikov@chromium.org>
Commit-Queue: Erik Luo <luoe@chromium.org>
Cr-Commit-Position: refs/heads/master@{#597404}
[modify] https://crrev.com/a73757aba48e30c90833b13576c15fba83c90f77/third_party/WebKit/LayoutTests/http/tests/devtools/elements/elements-img-tooltip-expected.txt
[modify] https://crrev.com/a73757aba48e30c90833b13576c15fba83c90f77/third_party/WebKit/LayoutTests/http/tests/devtools/elements/elements-img-tooltip.js
[modify] https://crrev.com/a73757aba48e30c90833b13576c15fba83c90f77/third_party/blink/renderer/devtools/front_end/components/ImagePreview.js
[modify] https://crrev.com/a73757aba48e30c90833b13576c15fba83c90f77/third_party/blink/renderer/devtools/front_end/elements/ElementsTreeOutline.js

Status: Fixed (was: Assigned)

Sign in to add a comment