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: nobody → justin.lebar+bug
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+
Target Milestone: --- → mozilla14
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.