Backed out changeset 83f4f6f435cf (bug 734861) for mochitest-5 timeouts.
authorRyan VanderMeulen <ryanvm@gmail.com>
Tue, 23 Jul 2013 11:13:50 -0400
changeset 151919 c8950b75893e64acf29cbf2a2ef8bd24d8f2acd5
parent 151918 b9ee08d135dd3bb28b3070a837968453d54a1cec
child 151920 64462ec4cef3e672d0b350d539a93176a0a54ed1
push id2859
push userakeybl@mozilla.com
push dateMon, 16 Sep 2013 19:14:59 +0000
treeherdermozilla-beta@87d3c51cd2bf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs734861
milestone25.0a1
backs out83f4f6f435cf4f9da07e0f2fe3cf285ed78bf9bb
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 83f4f6f435cf (bug 734861) for mochitest-5 timeouts.
layout/inspector/public/inIDOMUtils.idl
layout/inspector/src/inDOMUtils.cpp
layout/inspector/tests/Makefile.in
layout/inspector/tests/test_get_all_style_sheets.html
--- a/layout/inspector/public/inIDOMUtils.idl
+++ b/layout/inspector/public/inIDOMUtils.idl
@@ -15,19 +15,16 @@ interface nsIDOMNodeList;
 interface nsIDOMFontFaceList;
 interface nsIDOMRange;
 interface nsIDOMCSSStyleSheet;
 
 [scriptable, uuid(8705a686-d081-476c-89fa-cb6b70e9bb2e)]
 interface inIDOMUtils : nsISupports
 {
   // CSS utilities
-  void getAllStyleSheets (in nsIDOMDocument aDoc,
-                          [optional] out unsigned long aLength,
-                          [array, size_is (aLength), retval] out nsISupports aSheets);
   nsISupportsArray getCSSStyleRules(in nsIDOMElement aElement, [optional] in DOMString aPseudo);
   unsigned long getRuleLine(in nsIDOMCSSStyleRule aRule);
   unsigned long getRuleColumn(in nsIDOMCSSStyleRule aRule);
 
   // Utilities for working with selectors.  We don't have a JS OM representation
   // of a single selector or a selector list yet, but given a rule we can index
   // into the selector list.
   //
--- a/layout/inspector/src/inDOMUtils.cpp
+++ b/layout/inspector/src/inDOMUtils.cpp
@@ -31,17 +31,16 @@
 #include "mozilla/dom/Element.h"
 #include "nsCSSStyleSheet.h"
 #include "nsRuleWalker.h"
 #include "nsRuleProcessorData.h"
 #include "nsCSSRuleProcessor.h"
 #include "mozilla/dom/InspectorUtilsBinding.h"
 #include "nsCSSProps.h"
 #include "nsColor.h"
-#include "nsStyleSet.h"
 
 using namespace mozilla;
 using namespace mozilla::css;
 using namespace mozilla::dom;
 
 ///////////////////////////////////////////////////////////////////////////////
 
 inDOMUtils::inDOMUtils()
@@ -53,59 +52,16 @@ inDOMUtils::~inDOMUtils()
 }
 
 NS_IMPL_ISUPPORTS1(inDOMUtils, inIDOMUtils)
 
 ///////////////////////////////////////////////////////////////////////////////
 // inIDOMUtils
 
 NS_IMETHODIMP
-inDOMUtils::GetAllStyleSheets(nsIDOMDocument *aDocument, uint32_t *aLength,
-                              nsISupports ***aSheets)
-{
-  NS_ENSURE_ARG_POINTER(aDocument);
-
-  nsCOMArray<nsISupports> sheets;
-
-  nsCOMPtr<nsIDocument> document = do_QueryInterface(aDocument);
-  MOZ_ASSERT(document);
-
-  // Get the agent, then user sheets in the style set.
-  nsIPresShell* presShell = document->GetShell();
-  if (presShell) {
-    nsStyleSet* styleSet = presShell->StyleSet();
-    nsStyleSet::sheetType sheetType = nsStyleSet::eAgentSheet;
-    for (int32_t i = 0; i < styleSet->SheetCount(sheetType); i++) {
-      sheets.AppendElement(styleSet->StyleSheetAt(sheetType, i));
-    }
-    sheetType = nsStyleSet::eUserSheet;
-    for (int32_t i = 0; i < styleSet->SheetCount(sheetType); i++) {
-      sheets.AppendElement(styleSet->StyleSheetAt(sheetType, i));
-    }
-  }
-
-  // Get the document sheets.
-  for (int32_t i = 0; i < document->GetNumberOfStyleSheets(); i++) {
-    sheets.AppendElement(document->GetStyleSheetAt(i));
-  }
-
-  nsISupports** ret = static_cast<nsISupports**>(NS_Alloc(sheets.Count() *
-                                                 sizeof(nsISupports*)));
-
-  for (int32_t i = 0; i < sheets.Count(); i++) {
-    NS_ADDREF(ret[i] = sheets[i]);
-  }
-
-  *aLength = sheets.Count();
-  *aSheets = ret;
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP
 inDOMUtils::IsIgnorableWhitespace(nsIDOMCharacterData *aDataNode,
                                   bool *aReturn)
 {
   NS_PRECONDITION(aReturn, "Must have an out parameter");
 
   NS_ENSURE_ARG_POINTER(aDataNode);
 
   *aReturn = false;
--- a/layout/inspector/tests/Makefile.in
+++ b/layout/inspector/tests/Makefile.in
@@ -19,12 +19,11 @@ MOCHITEST_FILES =\
 		test_bug536379-2.html \
 		test_bug557726.html \
 		test_bug609549.xhtml \
 		test_bug806192.html \
 		test_bug856317.html \
 		bug856317.css \
 		test_isinheritableproperty.html \
 		test_bug877690.html \
-		test_get_all_style_sheets.html \
 		$(NULL)
 
 include $(topsrcdir)/config/rules.mk
deleted file mode 100644
--- a/layout/inspector/tests/test_get_all_style_sheets.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=734861
--->
-<head>
-  <meta charset="utf-8">
-  <title>Test for Bug 734861</title>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-  <script type="application/javascript">
-
-  /** Test for Bug 734861 **/
-
-  function runTest() {
-    var utils = SpecialPowers.Cc["@mozilla.org/inspector/dom-utils;1"]
-                             .getService(SpecialPowers.Ci.inIDOMUtils);
-    var res = utils.getAllStyleSheets(document);
-    var foundUA = false;
-    for (var i = 0; i < res.length; i++) {
-      if (res[i].href == "resource://gre-resources/ua.css") {
-        foundUA = true;
-        break;
-      }
-    }
-    ok(foundUA, "UA sheet is returned with all the other sheets.");
-  }
-
-  </script>
-</head>
-<body onload="runTest();">
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=734861">Mozilla Bug 734861</a>
-<p id="display"></p>
-<div id="content" style="display: none">
-
-</div>
-<pre id="test">
-</pre>
-</body>
-</html>