Bug 658904 - Remove nsIDOMDocumentStyle; r=roc,jst
authorMs2ger <ms2ger@gmail.com>
Thu, 26 May 2011 10:18:43 +0200
changeset 70197 08d91c51adb5427d7bc1553c506241f8ebbc988f
parent 70196 1eecfca39692272a3dc2ffd76e364691bf6bd0c0
child 70198 32862966ebaf14aa3f13ad25c4dbea19f1f38bd1
push id159
push usereakhgari@mozilla.com
push dateTue, 16 Aug 2011 17:53:11 +0000
treeherdermozilla-esr52@cba007ad1747 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc, jst
bugs658904
milestone7.0a1
Bug 658904 - Remove nsIDOMDocumentStyle; r=roc,jst
content/base/src/nsDocument.cpp
content/base/src/nsDocument.h
dom/base/nsDOMClassInfo.cpp
dom/interfaces/core/nsIDOMDocument.idl
dom/interfaces/core/nsIDOMXMLDocument.idl
dom/interfaces/css/Makefile.in
dom/interfaces/html/nsIDOMHTMLDocument.idl
dom/interfaces/stylesheets/Makefile.in
dom/interfaces/stylesheets/nsIDOMDocumentStyle.idl
dom/interfaces/stylesheets/nsIDOMNSDocumentStyle.idl
dom/interfaces/svg/nsIDOMSVGDocument.idl
layout/inspector/src/inCSSValueSearch.cpp
layout/style/Loader.cpp
--- a/content/base/src/nsDocument.cpp
+++ b/content/base/src/nsDocument.cpp
@@ -1683,18 +1683,16 @@ nsDocument::~nsDocument()
 }
 
 NS_IMPL_CYCLE_COLLECTION_CLASS(nsDocument)
 
 NS_INTERFACE_TABLE_HEAD(nsDocument)
   NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
   NS_DOCUMENT_INTERFACE_TABLE_BEGIN(nsDocument)
     NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIDocument)
-    NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIDOMDocumentStyle)
-    NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIDOMNSDocumentStyle)
     NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIDOMDocumentXBL)
     NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIScriptObjectPrincipal)
     NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIDOM3EventTarget)
     NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIDOMNSEventTarget)
     NS_INTERFACE_TABLE_ENTRY(nsDocument, nsPIDOMEventTarget)
     NS_INTERFACE_TABLE_ENTRY(nsDocument, nsISupportsWeakReference)
     NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIRadioGroupContainer)
     NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIRadioGroupContainer_MOZILLA_2_0_BRANCH)
--- a/content/base/src/nsDocument.h
+++ b/content/base/src/nsDocument.h
@@ -49,17 +49,16 @@
 #include "nsWeakReference.h"
 #include "nsWeakPtr.h"
 #include "nsVoidArray.h"
 #include "nsTArray.h"
 #include "nsHashSets.h"
 #include "nsIDOMXMLDocument.h"
 #include "nsIDOMDocumentXBL.h"
 #include "nsIDOMNSDocument.h"
-#include "nsIDOMNSDocumentStyle.h"
 #include "nsStubDocumentObserver.h"
 #include "nsIDOM3EventTarget.h"
 #include "nsIDOMNSEventTarget.h"
 #include "nsIDOMStyleSheetList.h"
 #include "nsIScriptGlobalObject.h"
 #include "nsIDOMEventTarget.h"
 #include "nsIContent.h"
 #include "nsIEventListenerManager.h"
@@ -486,17 +485,16 @@ protected:
 // nsIDOMXMLDocument on this class is to avoid having to duplicate all
 // its inherited methods on document classes that *are*
 // nsIDOMXMLDocument's. nsDocument's QI should *not* claim to support
 // nsIDOMXMLDocument unless someone writes a real implementation of
 // the interface.
 class nsDocument : public nsIDocument,
                    public nsIDOMXMLDocument, // inherits nsIDOMDocument
                    public nsIDOMNSDocument,
