Release Vulpes OS Preview 26 with Gecko 161.0 and Tundra 0.2.0
This commit is contained in:
parent
3a1fba4efe
commit
e241a42d2f
1 changed files with 1305 additions and 331 deletions
|
|
@ -300,6 +300,10 @@
|
|||
this.handleError(evt);
|
||||
break;
|
||||
|
||||
case '_iconchange':
|
||||
this.setSiteIcon();
|
||||
break;
|
||||
|
||||
case '_locationchange':
|
||||
this.hidePinDialogCard();
|
||||
this.handleLocationChange();
|
||||
|
|
@ -730,6 +734,7 @@
|
|||
this.app.element.addEventListener('mozbrowsermetachange', this);
|
||||
this.app.element.addEventListener('mozbrowserscrollareachanged', this);
|
||||
this.app.element.addEventListener('_locationchange', this);
|
||||
this.app.element.addEventListener('_iconchange', this);
|
||||
this.app.element.addEventListener('_namechanged', this);
|
||||
this.app.element.addEventListener('_securitychange', this);
|
||||
this.app.element.addEventListener('_loading', this);
|
||||
|
|
@ -789,6 +794,7 @@
|
|||
this.app.element.removeEventListener('mozbrowsererror', this);
|
||||
this.app.element.removeEventListener('mozbrowsermetachange', this);
|
||||
this.app.element.removeEventListener('_locationchange', this);
|
||||
this.app.element.removeEventListener('_iconchange', this);
|
||||
this.app.element.removeEventListener('_namechanged', this);
|
||||
this.app.element.removeEventListener('_loading', this);
|
||||
this.app.element.removeEventListener('_loaded', this);
|
||||
|
|
@ -1276,8 +1282,19 @@
|
|||
return;
|
||||
}
|
||||
|
||||
const generation = this.iconGeneration = (this.iconGeneration || 0) + 1;
|
||||
const favicon = Object.keys(this.app.favicons || {}).find(href => {
|
||||
try { return new URL(href).origin === new URL(this.app.config.url).origin; }
|
||||
catch (_) { return false; }
|
||||
});
|
||||
if (favicon) {
|
||||
this.siteIcon.style.backgroundImage = 'url(' + JSON.stringify(favicon) + ')';
|
||||
this._currentIconUrl = favicon;
|
||||
return;
|
||||
}
|
||||
this.app.getSiteIconUrl(ICON_SIZE)
|
||||
.then(iconObject => {
|
||||
if (generation !== this.iconGeneration) return;
|
||||
// We compare the original icon URL, otherwise there is a flickering
|
||||
// effect because a different object url is created each time.
|
||||
if (this._currentIconUrl !== iconObject.originalUrl) {
|
||||
|
|
@ -1286,6 +1303,7 @@
|
|||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
if (generation !== this.iconGeneration) return;
|
||||
// Installed apps have a manifest icon even when the Places cache has
|
||||
// no favicon. Keep the original chrome slot and select a crisp source.
|
||||
const icons = this.app.manifest && this.app.manifest.icons;
|
||||
|
|
|
|||
Loading…
Reference in a new issue