Closed Bug 559991 Opened 15 years ago Closed 14 years ago

zoom flicker when switching between two tabs

Categories

(Firefox :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 4.0b7
Tracking Status
blocking2.0 --- betaN+

People

(Reporter: tnikkel, Assigned: Felipe)

References

Details

(Keywords: regression, Whiteboard: [calm-ui])

Attachments

(1 file, 1 obsolete file)

Open two tabs, one with a long page that takes some time to reflow (http://mxr.mozilla.org/mozilla-central/source/layout/base/nsCSSFrameConstructor.cpp works for me, http://www.whatwg.org/specs/web-apps/current-work/ is bigger), and another with anything. Increase the zoom in the short page tab. Keep hitting ctrl-tab, the zoom will flicker in both tabs if you do it enough. Speculatively setting this to block bug 541779.
blocking2.0: --- → ?
Keywords: regression
Whiteboard: [calm-ui]
Yep - regression and crappy looking - jesse, you flagged this as a regression, any chance of a range?
blocking2.0: ? → betaN+
We're guessing it's a regression from bug 541779, since it caused a raft of similar regressions.
I'm pretty sure I bisected this down to the day bug 541779 landed when I filed.
I'm working on this one too
Assignee: nobody → felipc
Status: NEW → ASSIGNED
Attached patch Patch - v1 (obsolete) (deleted) — Splinter Review
Patch. Working on tests now. tn, could you check if this patch fixes the issue for you? (note: this is meant to only fix the flickering when switching tabs)
Seems to fix it for me, thank you!
I'm confused as to why that patch would help - can you explain?
(In reply to comment #7) > I'm confused as to why that patch would help - can you explain? Sure. On tab switch, FullZoom.onLocationChange is called without aBrowser, so the isSaneURI check here doesn't happen, and _applyPrefToSetting is called unconditionally. However, _applyPrefToSetting will pick the selectedBrowser anyway. If you keep switching tabs fast enough, the async callbacks will queue and they can arrive when that requested tab is no longer selected, so we end up applying the zoom level from one tab (the no longer selected) to the wrong one (the current one).
Comment on attachment 467683 [details] [diff] [review] Patch - v1 > var self = this; > Services.contentPrefs.getPref(aURI, this.name, function (aResult) { > // Check that we're still where we expect to be in case this took a while. >- let isSaneURI = (aBrowser && aBrowser.currentURI) ? >- aURI.equals(aBrowser.currentURI) : false; >- if (!aBrowser || isSaneURI) >- self._applyPrefToSetting(aResult, aBrowser); >+ let browser = aBrowser ? aBrowser : gBrowser.selectedBrowser; nit: let browser = aBrowser || gBrowser.selectedBrowser; >+ let currentURI = browser.currentURI; >+ if (aURI.equals(currentURI)) { nit: if (aURI.equals(browser.currentURI))
I will r+ when the new patch with a test is posted!
Attached patch Patch v2 (deleted) — Splinter Review
Then here's a patch with a test! Also fixed dao's comments.
Attachment #467683 - Attachment is obsolete: true
Attachment #470859 - Flags: review?(gavin.sharp)
Attachment #470859 - Flags: review?(gavin.sharp) → review+
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 4.0b6
Flags: in-testsuite+
Depends on: 593378
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: