Bug 1386865 part 1 - Have GetServoStyleSet return non-const ServoStyleSet. r?TYLin
MozReview-Commit-ID: IOlcThK3PAr
--- a/dom/xbl/nsXBLBinding.cpp
+++ b/dom/xbl/nsXBLBinding.cpp
@@ -864,17 +864,17 @@ nsXBLBinding::WalkRules(nsIStyleRuleProc
if (mNextBinding)
mNextBinding->WalkRules(aFunc, aData);
nsIStyleRuleProcessor *rules = mPrototypeBinding->GetRuleProcessor();
if (rules)
(*aFunc)(rules, aData);
}
-const ServoStyleSet*
+ServoStyleSet*
nsXBLBinding::GetServoStyleSet() const
{
return mPrototypeBinding->GetServoStyleSet();
}
// Internal helper methods ////////////////////////////////////////////////////////////////
// Get or create a WeakMap object on a given XBL-hosting global.
--- a/dom/xbl/nsXBLBinding.h
+++ b/dom/xbl/nsXBLBinding.h
@@ -125,17 +125,17 @@ public:
void AttributeChanged(nsIAtom* aAttribute, int32_t aNameSpaceID,
bool aRemoveFlag, bool aNotify);
void ChangeDocument(nsIDocument* aOldDocument, nsIDocument* aNewDocument);
void WalkRules(nsIStyleRuleProcessor::EnumFunc aFunc, void* aData);
- const mozilla::ServoStyleSet* GetServoStyleSet() const;
+ mozilla::ServoStyleSet* GetServoStyleSet() const;
static nsresult DoInitJSClass(JSContext *cx, JS::Handle<JSObject*> obj,
const nsString& aClassName,
nsXBLPrototypeBinding* aProtoBinding,
JS::MutableHandle<JSObject*> aClassObject,
bool* aNew);
bool AllowScripts();
--- a/dom/xbl/nsXBLPrototypeBinding.cpp
+++ b/dom/xbl/nsXBLPrototypeBinding.cpp
@@ -564,17 +564,17 @@ nsXBLPrototypeBinding::GetRuleProcessor(
{
if (mResources) {
return mResources->GetRuleProcessor();
}
return nullptr;
}
-const ServoStyleSet*
+ServoStyleSet*
nsXBLPrototypeBinding::GetServoStyleSet() const
{
return mResources ? mResources->GetServoStyleSet() : nullptr;
}
void
nsXBLPrototypeBinding::EnsureAttributeTable()
{
--- a/dom/xbl/nsXBLPrototypeBinding.h
+++ b/dom/xbl/nsXBLPrototypeBinding.h
@@ -126,17 +126,17 @@ public:
void RemoveStyleSheet(mozilla::StyleSheet* aSheet);
void InsertStyleSheetAt(size_t aIndex, mozilla::StyleSheet* aSheet);
mozilla::StyleSheet* StyleSheetAt(size_t aIndex) const;
size_t SheetCount() const;
bool HasStyleSheets() const;
void AppendStyleSheetsTo(nsTArray<mozilla::StyleSheet*>& aResult) const;
nsIStyleRuleProcessor* GetRuleProcessor();
- const mozilla::ServoStyleSet* GetServoStyleSet() const;
+ mozilla::ServoStyleSet* GetServoStyleSet() const;
nsresult FlushSkinSheets();
nsIAtom* GetBaseTag(int32_t* aNamespaceID);
void SetBaseTag(int32_t aNamespaceID, nsIAtom* aTag);
bool ImplementsInterface(REFNSIID aIID) const;
--- a/dom/xbl/nsXBLPrototypeResources.h
+++ b/dom/xbl/nsXBLPrototypeResources.h
@@ -59,17 +59,17 @@ public:
nsCSSRuleProcessor* GetRuleProcessor() const { return mRuleProcessor; }
// Updates the ServoStyleSet object that holds the result of cascading the
// sheets in mStyleSheetList. Equivalent to GatherRuleProcessor(), but for
// the Servo style backend.
void ComputeServoStyleSet(nsPresContext* aPresContext);
- const mozilla::ServoStyleSet* GetServoStyleSet() const { return mServoStyleSet.get(); }
+ mozilla::ServoStyleSet* GetServoStyleSet() const { return mServoStyleSet.get(); }
private:
// A loader object. Exists only long enough to load resources, and then it dies.
RefPtr<nsXBLResourceLoader> mLoader;
// A list of loaded stylesheets for this binding.
nsTArray<RefPtr<mozilla::StyleSheet>> mStyleSheetList;