Support multiple downscale requests

RESOLVED DUPLICATE of bug 1060200

Status

()

defect
RESOLVED DUPLICATE of bug 1060200
7 years ago
5 years ago

People

(Reporter: joe, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

7 years ago
Bug 486918 introduces a high-quality downscaler, but only supports 1 scale request at a time. It should support many; Jeff suggests 16, which is as reasonable a number as any.
Attachment #665590 - Flags: review?(justin.lebar+bug)
Comment on attachment 665590 [details] [diff] [review]
Support multiple scales

Review of attachment 665590 [details] [diff] [review]:
-----------------------------------------------------------------

::: image/src/RasterImage.cpp
@@ +2796,5 @@
> +
> +  // We remove from the back and insert to the front.
> +  ScaleRequest* old = mScaleRequests.back();
> +  mScaleRequests.pop_back();
> +  delete old;

Is it possible for the old request to still be in the middle of scaling at this point? If it is, I'm concerned that this may cause use-after-free.
(Reporter)

Comment 2

7 years ago
Comment on attachment 665590 [details] [diff] [review]
Support multiple scales

I want to rework this somewhat.
Attachment #665590 - Flags: review?(justin.lebar+bug)
(Reporter)

Updated

7 years ago
Assignee: nobody → joe
(Reporter)

Updated

6 years ago
Duplicate of this bug: 820393
(Reporter)

Updated

6 years ago
Duplicate of this bug: 849240

Updated

6 years ago
OS: Mac OS X → All
Hardware: x86 → All

Updated

6 years ago
Blocks: 859231

Updated

6 years ago
Version: 15 Branch → Trunk
(Reporter)

Updated

6 years ago
Assignee: joe → nobody

Comment 5

5 years ago
OK now this bug is abandoned by its reporter, and we still have this issue.
(Also check https://bug849240.bugzilla.mozilla.org/attachment.cgi?id=722794)

Comment 6

5 years ago
Bug occasionally affects pages with one instance of the image on each page but have been loaded into cache before. Open links in that order.
https://taigaak.org/dump/imgscale3/
https://taigaak.org/dump/imgscale4/
https://taigaak.org/dump/imgscale2/

Updated

5 years ago
Duplicate of this bug: 979352

Comment 9

5 years ago
Hi all

I'm the reporter of the previous (duplicate) Bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=979352

I've added a small example in that report, but mainly wanted to ask a few questions and present a possible workaround (that at leasts seem to work for my case). Am I right, that the "1 scale request at a time" limit is only valid for a single image instance? If that's correct my findings seem logical and adding a random/pseudo query string to the image request should work around this issue (my tests seem to point in that direction).

Of course this is not 100% optimal as it means it would download the images multiple times. In a (very few?) cases it might not even be possible to alter/append to the query string. But in my case I luckily can code this via jQuery and images are only static resources. It would IMO allow to write a jQuery plugin that would do this for all needed images automatically (and only for firefox).

Maybe someone with more insight/knowledge could confirm that? So we would at least have a documented workaround?

Hope this is usefull for some people!

Comment 10

5 years ago
Any updates on this bug? IMO it's a crucial one which affected the user experience of image-heavy sites a lot.

Comment 11

5 years ago
There was and currently is a lot of activity regarding changing scaling-stuff for images.
Will the use-cases describe in here, especially comment #5, be covered by these changes?
Flags: needinfo?(seth)
Elbart, this is fixed 100% by bug 1060200. (Indeed, perhaps I should've posted that patch in this bug, but it's too late to rearrange things now.)

I'm going to dupe this against bug 1060200.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Flags: needinfo?(seth)
Resolution: --- → DUPLICATE
Duplicate of bug: 1060200
You need to log in before you can comment on or make changes to this bug.