Closed Bug 1546123 Opened 6 years ago Closed 6 years ago

[about:addons] Fix size detection for preview images

Categories

(Toolkit :: Add-ons Manager, defect, P1)

63 Branch
defect

Tracking

()

VERIFIED FIXED
mozilla68
Tracking Status
firefox68 --- verified
firefox69 --- verified

People

(Reporter: robwu, Assigned: robwu)

References

Details

Attachments

(2 files)

The size for theme preview images is computed using getComputedStyle: https://searchfox.org/mozilla-central/rev/d80f0a570736dce76a2eb184fb65517462089e8a/toolkit/mozapps/extensions/content/aboutaddons.js#410

But because the image is initially empty (and possibly not even part of the DOM yet!), the resulting size is 0, so the logic will fall back to the first screenshot in the list.

This can result in selecting the incorrect image for theme previews.

Note that the cards have a fixed width, so the fix could be as simple as using a fixed number (or deriving it from a CSS variable).

There have been some attempts to change the size, from 680 to 720, but we're apparently back at 680 now:

Pushed by rob@robwu.nl: https://hg.mozilla.org/integration/autoland/rev/c372247f4432 Correct size calculation of theme previews r=mstriemer

Hi Rob, i mentioned https://bugzilla.mozilla.org/show_bug.cgi?id=1546248#c11 that this got backed out, not sure if you noticed.

Flags: needinfo?(rob)
Pushed by rob@robwu.nl: https://hg.mozilla.org/integration/autoland/rev/134e12b67bba Correct size calculation of theme previews r=mstriemer
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Flags: needinfo?(rob)
Attached image Bug1546123.png

This issue is verified as fixed on Firefox 69.0a1 (20190521094447) and Firefox 68.0b3 (20190520131124) under Win 7 64-bit and Mac OS X 10.14.1.

Please see the attached screenshot.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: