Closed Bug 541779 Opened 15 years ago Closed 15 years ago

Make site-specific zoom check asynchronous

Categories

(Firefox :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 3.7a4

People

(Reporter: rflint, Assigned: rflint)

References

Details

(Keywords: perf, Whiteboard: [tsnap])

Attachments

(1 file, 2 obsolete files)

Attached patch WIP (obsolete) (deleted) — Splinter Review
No description provided.
Attached patch Patch (obsolete) (deleted) — Splinter Review
Mostly test changes - I've removed the print preview tests because getting them working is non-trivial and I plan to rip out in-window previewing anyway.
Attachment #423215 - Attachment is obsolete: true
Attachment #428858 - Flags: review?(myk)
The last time browser_bug386835.js caught a print preview regression was in bug 544018 comment 23 :/
Comment on attachment 428858 [details] [diff] [review] Patch Sorry about the delay reviewing this! >+ // Avoid the cps roundtrip and apply the default/global setting. Nit: setting -> pref! >+ var self = this; >+ this._cps.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); >+ else >+ self._applyPrefToSetting(); >+ }); If the browser's current URI is different than the one for which we got the pref, is it possible that the application of the default/global pref will race the application of the site-specific pref for the new URL? And is it necessary to apply the default/global pref at all if the URLs differ? Presumably onLocationChange will get called again for the new URL, and it'll apply either the site-specific pref for that URL or the default/global pref.
Attached patch Patch v2 (deleted) — Splinter Review
(In reply to comment #3) > If the browser's current URI is different than the one for which we got the > pref, is it possible that the application of the default/global pref will race > the application of the site-specific pref for the new URL? > > And is it necessary to apply the default/global pref at all if the URLs differ? It can indeed race, and no, it's not necessary. I think I added that while debugging something and simply forgot to remove it.
Attachment #428858 - Attachment is obsolete: true
Attachment #433472 - Flags: review?(myk)
Attachment #428858 - Flags: review?(myk)
Comment on attachment 433472 [details] [diff] [review] Patch v2 >diff --git a/browser/base/content/browser-fullZoom.js b/browser/base/content/browser-fullZoom.js >- var browser = aBrowser || gBrowser.selectedBrowser; >+ var browser = aBrowser || (gBrowser && gBrowser.selectedBrowser); Heh, funky, but I guess it works. r=myk!
Attachment #433472 - Flags: review?(myk) → review+
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Flags: in-testsuite-
Flags: in-litmus-
Resolution: --- → FIXED
Target Milestone: Firefox 3.7a1 → Firefox 3.7a4
Zoomed page does not flicker after switching back tab.
Oops,Sorry, I have transmitted a message by mistake.
Depends on: 555211
Depends on: 555224
Is variable name isSaneURI in the patch a spelling mistake of isSameURI?
Depends on: 559991
Depends on: 559992
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: