Closed Bug 722586 Opened 12 years ago Closed 12 years ago

Correctly update active/inactive browsers

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Android
defect
Not set
normal

Tracking

(firefox11 fixed, firefox12 fixed, firefox13 fixed)

VERIFIED FIXED
Firefox 13
Tracking Status
firefox11 --- fixed
firefox12 --- fixed
firefox13 --- fixed

People

(Reporter: Margaret, Assigned: Margaret)

Details

Attachments

(1 file, 1 obsolete file)

Attached patch patch (obsolete) — Splinter Review
So, there are two main issues here here. First of all, we should be using type="content-targetable" instead of type="content" for our inactive browsers. That's what tabbrowser.xml does on desktop, and it's the preferred value according to MDN (I think there are security reasons behind this).

The second main issue is that we're never setting active = false anywhere right now. Since we're not reading Tab.active anywhere, and we always want to be setting the active browser and selected tab at the same time, I decided to just put BrowserApp in charge of setting the active browser when it sets selectedTab.

Let me know if there are good reasons why things are the way they are now, but I assume things are just messy because we've been changing lots of things.

(This is on top of my patch for bug 719868)
Attachment #592938 - Flags: review?(mark.finkle)
(In reply to Margaret Leibovic [:margaret] from comment #0)
> The second main issue is that we're never setting active = false anywhere
> right now.

Hmm, does that mean you're not benefiting from the various fixes that check docShell.isActive, like bug 379535? That would be pretty bad!
(In reply to Gavin Sharp (use gavin@gavinsharp.com for email) from comment #1)
> (In reply to Margaret Leibovic [:margaret] from comment #0)
> > The second main issue is that we're never setting active = false anywhere
> > right now.
> 
> Hmm, does that mean you're not benefiting from the various fixes that check
> docShell.isActive, like bug 379535? That would be pretty bad!

Looks like we're not! It appears we were doing that for XUL fennec [1], but not in native fennec. XUL fennec was setting browser.docShell.isActive, but do we want to be setting browser.isDocShellActive instead, like tabbrowser.xml does [2]?

[1] http://mxr.mozilla.org/mozilla-central/source/mobile/xul/chrome/content/bindings/browser.js#703
[2] http://mxr.mozilla.org/mozilla-central/source/browser/base/content/tabbrowser.xml#859
Attached patch patch v2Splinter Review
Taking Gavin's comment into account. I decided to do it tabbrowser style.
Attachment #592938 - Attachment is obsolete: true
Attachment #592938 - Flags: review?(mark.finkle)
Attachment #593135 - Flags: review?(mark.finkle)
Comment on attachment 593135 [details] [diff] [review]
patch v2

Good catch!
Attachment #593135 - Flags: review?(mark.finkle) → review+
https://hg.mozilla.org/mozilla-central/rev/9730ad2d5d06
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 13
Comment on attachment 593135 [details] [diff] [review]
patch v2

[Approval Request Comment]
Performance win that missed getting ported over from XUL fennec. Low-risk.
Attachment #593135 - Flags: approval-mozilla-beta?
Attachment #593135 - Flags: approval-mozilla-aurora?
Comment on attachment 593135 [details] [diff] [review]
patch v2

[Triage Comment]
Mobile only - approved for Aurora 12 and Beta 11.
Attachment #593135 - Flags: approval-mozilla-beta?
Attachment #593135 - Flags: approval-mozilla-beta+
Attachment #593135 - Flags: approval-mozilla-aurora?
Attachment #593135 - Flags: approval-mozilla-aurora+
Verified fixed on:

Firefox 13.0a1 (2012-02-07)
20120207031136
http://hg.mozilla.org/mozilla-central/rev/b077059c575a
Device: HTC Desire Z
OS: Android 2.3.3

Firefox 12.0a2 (2012-02-06)
20120206042011
http://hg.mozilla.org/releases/mozilla-aurora/rev/9fb0c06ceb49
Device: HTC Desire Z
OS: Android 2.3.3

Firefox 11.0
20120206202409
http://hg.mozilla.org/releases/mozilla-beta/rev/1c0aba74d116
Device: HTC Desire Z
OS: Android 2.3.3
Status: RESOLVED → VERIFIED
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: