diff --git a/browser/base/content/tabbrowser.xml b/browser/base/content/tabbrowser.xml index 21a73012007c..c84398db4d41 100644 --- a/browser/base/content/tabbrowser.xml +++ b/browser/base/content/tabbrowser.xml @@ -3086,29 +3086,6 @@ STATE_LOADED: 2, STATE_UNLOADING: 3, - _suppressor: { - _dwu: null, - _count: 0, - init: function() { - this._dwu = window.QueryInterface(Ci.nsIInterfaceRequestor) - .getInterface(Ci.nsIDOMWindowUtils); - }, - destroy: function() { - while (this._count > 0) { - this.unsuppress(); - } - this._dwu = null; - }, - suppress: function() { - this._dwu.suppressPaintingGlobally(); - this._count++; - }, - unsuppress: function() { - this._dwu.unsuppressPaintingGlobally(); - this._count--; - } - }, - getTabState: function(tab) { let state = this.tabState.get(tab); if (state === undefined) { @@ -3145,7 +3122,6 @@ window.addEventListener("MozLayerTreeCleared", this); window.addEventListener("TabRemotenessChange", this); this.setTabState(this.requestedTab, this.STATE_LOADED); - this._suppressor.init(); }, destroy: function() { @@ -3156,7 +3132,6 @@ window.removeEventListener("MozLayerTreeReady", this); window.removeEventListener("MozLayerTreeCleared", this); window.removeEventListener("TabRemotenessChange", this); - this._suppressor.destroy(); this.tabbrowser._switcher = null; }, @@ -3269,11 +3244,7 @@ // loadingTab can be non-null here if we timed out loading the current tab. // In that case we just overwrite it with a different tab; it's had its chance. - if (this.loadingTab == null) { - this._suppressor.suppress(); - } this.loadingTab = this.requestedTab; - this.log("Loading tab " + this.tinfo(this.loadingTab)); this.setTabState(this.requestedTab, this.STATE_LOADING); @@ -3406,7 +3377,6 @@ clearTimeout(this.loadTimer); this.loadTimer = null; this.loadingTab = null; - this._suppressor.unsuppress(); } }, diff --git a/dom/base/nsDOMWindowUtils.cpp b/dom/base/nsDOMWindowUtils.cpp index cd060cd9ac0f..9dfe1832af41 100644 --- a/dom/base/nsDOMWindowUtils.cpp +++ b/dom/base/nsDOMWindowUtils.cpp @@ -3119,34 +3119,6 @@ nsDOMWindowUtils::GetPaintingSuppressed(bool *aPaintingSuppressed) return NS_OK; } -NS_IMETHODIMP -nsDOMWindowUtils::SuppressPaintingGlobally() -{ - NS_ENSURE_TRUE(nsContentUtils::IsCallerChrome(), NS_ERROR_FAILURE); - - nsPresContext* presContext = GetPresContext(); - if (!presContext) { - return NS_ERROR_FAILURE; - } - - presContext->GetRootPresContext()->RefreshDriver()->Freeze(); - return NS_OK; -} - -NS_IMETHODIMP -nsDOMWindowUtils::UnsuppressPaintingGlobally() -{ - NS_ENSURE_TRUE(nsContentUtils::IsCallerChrome(), NS_ERROR_FAILURE); - - nsPresContext* presContext = GetPresContext(); - if (!presContext) { - return NS_ERROR_FAILURE; - } - - presContext->GetRootPresContext()->RefreshDriver()->Thaw(); - return NS_OK; -} - NS_IMETHODIMP nsDOMWindowUtils::GetPlugins(JSContext* cx, JS::MutableHandle aPlugins) { diff --git a/dom/interfaces/base/nsIDOMWindowUtils.idl b/dom/interfaces/base/nsIDOMWindowUtils.idl index 227b2350aac6..1181a3d0f4b8 100644 --- a/dom/interfaces/base/nsIDOMWindowUtils.idl +++ b/dom/interfaces/base/nsIDOMWindowUtils.idl @@ -49,7 +49,7 @@ interface nsIJSRAIIHelper; interface nsIContentPermissionRequest; interface nsIObserver; -[scriptable, uuid(5c4c391c-e083-4d95-95f0-5820c8308445)] +[scriptable, uuid(6064615a-a782-4d08-86db-26ef3851208a)] interface nsIDOMWindowUtils : nsISupports { /** @@ -1607,17 +1607,6 @@ interface nsIDOMWindowUtils : nsISupports { */ readonly attribute boolean paintingSuppressed; - /** - * Suppress painting by freezing the refresh driver. - **/ - void suppressPaintingGlobally(); - - /** - * Unsuppress painting by thawing the refresh driver. - **/ - void unsuppressPaintingGlobally(); - - /** * Returns an array of plugins on the page for opt-in activation. *