Rename HTMLCSSStyleSheetImpl to nsHTMLCSSStyleSheet. (Bug 239008) r=bzbarsky
authorL. David Baron <dbaron@dbaron.org>
Thu, 31 Dec 2009 10:56:32 -0500
changeset 36780 37c441117f709de6b8b1d8f6f41868b8cf4b47a2
parent 36779 03d6ae8962ce0cb51018011e49bbb6c77903ef5b
child 36781 133cc168d23df2d4203aab0d87174c7ad1dfd1b5
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbzbarsky
bugs239008
milestone1.9.3a1pre
Rename HTMLCSSStyleSheetImpl to nsHTMLCSSStyleSheet. (Bug 239008) r=bzbarsky
layout/style/nsHTMLCSSStyleSheet.cpp
--- a/layout/style/nsHTMLCSSStyleSheet.cpp
+++ b/layout/style/nsHTMLCSSStyleSheet.cpp
@@ -53,20 +53,20 @@
 #include "nsIDocument.h"
 #include "nsCOMPtr.h"
 #include "nsRuleWalker.h"
 #include "nsRuleData.h"
 #include "nsRuleProcessorData.h"
 
 // -----------------------------------------------------------
 
-class HTMLCSSStyleSheetImpl : public nsIHTMLCSSStyleSheet,
-                              public nsIStyleRuleProcessor {
+class nsHTMLCSSStyleSheet : public nsIHTMLCSSStyleSheet,
+                            public nsIStyleRuleProcessor {
 public:
-  HTMLCSSStyleSheetImpl();
+  nsHTMLCSSStyleSheet();
 
   NS_DECL_ISUPPORTS
 
   // basic style sheet data
   NS_IMETHOD Init(nsIURI* aURL, nsIDocument* aDocument);
   NS_IMETHOD Reset(nsIURI* aURL);
   NS_IMETHOD GetSheetURI(nsIURI** aSheetURL) const;
   NS_IMETHOD GetBaseURI(nsIURI** aBaseURL) const;
@@ -105,48 +105,48 @@ public:
                                   PRBool* aResult);
 
 #ifdef DEBUG
   virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
 #endif
 
 private: 
   // These are not supported and are not implemented! 
-  HTMLCSSStyleSheetImpl(const HTMLCSSStyleSheetImpl& aCopy); 
-  HTMLCSSStyleSheetImpl& operator=(const HTMLCSSStyleSheetImpl& aCopy); 
+  nsHTMLCSSStyleSheet(const nsHTMLCSSStyleSheet& aCopy); 
+  nsHTMLCSSStyleSheet& operator=(const nsHTMLCSSStyleSheet& aCopy); 
 
 protected:
-  virtual ~HTMLCSSStyleSheetImpl();
+  virtual ~nsHTMLCSSStyleSheet();
 
 protected:
   nsIURI*         mURL;
   nsIDocument*    mDocument;
 };
 
 
-HTMLCSSStyleSheetImpl::HTMLCSSStyleSheetImpl()
+nsHTMLCSSStyleSheet::nsHTMLCSSStyleSheet()
   : nsIHTMLCSSStyleSheet(),
     mRefCnt(0),
     mURL(nsnull),
     mDocument(nsnull)
 {
 }
 
-HTMLCSSStyleSheetImpl::~HTMLCSSStyleSheetImpl()
+nsHTMLCSSStyleSheet::~nsHTMLCSSStyleSheet()
 {
   NS_RELEASE(mURL);
 }
 
