Incorrect dimensions in image preview

RESOLVED FIXED in Firefox 29

Status

DevTools
Inspector
RESOLVED FIXED
5 years ago
a month ago

People

(Reporter: Fernando García Gómez, stripTM, Assigned: pbro)

Tracking

28 Branch
Firefox 29
x86
Linux

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 2 obsolete attachments)

(Reporter)

Description

5 years ago
Created attachment 8340833 [details]
developer_tools_img_dimensions.html

The image size information is not correct, the dimensions corresponds to the preview, not those of the original image.

In the test case the image (980px x 720px) show 400 x 110.

Original bug #765105
(Assignee)

Updated

5 years ago
Assignee: nobody → pbrosset
(Assignee)

Comment 1

5 years ago
Created attachment 8341764 [details] [diff] [review]
bug945068-tooltip-image-dimension.patch

Patch that solves the image dimension problem and adds new test assertions.
The problem was that after the size was retrieved, it was lost when resolving the tooltipData promise.

Ongoing try build for this patch: https://tbpl.mozilla.org/?tree=Try&rev=7861a4cf78ed
Attachment #8341764 - Flags: review?(fayearthur)
Attachment #8341764 - Flags: review?(fayearthur) → review+
(Assignee)

Comment 2

5 years ago
Thanks Heather!
Keywords: checkin-needed
(In reply to Patrick Brosset [:pbrosset] from comment #1)
> Ongoing try build for this patch:
> https://tbpl.mozilla.org/?tree=Try&rev=7861a4cf78ed

I'm seeing a 10.6 failure on the try push:
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/devtools/markupview/test/browser_inspector_markup_765105_tooltip.js | Tooltip label for [img.local] displays the right image size - Got Could not load the image, expected 192 x 192
Status: NEW → ASSIGNED
Keywords: checkin-needed
(Assignee)

Comment 4

5 years ago
Sorry, I don't know how I missed this.
(Assignee)

Comment 5

5 years ago
Created attachment 8345832 [details] [diff] [review]
bug945068-tooltip-image-dimension V2.patch

Simple change compared the 1st version of this patch in the way dimensions are displayed in the tooltip:
Now, if dimensions have already been retrieved (which is always the case for the markup-view), no need to wait for the image load to display them.

New try build: https://tbpl.mozilla.org/?tree=Try&rev=ca8bbc8e8c4f
Attachment #8341764 - Attachment is obsolete: true
Attachment #8345832 - Flags: review?(fayearthur)
(Assignee)

Comment 6

5 years ago
Try build is green
Attachment #8345832 - Flags: review?(fayearthur) → review+
(Assignee)

Comment 7

5 years ago
Created attachment 8346421 [details] [diff] [review]
bug945068-tooltip-image-dimension V3.patch

Simple rebase, so carrying the R+ over.
Attachment #8345832 - Attachment is obsolete: true
Attachment #8346421 - Flags: review+
(Assignee)

Comment 8

5 years ago
Fixed in fx-team: https://hg.mozilla.org/integration/fx-team/rev/482380835b2a
Whiteboard: [fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/482380835b2a
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 29

Updated

a month ago
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.