-                   public nsIDOMNSDocumentStyle,
                    public nsIDOMDocumentXBL,
                    public nsSupportsWeakReference,
                    public nsIDOMEventTarget,
                    public nsIDOM3EventTarget,
                    public nsIDOMNSEventTarget,
                    public nsIScriptObjectPrincipal,
                    public nsIRadioGroupContainer_MOZILLA_2_0_BRANCH,
                    public nsIApplicationCacheContainer,
@@ -789,22 +787,16 @@ public:
   NS_DECL_NSIDOMDOCUMENT
 
   // nsIDOMXMLDocument
   NS_DECL_NSIDOMXMLDOCUMENT
 
   // nsIDOMNSDocument
   NS_DECL_NSIDOMNSDOCUMENT
 
-  // nsIDOMDocumentStyle
-  NS_DECL_NSIDOMDOCUMENTSTYLE
-
-  // nsIDOMNSDocumentStyle
-  NS_DECL_NSIDOMNSDOCUMENTSTYLE
-
   // nsIDOMDocumentXBL
   NS_DECL_NSIDOMDOCUMENTXBL
 
   // nsIDOMEventTarget
   NS_DECL_NSIDOMEVENTTARGET
 
   // nsIDOM3EventTarget
   NS_DECL_NSIDOM3EVENTTARGET
--- a/dom/base/nsDOMClassInfo.cpp
+++ b/dom/base/nsDOMClassInfo.cpp
@@ -246,17 +246,16 @@
 #include "nsPaintRequest.h"
 #include "nsIDOMNotifyPaintEvent.h"
 #include "nsIDOMNotifyAudioAvailableEvent.h"
 #include "nsIDOMScrollAreaEvent.h"
 #include "nsIDOMTransitionEvent.h"
 #ifdef MOZ_CSS_ANIMATIONS
 #include "nsIDOMAnimationEvent.h"
 #endif
-#include "nsIDOMNSDocumentStyle.h"
 #include "nsIDOMDocumentXBL.h"
 #include "nsIDOMElementCSSInlineStyle.h"
 #include "nsIDOMLinkStyle.h"
 #include "nsIDOMHTMLDocument.h"
 #include "nsIDOMNSHTMLDocument.h"
 #include "nsIDOMHTMLElement.h"
 #include "nsIDOMNSHTMLElement.h"
 #include "nsIDOMHTMLAnchorElement.h"
@@ -2321,18 +2320,16 @@ nsDOMClassInfo::RegisterExternalClasses(
       nsnull                                                                  \
     };                                                                        \
                                                                               \
     d.mInterfaces = interface_list;                                           \
   }
 
 #define DOM_CLASSINFO_DOCUMENT_MAP_ENTRIES                                    \
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSDocument)                                 \
-    DOM_CLASSINFO_MAP_ENTRY(nsIDOMDocumentStyle)                              \
-    DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSDocumentStyle)                            \
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMDocumentXBL)                                \
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSEventTarget)                              \
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget)                                \
     DOM_CLASSINFO_MAP_ENTRY(nsIDOM3Node)                                      \
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMXPathEvaluator)                             \
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMNodeSelector)
 
 
--- a/dom/interfaces/core/nsIDOMDocument.idl
+++ b/dom/interfaces/core/nsIDOMDocument.idl
@@ -20,16 +20,17 @@
  * the Initial Developer. All Rights Reserved.
  *
  * Contributor(s):
  *   Vidur Apparao <vidur@netscape.com> (original author)
  *   Johnny Stenback <jst@netscape.com>
  *   Jonas Sicking <sicking@bigfoot.com>
  *   Ms2ger <ms2ger@gmail.com>
  *   Tom Pixley <joki@netscape.com>
+ *   Boris Zbarsky <bzbarsky@mit.edu>
  *
  * Alternatively, the contents of this file may be used under the terms of
  * either of the GNU General Public License Version 2 or later (the "GPL"),
  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  * in which case the provisions of the GPL or the LGPL are applicable instead
  * of those above. If you wish to allow use of your version of this file only
  * under the terms of either the GPL or the LGPL, and not to allow others to
  * use your version of this file under the terms of the MPL, indicate your
