The default bug view has changed. See this FAQ.

Images loaded into background tabs are decoded immediately

RESOLVED FIXED in mozilla14

Status

()

Core
ImageLib
RESOLVED FIXED
5 years ago
2 years ago

People

(Reporter: Justin Lebar (not reading bugmail), Assigned: Justin Lebar (not reading bugmail))

Tracking

unspecified
mozilla14
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
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

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

Updated

5 years ago
Depends on: 512435
(Assignee)

Comment 1

5 years ago
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+
(Assignee)

Comment 3

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/20d19312ccc1
Target Milestone: --- → mozilla14
https://hg.mozilla.org/mozilla-central/rev/20d19312ccc1
Status: NEW → RESOLVED
Last Resolved: 5 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.
(Assignee)

Comment 6

5 years ago
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.