Bug 1457920: Remove FORWARD_INTERNAL. r?xidorn draft
authorEmilio Cobos Álvarez <emilio@crisal.io>
Mon, 30 Apr 2018 18:08:40 +0200
changeset 789946 64bae276d1c0b35d4073bbc7724877d6648e7369
parent 789945 5c0415f49c1c0706aa051e72458c3331742b2209
child 789947 12ae383a830ecd36a0cdf0d7ae298be8772a9b3b
push id108371
push userbmo:emilio@crisal.io
push dateMon, 30 Apr 2018 19:53:45 +0000
reviewersxidorn
bugs1457920
milestone61.0a1
Bug 1457920: Remove FORWARD_INTERNAL. r?xidorn MozReview-Commit-ID: EzWWdstzeev
layout/style/StyleSheet.cpp
--- a/layout/style/StyleSheet.cpp
+++ b/layout/style/StyleSheet.cpp
@@ -453,27 +453,24 @@ StyleSheet::AppendAllChildSheets(nsTArra
 {
   for (StyleSheet* child = GetFirstChild(); child; child = child->mNext) {
     aArray.AppendElement(child);
   }
 }
 
 // WebIDL CSSStyleSheet API
 
-#define FORWARD_INTERNAL(method_, args_) \
-  return AsServo()->method_ args_;
-
 dom::CSSRuleList*
 StyleSheet::GetCssRules(nsIPrincipal& aSubjectPrincipal,
                         ErrorResult& aRv)
 {
   if (!AreRulesAvailable(aSubjectPrincipal, aRv)) {
     return nullptr;
   }
-  FORWARD_INTERNAL(GetCssRulesInternal, ())
+  return GetCssRulesInternal();
 }
 
 void
 StyleSheet::GetSourceMapURL(nsAString& aSourceMapURL)
 {
   if (mInner->mSourceMapURL.IsEmpty()) {
     aSourceMapURL = mInner->mSourceMapURLFromComment;
   } else {
@@ -514,28 +511,28 @@ StyleSheet::GetDOMOwnerRule() const
 uint32_t
 StyleSheet::InsertRule(const nsAString& aRule, uint32_t aIndex,
                        nsIPrincipal& aSubjectPrincipal,
                        ErrorResult& aRv)
 {
   if (!AreRulesAvailable(aSubjectPrincipal, aRv)) {
     return 0;
   }
-  FORWARD_INTERNAL(InsertRuleInternal, (aRule, aIndex, aRv))
+  return InsertRuleInternal(aRule, aIndex, aRv);
 }
 
 void
 StyleSheet::DeleteRule(uint32_t aIndex,
                        nsIPrincipal& aSubjectPrincipal,
                        ErrorResult& aRv)
 {
   if (!AreRulesAvailable(aSubjectPrincipal, aRv)) {
     return;
   }
-  FORWARD_INTERNAL(DeleteRuleInternal, (aIndex, aRv))
+  return DeleteRuleInternal(aIndex, aRv);
 }
 
 nsresult
 StyleSheet::DeleteRuleFromGroup(css::GroupRule* aGroup, uint32_t aIndex)
 {
   NS_ENSURE_ARG_POINTER(aGroup);
   NS_ASSERTION(IsComplete(), "No deleting from an incomplete sheet!");
   RefPtr<css::Rule> rule = aGroup->GetStyleRuleAt(aIndex);
@@ -665,18 +662,16 @@ StyleSheet::FindOwningWindowInnerID() co
 
   if (windowID == 0 && mParent) {
     windowID = mParent->FindOwningWindowInnerID();
   }
 
   return windowID;
 }
 
-#undef FORWARD_INTERNAL
-
 void
 StyleSheet::UnparentChildren()
 {
   // XXXbz this is a little bogus; see the XXX comment where we
   // declare mFirstChild in StyleSheetInfo.
   for (StyleSheet* child = GetFirstChild();
        child;
        child = child->mNext) {