From 0c0f768648b3e05f4166ec9f2190e744ce50606e Mon Sep 17 00:00:00 2001 From: Benjamin Smedberg Date: Thu, 24 Mar 2011 14:44:07 -0400 Subject: [PATCH] Bug 617539 - Remove _MOZILLA_2_0 interfaces, mobile-browser fixup, r=mfinkle --- mobile/chrome/content/bindings/browser.js | 11 ++++------- mobile/chrome/content/browser-ui.js | 2 +- mobile/chrome/content/browser.js | 4 +--- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/mobile/chrome/content/bindings/browser.js b/mobile/chrome/content/bindings/browser.js index 45a6b2426f4..c1bc7a110d3 100644 --- a/mobile/chrome/content/bindings/browser.js +++ b/mobile/chrome/content/bindings/browser.js @@ -333,8 +333,7 @@ let ContentScroll = { break; // Map ID to element - let cwu20 = rootCwu.QueryInterface(Ci.nsIDOMWindowUtils_MOZILLA_2_0_BRANCH); - let element = cwu20.findElementWithViewId(json.id); + let element = rootCwu.findElementWithViewId(json.id); if (!element) break; @@ -358,8 +357,7 @@ let ContentScroll = { let win = element.ownerDocument.defaultView; let winCwu = win.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils); - let winCwu20 = winCwu.QueryInterface(Ci.nsIDOMWindowUtils_MOZILLA_2_0_BRANCH); - winCwu20.setDisplayPortForElement(x, y, displayport.width, displayport.height, element); + winCwu.setDisplayPortForElement(x, y, displayport.width, displayport.height, element); // XXX If we scrolled during this displayport update, then it is the // end of a pan. Due to bug 637852, there may be seaming issues @@ -367,7 +365,7 @@ let ContentScroll = { if (json.id == 1 && json.scrollX >= 0 && json.scrollY >= 0) win.setTimeout( function() { - winCwu20.redraw(); + winCwu.redraw(); }, 0); break; @@ -444,8 +442,7 @@ let ContentActive = { case "Content:Deactivate": docShell.isActive = false; let cwu = content.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils); - let cwu20 = cwu.QueryInterface(Ci.nsIDOMWindowUtils_MOZILLA_2_0_BRANCH); - cwu20.setDisplayPortForElement(0,0,0,0,content.document.documentElement); + cwu.setDisplayPortForElement(0,0,0,0,content.document.documentElement); break; case "Content:Activate": diff --git a/mobile/chrome/content/browser-ui.js b/mobile/chrome/content/browser-ui.js index 19e712d0b13..10d3d971b80 100644 --- a/mobile/chrome/content/browser-ui.js +++ b/mobile/chrome/content/browser-ui.js @@ -569,7 +569,7 @@ var BrowserUI = { #ifndef MOZ_OFFICIAL_BRANDING setTimeout(function() { - let startup = Cc["@mozilla.org/toolkit/app-startup;1"].getService(Ci.nsIAppStartup_MOZILLA_2_0).getStartupInfo(); + let startup = Cc["@mozilla.org/toolkit/app-startup;1"].getService(Ci.nsIAppStartup).getStartupInfo(); for (let name in startup) { if (name != "process") Services.console.logStringMessage("[timing] " + name + ": " + (startup[name] - startup.process) + "ms"); diff --git a/mobile/chrome/content/browser.js b/mobile/chrome/content/browser.js index 2c7431cc83c..06adc717f35 100644 --- a/mobile/chrome/content/browser.js +++ b/mobile/chrome/content/browser.js @@ -2596,10 +2596,8 @@ Tab.prototype = { // stop about:blank from loading browser.stop(); - const i = Ci.nsIFrameLoader_MOZILLA_2_0_BRANCH; let fl = browser.QueryInterface(Ci.nsIFrameLoaderOwner).frameLoader; - let enabler = fl.QueryInterface(i); - enabler.renderMode = i.RENDER_MODE_ASYNC_SCROLL; + fl.renderMode = Ci.nsIFrameLoader.RENDER_MODE_ASYNC_SCROLL; return browser; },