Closed Bug 585771 Opened 14 years ago Closed 14 years ago

Fennec needs to call SetIsActive() on its nsIWebBrowser

Categories

(Firefox for Android Graveyard :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bholley, Assigned: mbrubeck)

Details

Attachments

(1 file)

In bug 343515, I added support for telling docshells when they're active (in Firefox, this corresponds to being the foremost tab). We're going to start using this for optimizations like image discarding and refresh driver throttling. I added the API to nsIWebBrowser, but it currently has no consumers, so in theory it might not work. It would be good to add some sort of test similar to those from bug 343515 to make sure it does. Any Fennec release branched off mozilla-central at a changeset later than the one where bug 512260 lands should almost certainly block on this bug, since otherwise memory usage will go through the roof when we disable discarding on every image ever.
tracking-fennec: --- → ?
Attached patch patch (deleted) — Splinter Review
Assignee: nobody → mbrubeck
Status: NEW → ASSIGNED
Attachment #464265 - Flags: review?(mark.finkle)
Bobby - How is "isActive" different than "isOffScreenBrowser" ? and can we kill "isOffscreenBrowser"?
(In reply to comment #2) > Bobby - How is "isActive" different than "isOffScreenBrowser" ? and can we kill > "isOffscreenBrowser"? According to the IDL documentation, isOffScreenBrowser means that the browser is still being actively rendered via a canvas or something. http://mxr.mozilla.org/mozilla-central/source/docshell/base/nsIDocShell.idl#506 isActive means that we're not rendering it at all. So we want to discard image frames in the !isActive case, but probably not in the isOffScreenBrowser case (if the documentation is correct). Also, mIsActive is correctly propagated to subframes.
Attachment #464265 - Flags: review?(mark.finkle) → review+
When this lands, we should remove the mobile ifdefs added by attachment 464442 [details] [diff] [review].
(In reply to comment #4) > When this lands, we should remove the mobile ifdefs added by > attachment 464442 [details] [diff] [review]. That test looks Firefox-specific (it uses the gBrowser tabbrowser object). We should probably implement some portion of the tabbrowser API in Fennec, as a compatibility layer for tests and addons...
(In reply to comment #5) > We should probably implement some portion of the tabbrowser API in Fennec, as a > compatibility layer for tests and addons... I am very torn about adding such a compat API. The tabbrowser API is not a shinning example to begin with and we can't model the entire API anyway.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
tracking-fennec: ? → ---
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: