Bug 1304302 part 3 - Use ServoStyleSheet* instead of Handle in ServoStyleSheet. r?heycam draft
authorXidorn Quan <me@upsuper.org>
Thu, 22 Sep 2016 11:31:15 +1000
changeset 416882 1f2d0609f037479d81b170bf4b855ee4bc916765
parent 416881 e44544f6598793025fcdeab810bc0d4a36fe837e
child 416883 607433fe6507079d7c6add1a1a89952ea5d193c1
push id30278
push userxquan@mozilla.com
push dateFri, 23 Sep 2016 07:08:40 +0000
reviewersheycam
bugs1304302
milestone51.0a1
Bug 1304302 part 3 - Use ServoStyleSheet* instead of Handle in ServoStyleSheet. r?heycam MozReview-Commit-ID: WV8eRxSOnp
layout/style/ServoStyleSheet.cpp
layout/style/ServoStyleSheet.h
--- a/layout/style/ServoStyleSheet.cpp
+++ b/layout/style/ServoStyleSheet.cpp
@@ -45,27 +45,27 @@ void
 ServoStyleSheet::SetOwningDocument(nsIDocument* aDocument)
 {
   // XXXheycam: Traverse to child ServoStyleSheets to set this, like
   // CSSStyleSheet::SetOwningDocument does.
 
   mDocument = aDocument;
 }
 
-StyleSheetHandle
+ServoStyleSheet*
 ServoStyleSheet::GetParentSheet() const
 {
   // XXXheycam: When we implement support for child sheets, we'll have
   // to fix SetOwningDocument to propagate the owning document down
   // to the children.
   MOZ_CRASH("stylo: not implemented");
 }
 
 void
-ServoStyleSheet::AppendStyleSheet(StyleSheetHandle aSheet)
+ServoStyleSheet::AppendStyleSheet(ServoStyleSheet* aSheet)
 {
   // XXXheycam: When we implement support for child sheets, we'll have
   // to fix SetOwningDocument to propagate the owning document down
   // to the children.
   MOZ_CRASH("stylo: not implemented");
 }
 
 nsresult
--- a/layout/style/ServoStyleSheet.h
+++ b/layout/style/ServoStyleSheet.h
@@ -6,17 +6,16 @@
 
 #ifndef mozilla_ServoStyleSheet_h
 #define mozilla_ServoStyleSheet_h
 
 #include "mozilla/dom/SRIMetadata.h"
 #include "mozilla/RefPtr.h"
 #include "mozilla/ServoBindingHelpers.h"
 #include "mozilla/StyleSheet.h"
-#include "mozilla/StyleSheetHandle.h"
 #include "mozilla/StyleSheetInfo.h"
 #include "nsStringFwd.h"
 
 namespace mozilla {
 
 /**
  * CSS style sheet object that is a wrapper for a Servo Stylesheet.
  */
@@ -32,18 +31,18 @@ public:
   NS_INLINE_DECL_REFCOUNTING(ServoStyleSheet)
 
   bool IsApplicable() const;
   bool HasRules() const;
 
   nsIDocument* GetOwningDocument() const;
   void SetOwningDocument(nsIDocument* aDocument);
 
-  StyleSheetHandle GetParentSheet() const;
-  void AppendStyleSheet(StyleSheetHandle aSheet);
+  ServoStyleSheet* GetParentSheet() const;
+  void AppendStyleSheet(ServoStyleSheet* aSheet);
 
   MOZ_MUST_USE nsresult ParseSheet(const nsAString& aInput,
                                    nsIURI* aSheetURI,
                                    nsIURI* aBaseURI,
                                    nsIPrincipal* aSheetPrincipal,
                                    uint32_t aLineNumber);
 
   size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const;