Bug 627068 - Don't set displayport for background tabs [r=stechz]
--- a/mobile/chrome/content/bindings/browser.xml
+++ b/mobile/chrome/content/bindings/browser.xml
@@ -764,18 +764,21 @@
delete this.self._contentViews[this._id];
},
/**
* The cache viewport is what parts of content is cached in the parent process for
* fast scrolling. This syncs that up with the current projection viewport.
*/
_updateCacheViewport: function() {
+ let self = this.self;
+ if (!self.active)
+ return;
+
let contentView = this._contentView;
- let self = this.self;
let viewportSize = this._getViewportSize();
let cacheWidth = self._cacheRatioWidth * viewportSize.width;
let cacheHeight = self._cacheRatioHeight * viewportSize.height;
// Put the center point of the displayport at the center point
// of the viewport.
let cacheX = contentView.scrollX + viewportSize.width / 2 - cacheWidth / 2;
let cacheY = contentView.scrollY + viewportSize.height / 2 - cacheHeight / 2;
--- a/mobile/chrome/content/browser.js
+++ b/mobile/chrome/content/browser.js
@@ -2455,16 +2455,19 @@ function Tab(aURI, aParams) {
// Set to 0 since new tabs that have not been viewed yet are good tabs to
// toss if app needs more memory.
this.lastSelected = 0;
// aParams is an object that contains some properties for the initial tab
// loading like flags, a referrerURI, a charset or even a postData.
this.create(aURI, aParams || {});
+
+ // default tabs to inactive (i.e. no display port)
+ this.active = false;
}
Tab.prototype = {
get browser() {
return this._browser;
},
get notification() {