-NS_IMPL_ISUPPORTS3(HTMLCSSStyleSheetImpl,
+NS_IMPL_ISUPPORTS3(nsHTMLCSSStyleSheet,
                    nsIHTMLCSSStyleSheet,
                    nsIStyleSheet,
                    nsIStyleRuleProcessor)
 
 NS_IMETHODIMP
-HTMLCSSStyleSheetImpl::RulesMatching(ElementRuleProcessorData* aData)
+nsHTMLCSSStyleSheet::RulesMatching(ElementRuleProcessorData* aData)
 {
   nsIContent* content = aData->mContent;
 
   // just get the one and only style rule from the content's STYLE attribute
   nsICSSStyleRule* rule = content->GetInlineStyleRule();
   if (rule) {
     rule->RuleMatched();
     aData->mRuleWalker->Forward(rule);
@@ -159,172 +159,172 @@ HTMLCSSStyleSheetImpl::RulesMatching(Ele
     aData->mRuleWalker->Forward(rule);
   }
 #endif // MOZ_SMIL
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
-HTMLCSSStyleSheetImpl::RulesMatching(PseudoElementRuleProcessorData* aData)
+nsHTMLCSSStyleSheet::RulesMatching(PseudoElementRuleProcessorData* aData)
 {
   return NS_OK;
 }
 
 NS_IMETHODIMP
-HTMLCSSStyleSheetImpl::RulesMatching(AnonBoxRuleProcessorData* aData)
+nsHTMLCSSStyleSheet::RulesMatching(AnonBoxRuleProcessorData* aData)
 {
   return NS_OK;
 }
 
 #ifdef MOZ_XUL
 NS_IMETHODIMP
-HTMLCSSStyleSheetImpl::RulesMatching(XULTreeRuleProcessorData* aData)
+nsHTMLCSSStyleSheet::RulesMatching(XULTreeRuleProcessorData* aData)
 {
   return NS_OK;
 }
 #endif
 
 NS_IMETHODIMP
-HTMLCSSStyleSheetImpl::Init(nsIURI* aURL, nsIDocument* aDocument)
+nsHTMLCSSStyleSheet::Init(nsIURI* aURL, nsIDocument* aDocument)
 {
   NS_PRECONDITION(aURL && aDocument, "null ptr");
   if (! aURL || ! aDocument)
     return NS_ERROR_NULL_POINTER;
 
   if (mURL || mDocument)
     return NS_ERROR_ALREADY_INITIALIZED;
 
   mDocument = aDocument; // not refcounted!
   mURL = aURL;
   NS_ADDREF(mURL);
   return NS_OK;
 }
 
 // Test if style is dependent on content state
 nsReStyleHint
-HTMLCSSStyleSheetImpl::HasStateDependentStyle(StateRuleProcessorData* aData)
+nsHTMLCSSStyleSheet::HasStateDependentStyle(StateRuleProcessorData* aData)
 {
   return nsReStyleHint(0);
 }
 
 // Test if style is dependent on attribute
 nsReStyleHint
-HTMLCSSStyleSheetImpl::HasAttributeDependentStyle(AttributeRuleProcessorData* aData)
+nsHTMLCSSStyleSheet::HasAttributeDependentStyle(AttributeRuleProcessorData* aData)
 {
   return nsReStyleHint(0);
 }
 
 NS_IMETHODIMP
-HTMLCSSStyleSheetImpl::MediumFeaturesChanged(nsPresContext* aPresContext,
-                                             PRBool* aRulesChanged)
+nsHTMLCSSStyleSheet::MediumFeaturesChanged(nsPresContext* aPresContext,
+                                           PRBool* aRulesChanged)
 {
   *aRulesChanged = PR_FALSE;
   return NS_OK;
 }
 
 
 NS_IMETHODIMP 
-HTMLCSSStyleSheetImpl::Reset(nsIURI* aURL)
+nsHTMLCSSStyleSheet::Reset(nsIURI* aURL)
 {
   NS_IF_RELEASE(mURL);
   mURL = aURL;
   NS_ADDREF(mURL);
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
-HTMLCSSStyleSheetImpl::GetSheetURI(nsIURI** aSheetURL) const
+nsHTMLCSSStyleSheet::GetSheetURI(nsIURI** aSheetURL) const
 {
   NS_IF_ADDREF(mURL);
   *aSheetURL = mURL;
   return NS_OK;
 }
 
 NS_IMETHODIMP
-HTMLCSSStyleSheetImpl::GetBaseURI(nsIURI** aBaseURL) const
+nsHTMLCSSStyleSheet::GetBaseURI(nsIURI** aBaseURL) const
 {
   NS_IF_ADDREF(mURL);
   *aBaseURL = mURL;
   return NS_OK;
 }
 
 NS_IMETHODIMP
-HTMLCSSStyleSheetImpl::GetTitle(nsString& aTitle) const
+nsHTMLCSSStyleSheet::GetTitle(nsString& aTitle) const
 {
   aTitle.AssignLiteral("Internal HTML/CSS Style Sheet");
   return NS_OK;
 }
 
 NS_IMETHODIMP
-HTMLCSSStyleSheetImpl::GetType(nsString& aType) const
+nsHTMLCSSStyleSheet::GetType(nsString& aType) const
 {
   aType.AssignLiteral("text/html");
   return NS_OK;
 }
 
 NS_IMETHODIMP_(PRBool)
-HTMLCSSStyleSheetImpl::HasRules() const
+nsHTMLCSSStyleSheet::HasRules() const
 {
   // Say we always have rules, since we don't know.
   return PR_TRUE;
 }
 
 NS_IMETHODIMP
-HTMLCSSStyleSheetImpl::GetApplicable(PRBool& aApplicable) const
+nsHTMLCSSStyleSheet::GetApplicable(PRBool& aApplicable) const
 {
   aApplicable = PR_TRUE;
   return NS_OK;
 }
 
 NS_IMETHODIMP
-HTMLCSSStyleSheetImpl::SetEnabled(PRBool aEnabled)
+nsHTMLCSSStyleSheet::SetEnabled(PRBool aEnabled)
 { // these can't be disabled
   return NS_OK;
 }
 
 NS_IMETHODIMP
-HTMLCSSStyleSheetImpl::GetComplete(PRBool& aComplete) const
+nsHTMLCSSStyleSheet::GetComplete(PRBool& aComplete) const
 {
   aComplete = PR_TRUE;
   return NS_OK;
 }
 
 NS_IMETHODIMP
-HTMLCSSStyleSheetImpl::SetComplete()
+nsHTMLCSSStyleSheet::SetComplete()
 {
   return NS_OK;
 }
 
 // style sheet owner info
 NS_IMETHODIMP
-HTMLCSSStyleSheetImpl::GetParentSheet(nsIStyleSheet*& aParent) const
+nsHTMLCSSStyleSheet::GetParentSheet(nsIStyleSheet*& aParent) const
 {
   aParent = nsnull;
   return NS_OK;
 }
 
 NS_IMETHODIMP
-HTMLCSSStyleSheetImpl::GetOwningDocument(nsIDocument*& aDocument) const
+nsHTMLCSSStyleSheet::GetOwningDocument(nsIDocument*& aDocument) const
 {
   NS_IF_ADDREF(mDocument);
   aDocument = mDocument;
   return NS_OK;
 }
 
 NS_IMETHODIMP
-HTMLCSSStyleSheetImpl::SetOwningDocument(nsIDocument* aDocument)
+nsHTMLCSSStyleSheet::SetOwningDocument(nsIDocument* aDocument)
 {
   mDocument = aDocument;
   return NS_OK;
 }
 
 #ifdef DEBUG
-void HTMLCSSStyleSheetImpl::List(FILE* out, PRInt32 aIndent) const
+void nsHTMLCSSStyleSheet::List(FILE* out, PRInt32 aIndent) const
 {
   // Indent
   for (PRInt32 index = aIndent; --index >= 0; ) fputs("  ", out);
 
   fputs("HTML CSS Style Sheet: ", out);
   nsCAutoString urlSpec;
   mURL->GetSpec(urlSpec);
   if (!urlSpec.IsEmpty()) {
@@ -355,17 +355,17 @@ NS_NewHTMLCSSStyleSheet(nsIHTMLCSSStyleS
 
 nsresult
 NS_NewHTMLCSSStyleSheet(nsIHTMLCSSStyleSheet** aInstancePtrResult)
 {
   if (aInstancePtrResult == nsnull) {
     return NS_ERROR_NULL_POINTER;
   }
 
-  HTMLCSSStyleSheetImpl*  it = new HTMLCSSStyleSheetImpl();
+  nsHTMLCSSStyleSheet*  it = new nsHTMLCSSStyleSheet();
 
   if (nsnull == it) {
     return NS_ERROR_OUT_OF_MEMORY;
   }
 
   NS_ADDREF(it);
   *aInstancePtrResult = it;
   return NS_OK;