Fix warnings about CascadeSheetRulesInto being declared but not defined. (Bug 458813) r+sr=bzbarsky
authorL. David Baron <dbaron@dbaron.org>
Tue, 07 Oct 2008 15:10:19 -0700
changeset 20113 d0764a4f34fbdd77b4a8f45d285b3c3854e3018a
parent 20112 a9f44a03b7d00f08fa693179eca4f3244ee8f6ec
child 20114 f9fbbdddbc3e47bd95a01935703f2794137e9e6b
push idunknown
push userunknown
push dateunknown
bugs458813
milestone1.9.1b2pre
Fix warnings about CascadeSheetRulesInto being declared but not defined. (Bug 458813) r+sr=bzbarsky
layout/style/nsCSSRuleProcessor.cpp
layout/style/nsCSSRuleProcessor.h
layout/style/nsCSSStyleSheet.h
--- a/layout/style/nsCSSRuleProcessor.cpp
+++ b/layout/style/nsCSSRuleProcessor.cpp
@@ -2469,18 +2469,18 @@ InsertRuleByWeight(nsICSSRule* aRule, vo
     }
     
     InsertFontFaceRule(aRule, fs);
   }
 
   return PR_TRUE;
 }
 
-static PRBool
-CascadeSheetRulesInto(nsICSSStyleSheet* aSheet, void* aData)
+/* static */ PRBool
+nsCSSRuleProcessor::CascadeSheetRulesInto(nsICSSStyleSheet* aSheet, void* aData)
 {
   nsCSSStyleSheet*  sheet = static_cast<nsCSSStyleSheet*>(aSheet);
   CascadeEnumData* data = static_cast<CascadeEnumData*>(aData);
   PRBool bSheetApplicable = PR_TRUE;
   sheet->GetApplicable(bSheetApplicable);
 
   if (bSheetApplicable &&
       sheet->UseForPresentation(data->mPresContext, data->mCacheKey) &&
--- a/layout/style/nsCSSRuleProcessor.h
+++ b/layout/style/nsCSSRuleProcessor.h
@@ -97,17 +97,19 @@ public:
                                    PRBool* aRulesChanged);
 
 #ifdef DEBUG
   void AssertQuirksChangeOK() {
     NS_ASSERTION(!mRuleCascades, "too late to set quirks style sheet");
   }
 #endif
 
-protected:
+private:
+  static PRBool CascadeSheetRulesInto(nsICSSStyleSheet* aSheet, void* aData);
+
   RuleCascadeData* GetRuleCascade(nsPresContext* aPresContext);
   void RefreshRuleCascade(nsPresContext* aPresContext);
 
   // The sheet order here is the same as in nsStyleSet::mSheets
   nsCOMArray<nsICSSStyleSheet> mSheets;
 
   // active first, then cached (most recent first)
   RuleCascadeData* mRuleCascades;
--- a/layout/style/nsCSSStyleSheet.h
+++ b/layout/style/nsCSSStyleSheet.h
@@ -96,17 +96,16 @@ public:
 };
 
 
 // -------------------------------
 // CSS Style Sheet
 //
 
 class CSSRuleListImpl;
-static PRBool CascadeSheetRulesInto(nsICSSStyleSheet* aSheet, void* aData);
 struct ChildSheetListBuilder;
 
 class nsCSSStyleSheet : public nsICSSStyleSheet, 
                         public nsIDOMCSSStyleSheet,
                         public nsICSSLoaderObserver
 {
 public:
   nsCSSStyleSheet();
@@ -219,14 +218,14 @@ protected:
   PRPackedBool          mDisabled;
   PRPackedBool          mDirty; // has been modified 
 
   nsCSSStyleSheetInner* mInner;
 
   nsAutoVoidArray*      mRuleProcessors;
 
   friend class nsMediaList;
-  friend PRBool CascadeSheetRulesInto(nsICSSStyleSheet* aSheet, void* aData);
+  friend class nsCSSRuleProcessor;
   friend nsresult NS_NewCSSStyleSheet(nsICSSStyleSheet** aInstancePtrResult);
   friend struct ChildSheetListBuilder;
 };
 
 #endif /* !defined(nsCSSStyleSheet_h_) */