Images loaded into background tabs are decoded immediately

RESOLVED FIXED in mozilla14

Status

()

RESOLVED FIXED
7 years ago
4 years ago

People

(Reporter: justin.lebar+bug, Assigned: justin.lebar+bug)

Tracking

unspecified
mozilla14
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

I thought setting decodeondraw = true was supposed to make us wait until a tab is focused before we decode its images, but either that's wrong, or it's broken.

Either way, this is particularly problematic now that we have a cap on the amount of decoded image data we'll keep around, because we can end up in the case where we load a background tab, decode all its images, and then immediately throw those images away, because we don't have space for them!
(Assignee)

Updated

7 years ago
Assignee: nobody → justin.lebar+bug
(Assignee)

Updated

7 years ago
Depends on: 512435
Created attachment 609548 [details] [diff] [review]
Patch v1
Attachment #609548 - Flags: review?(joe)
Comment on attachment 609548 [details] [diff] [review]
Patch v1

I'm not convinced that putting it into a single if statement is actually better for readability, but it's not a big deal.
Attachment #609548 - Flags: review?(joe) → review+
https://hg.mozilla.org/mozilla-central/rev/20d19312ccc1
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
the presshell->IsVisible() check will work for hidden tabs, but it will also report that iframes that have an ancestor with CSS visibility: hidden as not visible. I'm not sure if that is desirable or not.

Also, you might want to also check IsActive on the presshell, I think that now returns false for foreground tabs in minimized windows (which is not covered by IsVisible). Or you might not want to.
It sounds like IsVisible is at least sensible here.
Yeah, I just added those comments in case IsVisible wasn't doing what you expected. But it sounds like it is.
You need to log in before you can comment on or make changes to this bug.