Bug 862078 - Use an about:config preference to control multiprocess browsing, part 2 (r=felipe)

This commit is contained in:
Bill McCloskey
2013-04-22 19:47:52 -07:00
parent 6d03306ff2
commit 7ad30cc2a4
5 changed files with 85 additions and 32 deletions

View File

@@ -40,6 +40,10 @@ var FullZoom = {
// Initialization & Destruction
init: function FullZoom_init() {
// Bug 691614 - zooming support for electrolysis
if (gMultiProcessBrowser)
return;
// Listen for scrollwheel events so we can save scrollwheel-based changes.
window.addEventListener("DOMMouseScroll", this, false);
@@ -58,6 +62,10 @@ var FullZoom = {
},
destroy: function FullZoom_destroy() {
// Bug 691614 - zooming support for electrolysis
if (gMultiProcessBrowser)
return;
gPrefService.removeObserver("browser.zoom.", this);
this._cps2.removeObserverForName(this.name, this);
window.removeEventListener("DOMMouseScroll", this, false);
@@ -210,6 +218,10 @@ var FullZoom = {
* (optional) browser object displaying the document
*/
onLocationChange: function FullZoom_onLocationChange(aURI, aIsTabSwitch, aBrowser) {
// Bug 691614 - zooming support for electrolysis
if (gMultiProcessBrowser)
return;
if (!aURI || (aIsTabSwitch && !this.siteSpecific)) {
this._notifyOnLocationChange();
return;