зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1448944 - Avoid cps2 roundtrip for null principal about:blank r=Gijs
MozReview-Commit-ID: HeKrcoKo1EH --HG-- extra : rebase_source : ec9ea0b79d1afd938f0ecf78d8a7e6543f3e4b93
This commit is contained in:
Родитель
f484a33f52
Коммит
df67d38e71
|
@ -208,10 +208,21 @@ var FullZoom = {
|
|||
return;
|
||||
}
|
||||
|
||||
// Avoid the cps roundtrip and apply the default/global pref.
|
||||
if (aURI.spec == "about:blank") {
|
||||
this._applyPrefToZoom(undefined, browser,
|
||||
this._notifyOnLocationChange.bind(this, browser));
|
||||
if (!browser.contentPrincipal || browser.contentPrincipal.isNullPrincipal) {
|
||||
// For an about:blank with a null principal, zooming any amount does not
|
||||
// make any sense - so simply do 100%.
|
||||
this._applyPrefToZoom(1, browser,
|
||||
this._notifyOnLocationChange.bind(this, browser));
|
||||
} else {
|
||||
// If it's not a null principal, there may be content loaded into it,
|
||||
// so use the global pref. This will avoid a cps2 roundtrip if we've
|
||||
// already loaded the global pref once. Really, this should probably
|
||||
// use the contentPrincipal's origin if it's an http(s) principal.
|
||||
// (See bug 1457597)
|
||||
this._applyPrefToZoom(undefined, browser,
|
||||
this._notifyOnLocationChange.bind(this, browser));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче