Remove unneeded getting of window and DOMWindowUtils so that GetViewportInfo can still return correct information while page is displayed during navigation away from it. (Bug 737621) r=sjohnson approval-mozilla-aurora=blassey
authorL. David Baron <dbaron@dbaron.org>
Wed, 25 Apr 2012 16:33:42 -0700
changeset 95562 b1efdb47182166e9a5538c8cfb414de057f115f5
parent 95561 5fdf583b626883e9d73fa7cdb6385529b7a9a733
child 95563 8d74d509b936e4111bc9eeed75d1aa3c52940763
push id886
push userlsblakk@mozilla.com
push dateMon, 04 Jun 2012 19:57:52 +0000
treeherdermozilla-beta@bbd8d5efd6d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssjohnson
bugs737621
milestone14.0a2
Remove unneeded getting of window and DOMWindowUtils so that GetViewportInfo can still return correct information while page is displayed during navigation away from it. (Bug 737621) r=sjohnson approval-mozilla-aurora=blassey
content/base/src/nsContentUtils.cpp
--- a/content/base/src/nsContentUtils.cpp
+++ b/content/base/src/nsContentUtils.cpp
@@ -207,17 +207,16 @@ static NS_DEFINE_CID(kXTFServiceCID, NS_
 #include "nsIObjectLoadingContent.h"
 #include "nsCCUncollectableMarker.h"
 #include "mozilla/Base64.h"
 #include "mozilla/Preferences.h"
 #include "nsDOMMutationObserver.h"
 
 #include "nsWrapperCacheInlines.h"
 #include "nsIDOMDocumentType.h"
-#include "nsIDOMWindowUtils.h"
 #include "nsCharSeparatedTokenizer.h"
 
 extern "C" int MOZ_XMLTranslateEntity(const char* ptr, const char* end,
                                       const char** next, PRUnichar* result);
 extern "C" int MOZ_XMLCheckQName(const char* ptr, const char* end,
                                  int ns_aware, const char** colon);
 
 using namespace mozilla::dom;
@@ -4843,23 +4842,16 @@ nsContentUtils::GetViewportInfo(nsIDocum
     }
   }
 
   if (aDocument->IsXUL()) {
     ret.autoScale = false;
     return ret;
   }
 
-  nsIDOMWindow* window = aDocument->GetWindow();
-  nsCOMPtr<nsIDOMWindowUtils> windowUtils(do_GetInterface(window));
-
-  if (!windowUtils) {
-    return ret;
-  }
-
   nsAutoString handheldFriendly;
   aDocument->GetHeaderData(nsGkAtoms::handheldFriendly, handheldFriendly);
 
   if (handheldFriendly.EqualsLiteral("true")) {
     return ret;
   }
 
   PRInt32 errorCode;