Bug 1352763 part 1 - Constify RawServoStyleSheet. r?heycam
MozReview-Commit-ID: IXWGobgV59f
--- a/layout/style/ServoStyleSheet.h
+++ b/layout/style/ServoStyleSheet.h
@@ -27,17 +27,17 @@ class Loader;
//
struct ServoStyleSheetInner : public StyleSheetInfo
{
ServoStyleSheetInner(CORSMode aCORSMode,
ReferrerPolicy aReferrerPolicy,
const dom::SRIMetadata& aIntegrity);
- RefPtr<RawServoStyleSheet> mSheet;
+ RefPtr<const RawServoStyleSheet> mSheet;
};
/**
* CSS style sheet object that is a wrapper for a Servo Stylesheet.
*/
class ServoStyleSheet : public StyleSheet
{
@@ -61,20 +61,20 @@ public:
/**
* Called instead of ParseSheet to initialize the Servo stylesheet object
* for a failed load. Either ParseSheet or LoadFailed must be called before
* adding a ServoStyleSheet to a ServoStyleSet.
*/
void LoadFailed();
- RawServoStyleSheet* RawSheet() const {
+ const RawServoStyleSheet* RawSheet() const {
return Inner()->mSheet;
}
- void SetSheetForImport(RawServoStyleSheet* aSheet) {
+ void SetSheetForImport(const RawServoStyleSheet* aSheet) {
MOZ_ASSERT(!Inner()->mSheet);
Inner()->mSheet = aSheet;
}
// WebIDL CSSStyleSheet API
// Can't be inline because we can't include ImportRule here. And can't be
// called GetOwnerRule because that would be ambiguous with the ImportRule
// version.