@@ -54,17 +55,17 @@ interface nsIDOMTreeWalker;
  * cannot exist outside the context of a Document, the nsIDOMDocument 
  * interface also contains the factory methods needed to create these 
  * objects.
  *
  * For more information on this interface please see 
  * http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html
  */
 
-[scriptable, uuid(61b2159c-614e-4aff-a626-f34af9bb1759)]
+[scriptable, uuid(6e229ccc-ee4a-458b-a298-6ce3146f0904)]
 interface nsIDOMDocument : nsIDOMNode
 {
   readonly attribute nsIDOMDocumentType         doctype;
   readonly attribute nsIDOMDOMImplementation    implementation;
   readonly attribute nsIDOMElement              documentElement;
   nsIDOMElement                 createElement(in DOMString tagName)
                                   raises(DOMException);
   nsIDOMDocumentFragment        createDocumentFragment();
@@ -138,9 +139,85 @@ interface nsIDOMDocument : nsIDOMNode
   nsIDOMTreeWalker   createTreeWalker(in nsIDOMNode root,
                                       in unsigned long whatToShow,
                                       in nsIDOMNodeFilter filter,
                                       in boolean entityReferenceExpansion)
                                         raises(DOMException);
 
   nsIDOMEvent               createEvent(in DOMString eventType)
                                                raises(DOMException);
+
+  readonly attribute nsIDOMStyleSheetList   styleSheets;
+
+  /**
+   * This attribute must return the preferred style sheet set as set by the
+   * author. It is determined from the order of style sheet declarations and
+   * the Default-Style HTTP headers, as eventually defined elsewhere in the Web
+   * Apps 1.0 specification. If there is no preferred style sheet set, this
+   * attribute must return the empty string. The case of this attribute must
+   * exactly match the case given by the author where the preferred style sheet
+   * is specified or implied. This attribute must never return null.
+   */
+  readonly attribute DOMString preferredStyleSheetSet;
+
+  /**
+   * This attribute indicates which style sheet set is in use. This attribute
+   * is live; changing the disabled attribute on style sheets directly will
+   * change the value of this attribute.
+   *
+   * If all the sheets that are enabled and have a title have the same title
+   * (by case-sensitive comparisons) then the value of this attribute must be
+   * exactly equal to the title of the first enabled style sheet with a title
+   * in the styleSheets list. Otherwise, if style sheets from different sets
+   * are enabled, then the return value must be null (there is no way to
+   * determine what the currently selected style sheet set is in those
+   * conditions). Otherwise, either all style sheets that have a title are
+   * disabled, or there are no alternate style sheets, and
+   * selectedStyleSheetSet must return the empty string.
+   *
+   * Setting this attribute to the null value must have no effect.
+   *
+   * Setting this attribute to a non-null value must call
+   * enableStyleSheetsForSet() with that value as the function's argument, and
+   * set lastStyleSheetSet to that value.
+   *
+   * From the DOM's perspective, all views have the same
+   * selectedStyleSheetSet. If a UA supports multiple views with different
+   * selected alternate style sheets, then this attribute (and the StyleSheet
+   * interface's disabled attribute) must return and set the value for the
+   * default view.
+   */
+  attribute DOMString selectedStyleSheetSet;
+
+  /*
+   * This property must initially have the value null. Its value changes when
+   * the selectedStyleSheetSet attribute is set.
+   */
+  readonly attribute DOMString lastStyleSheetSet;
+  
+  /**
+   * This must return the live list of the currently available style sheet
+   * sets. This list is constructed by enumerating all the style sheets for
+   * this document available to the implementation, in the order they are
+   * listed in the styleSheets attribute, adding the title of each style sheet
+   * with a title to the list, avoiding duplicates by dropping titles that
+   * match (case-sensitively) titles that have already been added to the
+   * list.
+   */
+  readonly attribute nsIDOMDOMStringList styleSheetSets;
+
+  /**
+   * Calling this method must change the disabled attribute on each StyleSheet
+   * object with a title attribute with a length greater than 0 in the
+   * styleSheets attribute, so that all those whose title matches the name
+   * argument are enabled, and all others are disabled. Title matches must be
+   * case-sensitive. Calling this method with the empty string disables all
+   * alternate and preferred style sheets (but does not change the state of
+   * persistent style sheets, that is those with no title attribute).
+   *
+   * Calling this method with a null value must have no effect.
+   *
+   * Style sheets that do not have a title are never affected by this
+   * method. This method does not change the values of the lastStyleSheetSet or
+   * preferredStyleSheetSet attributes.
+   */
+  void enableStyleSheetsForSet(in DOMString name);
 };
