Bug 1315601 part 8 - Constify Rule::GetCssText. r=heycam draft
authorXidorn Quan <me@upsuper.org>
Wed, 08 Mar 2017 12:10:16 +1100
changeset 497344 6051886a6695e01f811fecdcdbf2274b2dd470e9
parent 497343 078ee67ece475cbf68f7395624abfa4e17cbc42c
child 497345 04cb9ea11e01a4f57497b4edf148adbd4fc1311b
push id48869
push userxquan@mozilla.com
push dateMon, 13 Mar 2017 06:50:23 +0000
reviewersheycam
bugs1315601
milestone55.0a1
Bug 1315601 part 8 - Constify Rule::GetCssText. r=heycam MozReview-Commit-ID: Dn2lWQWUedL
layout/style/Rule.h
--- a/layout/style/Rule.h
+++ b/layout/style/Rule.h
@@ -113,17 +113,17 @@ public:
   // This is pure virtual because all of Rule's data members are non-owning and
   // thus measured elsewhere.
   virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf)
     const MOZ_MUST_OVERRIDE = 0;
 
   // WebIDL interface, aka helpers for nsIDOMCSSRule implementation.
   virtual uint16_t Type() const = 0;
   virtual void GetCssTextImpl(nsAString& aCssText) const = 0;
-  // XPCOM GetCssText is OK, since it never throws.
+  void GetCssText(nsAString& aCssText) const { GetCssTextImpl(aCssText); }
   // XPCOM SetCssText is OK, since it never throws.
   Rule* GetParentRule() const;
   StyleSheet* GetParentStyleSheet() const { return GetStyleSheet(); }
   nsIDocument* GetParentObject() const { return GetDocument(); }
 
 protected:
   // True if we're known-live for cycle collection purposes.
   bool IsKnownLive() const;