Backed out changeset 8378f26b0730 (bug 1061469)
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Thu, 02 Oct 2014 13:59:55 +0200
changeset 231592 b0c87b1e4e6e2791b283f65533246c418964efd7
parent 231591 a39933b3beccd3c9680e8e929609164909690248
child 231593 946466b93fb68216b2c465c082eebf47f3521dd3
push id4187
push userbhearsum@mozilla.com
push dateFri, 28 Nov 2014 15:29:12 +0000
treeherdermozilla-beta@f23cc6a30c11 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1061469
milestone35.0a1
backs out8378f26b07304275cab36c135881d44ac60544d3
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 8378f26b0730 (bug 1061469)
content/base/public/nsIDocument.h
content/base/src/nsDocument.h
content/html/content/test/imports/file_simple_import.html
content/html/content/test/imports/mochitest.ini
content/html/content/test/imports/test_defaultView.html
--- a/content/base/public/nsIDocument.h
+++ b/content/base/public/nsIDocument.h
@@ -2238,18 +2238,17 @@ public:
   // this GetTitle or the nsAString version from non-const methods, since
   // neither is an exact match.
   virtual void GetTitle(nsString& aTitle) = 0;
   virtual void SetTitle(const nsAString& aTitle, mozilla::ErrorResult& rv) = 0;
   void GetDir(nsAString& aDirection) const;
   void SetDir(const nsAString& aDirection);
   nsIDOMWindow* GetDefaultView() const
   {
-    // For Imports the defaultView is always null.
-    return mMasterDocument ? nullptr : GetWindow();
+    return GetWindow();
   }
   Element* GetActiveElement();
   bool HasFocus(mozilla::ErrorResult& rv) const;
   // Event handlers are all on nsINode already
   bool MozSyntheticDocument() const
   {
     return IsSyntheticDocument();
   }
@@ -2734,18 +2733,16 @@ protected:
   nsCOMPtr<nsIVariant> mStateObjectCached;
 
   uint32_t mInSyncOperationCount;
 
   nsRefPtr<mozilla::dom::XPathEvaluator> mXPathEvaluator;
 
   uint32_t mBlockDOMContentLoaded;
   bool mDidFireDOMContentLoaded:1;
-
-  nsCOMPtr<nsIDocument> mMasterDocument;
 };
 
 NS_DEFINE_STATIC_IID_ACCESSOR(nsIDocument, NS_IDOCUMENT_IID)
 
 /**
  * mozAutoSubtreeModified batches DOM mutations so that a DOMSubtreeModified
  * event is dispatched, if necessary, when the outermost mozAutoSubtreeModified
  * object is deleted.
--- a/content/base/src/nsDocument.h
+++ b/content/base/src/nsDocument.h
@@ -1768,16 +1768,17 @@ private:
   bool mAutoSize, mAllowZoom, mAllowDoubleTapZoom, mValidScaleFloat, mValidMaxScale, mScaleStrEmpty, mWidthStrEmpty;
   mozilla::CSSSize mViewportSize;
 
   nsrefcnt mStackRefCnt;
   bool mNeedsReleaseAfterStackRefCntRelease;
 
   CSPErrorQueue mCSPWebConsoleErrorQueue;
 
+  nsCOMPtr<nsIDocument> mMasterDocument;
   nsRefPtr<mozilla::dom::ImportManager> mImportManager;
   nsTArray<nsCOMPtr<nsINode> > mSubImportLinks;
 
   // Set to true when the document is possibly controlled by the ServiceWorker.
   // Used to prevent multiple requests to ServiceWorkerManager.
   bool mMaybeServiceWorkerControlled;
 
 #ifdef DEBUG
deleted file mode 100644
--- a/content/html/content/test/imports/file_simple_import.html
+++ /dev/null
@@ -1,4 +0,0 @@
-<!DOCTYPE html>
-<head>
-</head>
-<body>Simple import</body>
\ No newline at end of file
--- a/content/html/content/test/imports/mochitest.ini
+++ b/content/html/content/test/imports/mochitest.ini
@@ -31,22 +31,20 @@ support-files =
   file_cycle_4_C.html
   file_cycle_4_D.html
   file_cycle_4_E.html
   file_cycle_5_A.html
   file_cycle_5_B.html
   file_cycle_5_C.html
   file_cycle_5_D.html
   file_encoding.html
-  file_simple_import.html
 
 [test_cycle_1.html]
 skip-if = toolkit == 'gonk' # nested imports fail on b2g emulator
 [test_cycle_2.html]
 skip-if = toolkit == 'gonk' # nested imports fail on b2g emulator
 [test_cycle_3.html]
 skip-if = toolkit == 'gonk' # nested imports fail on b2g emulator
 [test_cycle_4.html]
 skip-if = toolkit == 'gonk' # nested imports fail on b2g emulator
 [test_cycle_5.html]
 skip-if = toolkit == 'gonk' # nested imports fail on b2g emulator
 [test_encoding.html]
-[test_defaultView.html]
deleted file mode 100644
--- a/content/html/content/test/imports/test_defaultView.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=1061469
--->
-<head>
-  <title>Test for Bug 1061469</title>
-  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-  <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
-</head>
-<body>
-  <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1061469">Mozilla Bug 1061469</a>
-  <script type="text/javascript">
-    SimpleTest.waitForExplicitFinish();
-    var success = false;
-    function loaded() {
-      success = true;
-    }
-    function failed() {
-      ok(false, "Import loading failed");
-    }
-  </script>
-  <link rel="import" href="file_simple_import.html" id="import" onload="loaded()" onerror="failed()"></link>
-  <script type="text/javascript">
-    document.defaultView;
-    is(document.getElementById("import").import.defaultView, null, "defaultView is always null for imports");
-    SimpleTest.finish();
-  </script>
-</body>
-</html>
\ No newline at end of file