--- a/dom/interfaces/core/nsIDOMXMLDocument.idl
+++ b/dom/interfaces/core/nsIDOMXMLDocument.idl
@@ -33,17 +33,17 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsIDOMDocument.idl"
 
-[scriptable, uuid(75f617b4-1c61-4122-9fd7-f4243672848b)]
+[scriptable, uuid(8f688a87-637d-40f0-95f9-913de35ac6d7)]
 interface nsIDOMXMLDocument : nsIDOMDocument
 {
   // DOM Level 3 Load & Save, DocumentLS
   // http://www.w3.org/TR/DOM-Level-3-LS/load-save.html#LS-DocumentLS
   /**
    * Whether to load synchronously or asynchronously.
    * The default is async==true.
    */
--- a/dom/interfaces/css/Makefile.in
+++ b/dom/interfaces/css/Makefile.in
@@ -63,17 +63,16 @@ XPIDLSRCS =					\
 	nsIDOMCSSFontFaceRule.idl		\
 	nsIDOMCSSImportRule.idl			\
 	nsIDOMCSSMediaRule.idl			\
 	nsIDOMCSSMozDocumentRule.idl		\
 	nsIDOMCSSPageRule.idl			\
 	nsIDOMCSSStyleRule.idl			\
 	nsIDOMCSSUnknownRule.idl		\
 	nsIDOMCounter.idl			\
-	nsIDOMDocumentCSS.idl			\
 	nsIDOMRGBColor.idl			\
 	nsIDOMRect.idl				\
 	nsIDOMNSRGBAColor.idl			\
 	$(NULL)
 
 ifdef MOZ_CSS_ANIMATIONS
 XPIDLSRCS +=					\
 	nsIDOMMozCSSKeyframeRule.idl		\
--- a/dom/interfaces/html/nsIDOMHTMLDocument.idl
+++ b/dom/interfaces/html/nsIDOMHTMLDocument.idl
@@ -45,17 +45,17 @@
  *
  * This interface is trying to follow the DOM Level 2 HTML specification:
  * http://www.w3.org/TR/DOM-Level-2-HTML/
  *
  * with changes from the work-in-progress WHATWG HTML specification:
  * http://www.whatwg.org/specs/web-apps/current-work/
  */
 
-[scriptable, uuid(eb3750ae-d156-4b97-b200-f35276c6510f)]
+[scriptable, uuid(a48d2e22-e0e7-49eb-bfd2-71386595cd9a)]
 interface nsIDOMHTMLDocument : nsIDOMDocument
 {
            attribute DOMString            title;
   readonly attribute DOMString            referrer;
   // domain is readonly per spec, but it's settable in
   // nsIDOMNSHTMLDocument
   [noscript] readonly attribute DOMString domain;
   readonly attribute DOMString            URL;
--- a/dom/interfaces/stylesheets/Makefile.in
+++ b/dom/interfaces/stylesheets/Makefile.in
@@ -42,20 +42,18 @@ VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 MODULE		= dom
 XPIDL_MODULE	= dom_stylesheets
 GRE_MODULE	= 1
 
 SDK_XPIDLSRCS =                                 \
-	nsIDOMDocumentStyle.idl			\
 	nsIDOMMediaList.idl			\
 	nsIDOMStyleSheet.idl			\
 	nsIDOMStyleSheetList.idl		\
 	$(NULL)
 
 XPIDLSRCS = 					\
 	nsIDOMLinkStyle.idl			\
-	nsIDOMNSDocumentStyle.idl		\
 	$(NULL)
 
 include $(topsrcdir)/config/rules.mk
deleted file mode 100644
--- a/dom/interfaces/stylesheets/nsIDOMDocumentStyle.idl
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 2000
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Vidur Apparao <vidur@netscape.com> (original author)
- *   Johnny Stenback <jst@netscape.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "domstubs.idl"
-
-/**
- * The nsIDOMDocumentStyle interface is an interface to a document
- * object that supports style sheets in the Document Object Model.
- *
- * For more information on this interface please see
- * http://www.w3.org/TR/DOM-Level-2-Style
- */
-
-[scriptable, uuid(3d9f4973-dd2e-48f5-b5f7-2634e09eadd9)]
-interface nsIDOMDocumentStyle : nsISupports
-{
-  readonly attribute nsIDOMStyleSheetList   styleSheets;
-};
deleted file mode 100644
--- a/dom/interfaces/stylesheets/nsIDOMNSDocumentStyle.idl
+++ /dev/null
@@ -1,129 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is nsIDOMNSDocumentStyle interface definition.
- *
- * The Initial Developer of the Original Code is 
- * Boris Zbarsky <bzbarsky@mit.edu>
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "domstubs.idl"
-#include "nsIDOMDocumentStyle.idl"
-
-/**
- * The nsIDOMNSDocumentStyle interface is an extension to the
- * nsIDOMDocumentStyle interface.  This interface exposes more ways to interact
- * with style sheets in the Document Object Model.  This interface is currently
- * very much experimental.
- *
- * NOTE: This interface represents the additions to nsIDOMDocumentStyle defined
- * by <http://whatwg.org/specs/web-apps/current-work/#alternate-style-sheets>.
- * The comments here describe our implementation; if those comments don't match
- * that spec, file bugs.
- */
-
-[scriptable, uuid(26311d10-7e24-4c7b-bb3d-17aad86f4d88)]
-interface nsIDOMNSDocumentStyle : nsIDOMDocumentStyle
-{
-  /**
-   * This attribute must return the preferred style sheet set as set by the
-   * author. It is determined from the order of style sheet declarations and
-   * the Default-Style HTTP headers, as eventually defined elsewhere in the Web
-   * Apps 1.0 specification. If there is no preferred style sheet set, this
-   * attribute must return the empty string. The case of this attribute must
-   * exactly match the case given by the author where the preferred style sheet
-   * is specified or implied. This attribute must never return null.
-   */
-  readonly attribute DOMString preferredStyleSheetSet;
-
-  /**
-   * This attribute indicates which style sheet set is in use. This attribute
-   * is live; changing the disabled attribute on style sheets directly will
-   * change the value of this attribute.
-   *
-   * If all the sheets that are enabled and have a title have the same title
-   * (by case-sensitive comparisons) then the value of this attribute must be
-   * exactly equal to the title of the first enabled style sheet with a title
-   * in the styleSheets list. Otherwise, if style sheets from different sets
-   * are enabled, then the return value must be null (there is no way to
-   * determine what the currently selected style sheet set is in those
-   * conditions). Otherwise, either all style sheets that have a title are
-   * disabled, or there are no alternate style sheets, and
-   * selectedStyleSheetSet must return the empty string.
-   *
-   * Setting this attribute to the null value must have no effect.
-   *
-   * Setting this attribute to a non-null value must call
-   * enableStyleSheetsForSet() with that value as the function's argument, and
-   * set lastStyleSheetSet to that value.
-   *
-   * From the DOM's perspective, all views have the same
-   * selectedStyleSheetSet. If a UA supports multiple views with different
-   * selected alternate style sheets, then this attribute (and the StyleSheet
-   * interface's disabled attribute) must return and set the value for the
-   * default view.
-   */
-  attribute DOMString selectedStyleSheetSet;
-
-  /*
-   * This property must initially have the value null. Its value changes when
-   * the selectedStyleSheetSet attribute is set.
-   */
-  readonly attribute DOMString lastStyleSheetSet;
-  
-  /**
-   * This must return the live list of the currently available style sheet
-   * sets. This list is constructed by enumerating all the style sheets for
-   * this document available to the implementation, in the order they are
-   * listed in the styleSheets attribute, adding the title of each style sheet
-   * with a title to the list, avoiding duplicates by dropping titles that
-   * match (case-sensitively) titles that have already been added to the
-   * list.
-   */
-  readonly attribute nsIDOMDOMStringList styleSheetSets;
-
-  /**
-   * Calling this method must change the disabled attribute on each StyleSheet
-   * object with a title attribute with a length greater than 0 in the
-   * styleSheets attribute, so that all those whose title matches the name
-   * argument are enabled, and all others are disabled. Title matches must be
-   * case-sensitive. Calling this method with the empty string disables all
-   * alternate and preferred style sheets (but does not change the state of
-   * persistent style sheets, that is those with no title attribute).
-   *
-   * Calling this method with a null value must have no effect.
-   *
-   * Style sheets that do not have a title are never affected by this
-   * method. This method does not change the values of the lastStyleSheetSet or
-   * preferredStyleSheetSet attributes.
-   */
-  void enableStyleSheetsForSet(in DOMString name);
-};
--- a/dom/interfaces/svg/nsIDOMSVGDocument.idl
+++ b/dom/interfaces/svg/nsIDOMSVGDocument.idl
@@ -34,17 +34,17 @@
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsIDOMDocument.idl"
 
 interface nsIDOMSVGSVGElement;
 
-[scriptable, uuid(2de25143-3fcb-4afc-8900-2c046fb6dc94)]
+[scriptable, uuid(27c3e91d-d17d-40bd-ac56-e6b8096a955e)]
 interface nsIDOMSVGDocument : nsIDOMDocument
 {
   readonly attribute DOMString title;
   readonly attribute DOMString referrer;
   readonly attribute DOMString domain;
   readonly attribute DOMString URL;
   readonly attribute nsIDOMSVGSVGElement rootElement;
 };
--- a/layout/inspector/src/inCSSValueSearch.cpp
+++ b/layout/inspector/src/inCSSValueSearch.cpp
@@ -36,17 +36,17 @@
  * ***** END LICENSE BLOCK ***** */
 
 #include "inCSSValueSearch.h"
 
 #include "nsIComponentManager.h"
 #include "nsIServiceManager.h"
 #include "nsVoidArray.h"
 #include "nsReadableUtils.h"
-#include "nsIDOMDocumentStyle.h"
+#include "nsIDOMDocument.h"
 #include "nsIDOM3Node.h"
 #include "nsIDOMStyleSheetList.h"
 #include "nsIDOMCSSStyleSheet.h"
 #include "nsIDOMCSSRuleList.h"
 #include "nsIDOMCSSStyleRule.h"
 #include "nsIDOMCSSStyleDeclaration.h"
 #include "nsIDOMCSSImportRule.h"
 #include "nsIDOMCSSMediaRule.h"
@@ -115,32 +115,33 @@ inCSSValueSearch::SearchSync()
 
   nsCOMPtr<nsIURI> baseURL;
   nsCOMPtr<nsIDOM3Node> dom3Node = do_QueryInterface(mDocument);
   if (dom3Node) {
     nsAutoString uri;
     dom3Node->GetBaseURI(uri);
     NS_NewURI(getter_AddRefs(baseURL), uri);
   }
-  
-  nsCOMPtr<nsIDOMDocumentStyle> doc = do_QueryInterface(mDocument);
-  if (doc) {
-    nsCOMPtr<nsIDOMStyleSheetList> sheets;
-    nsresult rv = doc->GetStyleSheets(getter_AddRefs(sheets));
-    NS_ENSURE_SUCCESS(rv, NS_OK);
+
+  if (!mDocument) {
+    return NS_OK;
+  }
+
+  nsCOMPtr<nsIDOMStyleSheetList> sheets;
+  nsresult rv = mDocument->GetStyleSheets(getter_AddRefs(sheets));
+  NS_ENSURE_SUCCESS(rv, NS_OK);
 
-    PRUint32 length;
-    sheets->GetLength(&length);
-    for (PRUint32 i = 0; i < length; ++i) {
-      nsCOMPtr<nsIDOMStyleSheet> sheet;
-      sheets->Item(i, getter_AddRefs(sheet));
-      nsCOMPtr<nsIDOMCSSStyleSheet> cssSheet = do_QueryInterface(sheet);
-      if (cssSheet)
-        SearchStyleSheet(cssSheet, baseURL);
-    }
+  PRUint32 length;
+  sheets->GetLength(&length);
+  for (PRUint32 i = 0; i < length; ++i) {
+    nsCOMPtr<nsIDOMStyleSheet> sheet;
+    sheets->Item(i, getter_AddRefs(sheet));
+    nsCOMPtr<nsIDOMCSSStyleSheet> cssSheet = do_QueryInterface(sheet);
+    if (cssSheet)
+      SearchStyleSheet(cssSheet, baseURL);
   }
 
   // XXX would be nice to search inline style as well.
 
   return NS_OK;
 }
 
 NS_IMETHODIMP 
--- a/layout/style/Loader.cpp
+++ b/layout/style/Loader.cpp
@@ -51,20 +51,20 @@
 #include "mozilla/css/Loader.h"
 #include "nsIRunnable.h"
 #include "nsIUnicharStreamLoader.h"
 #include "nsSyncLoadService.h"
 #include "nsCOMPtr.h"
 #include "nsCOMArray.h"
 #include "nsString.h"
 #include "nsIContent.h"
+#include "nsIDocument.h"
 #include "nsIDOMNode.h"
+#include "nsIDOMDocument.h"
 #include "nsIDOMWindow.h"
-#include "nsIDocument.h"
-#include "nsIDOMNSDocumentStyle.h"
 #include "nsICharsetAlias.h"
 #include "nsHashtable.h"
 #include "nsIURI.h"
 #include "nsIServiceManager.h"
 #include "nsNetUtil.h"
 #include "nsContentUtils.h"
 #include "nsCRT.h"
 #include "nsIScriptSecurityManager.h"
@@ -452,17 +452,17 @@ Loader::Loader(nsIDocument* aDocument)
   , mEnabled(PR_TRUE)
 #ifdef DEBUG
   , mSyncCallback(PR_FALSE)
 #endif
 {
   // We can just use the preferred set, since there are no sheets in the
   // document yet (if there are, how did they get there? _we_ load the sheets!)
   // and hence the selected set makes no sense at this time.
-  nsCOMPtr<nsIDOMNSDocumentStyle> domDoc(do_QueryInterface(mDocument));
+  nsCOMPtr<nsIDOMDocument> domDoc = do_QueryInterface(mDocument);
   if (domDoc) {
     domDoc->GetPreferredStyleSheetSet(mPreferredSheet);
   }
 }
 
 Loader::~Loader()
 {
   NS_ASSERTION((!mLoadingDatas.IsInitialized()) || mLoadingDatas.Count() == 0,
@@ -506,17 +506,17 @@ CollectNonAlternates(URIAndPrincipalHash
   static_cast<Loader::LoadDataArray*>(aClosure)->AppendElement(aData);
   return PL_DHASH_REMOVE;
 }
 
 nsresult
 Loader::SetPreferredSheet(const nsAString& aTitle)
 {
 #ifdef DEBUG
-  nsCOMPtr<nsIDOMNSDocumentStyle> doc(do_QueryInterface(mDocument));
+  nsCOMPtr<nsIDOMDocument> doc = do_QueryInterface(mDocument);
   if (doc) {
     nsAutoString currentPreferred;
     doc->GetLastStyleSheetSet(currentPreferred);
     if (DOMStringIsNull(currentPreferred)) {
       doc->GetPreferredStyleSheetSet(currentPreferred);
     }
     NS_ASSERTION(currentPreferred.Equals(aTitle),
                  "Unexpected argument to SetPreferredSheet");