Bug 1306212 part 2 - Remove visibility restriction of StyleSheetInfo. r=heycam
authorXidorn Quan <me@upsuper.org>
Thu, 29 Sep 2016 16:17:58 +1000
changeset 316221 6e3d1f53047f
parent 316220 37ea2043dfb9
child 316222 7833dc154154
push id32780
push userxquan@mozilla.com
push dateTue, 04 Oct 2016 00:55:07 +0000
treeherderautoland@7833dc154154 [default view] [failures only]
reviewersheycam
bugs1306212
milestone52.0a1
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
Bug 1306212 part 2 - Remove visibility restriction of StyleSheetInfo. r=heycam MozReview-Commit-ID: 8xAkfwtDpRu
layout/style/CSSStyleSheet.h
layout/style/StyleSheet.h
layout/style/StyleSheetInfo.h
--- a/layout/style/CSSStyleSheet.h
+++ b/layout/style/CSSStyleSheet.h
@@ -52,23 +52,18 @@ class ImportRule;
 namespace dom {
 class CSSRuleList;
 } // namespace dom
 
   // -------------------------------
 // CSS Style Sheet Inner Data Container
 //
 
-class CSSStyleSheetInner : public StyleSheetInfo
+struct CSSStyleSheetInner : public StyleSheetInfo
 {
-public:
-  friend class mozilla::CSSStyleSheet;
-  friend class ::nsCSSRuleProcessor;
-
-private:
   CSSStyleSheetInner(CSSStyleSheet* aPrimarySheet,
                      CORSMode aCORSMode,
                      ReferrerPolicy aReferrerPolicy,
                      const dom::SRIMetadata& aIntegrity);
   CSSStyleSheetInner(CSSStyleSheetInner& aCopy,
                      CSSStyleSheet* aPrimarySheet);
   ~CSSStyleSheetInner();
 
--- a/layout/style/StyleSheet.h
+++ b/layout/style/StyleSheet.h
@@ -15,17 +15,17 @@
 
 class nsIDocument;
 class nsINode;
 
 namespace mozilla {
 
 class CSSStyleSheet;
 class ServoStyleSheet;
-class StyleSheetInfo;
+struct StyleSheetInfo;
 
 namespace dom {
 class SRIMetadata;
 } // namespace dom
 
 /**
  * Superclass for data common to CSSStyleSheet and ServoStyleSheet.
  */
--- a/layout/style/StyleSheetInfo.h
+++ b/layout/style/StyleSheetInfo.h
@@ -19,41 +19,35 @@ class CSSStyleSheet;
 class nsCSSRuleProcessor;
 class nsIPrincipal;
 
 namespace mozilla {
 
 /**
  * Struct for data common to CSSStyleSheetInner and ServoStyleSheet.
  */
-class StyleSheetInfo
+struct StyleSheetInfo
 {
-public:
-  friend class mozilla::CSSStyleSheet;
-  friend class ::nsCSSRuleProcessor;
   typedef net::ReferrerPolicy ReferrerPolicy;
 
   StyleSheetInfo(CORSMode aCORSMode,
                  ReferrerPolicy aReferrerPolicy,
                  const dom::SRIMetadata& aIntegrity);
   StyleSheetInfo(const StyleSheetInfo& aCopy);
 
-protected:
   nsCOMPtr<nsIURI>       mSheetURI; // for error reports, etc.
   nsCOMPtr<nsIURI>       mOriginalSheetURI;  // for GetHref.  Can be null.
   nsCOMPtr<nsIURI>       mBaseURI; // for resolving relative URIs
   nsCOMPtr<nsIPrincipal> mPrincipal;
   CORSMode               mCORSMode;
   // The Referrer Policy of a stylesheet is used for its child sheets, so it is
   // stored here.
   ReferrerPolicy         mReferrerPolicy;
   dom::SRIMetadata       mIntegrity;
   bool                   mComplete;
 #ifdef DEBUG
   bool                   mPrincipalSet;
 #endif
-
-  friend class StyleSheet;
 };
 
 } // namespace mozilla
 
 #endif // mozilla_StyleSheetInfo_h