Closed Bug 945068 Opened 11 years ago Closed 11 years ago

Incorrect dimensions in image preview

Categories

(DevTools :: Inspector, defect)

28 Branch
x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 29

People

(Reporter: striptm, Assigned: pbro)

Details

Attachments

(2 files, 2 obsolete files)

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: nobody → pbrosset
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+
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
Sorry, I don't know how I missed this.
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)
Try build is green
Attachment #8345832 - Flags: review?(fayearthur) → review+
Simple rebase, so carrying the R+ over.
Attachment #8345832 - Attachment is obsolete: true
Attachment #8346421 - Flags: review+
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
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 29
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: