Bug 1315601 part 12 - Remove useless retval out param from InsertRuleIntoGroup. r=heycam

MozReview-Commit-ID: Iyj0zLj8nsL

--HG--
extra : rebase_source : 39815c7f1c4ab65b32fa5b41c4231c3e76661628
This commit is contained in:
Xidorn Quan 2017-03-08 17:11:42 +11:00
Родитель 7d403bebc2
Коммит 63dfed31ba
3 изменённых файлов: 4 добавлений и 7 удалений

Просмотреть файл

@ -934,8 +934,7 @@ CSSStyleSheet::DeleteRuleFromGroup(css::GroupRule* aGroup, uint32_t aIndex)
nsresult nsresult
CSSStyleSheet::InsertRuleIntoGroup(const nsAString & aRule, CSSStyleSheet::InsertRuleIntoGroup(const nsAString & aRule,
css::GroupRule* aGroup, css::GroupRule* aGroup,
uint32_t aIndex, uint32_t aIndex)
uint32_t* _retval)
{ {
NS_ASSERTION(mInner->mComplete, "No inserting into an incomplete sheet!"); NS_ASSERTION(mInner->mComplete, "No inserting into an incomplete sheet!");
// check that the group actually belongs to this sheet! // check that the group actually belongs to this sheet!
@ -993,7 +992,6 @@ CSSStyleSheet::InsertRuleIntoGroup(const nsAString & aRule,
mDocument->StyleRuleAdded(this, rule); mDocument->StyleRuleAdded(this, rule);
} }
*_retval = aIndex;
return NS_OK; return NS_OK;
} }

Просмотреть файл

@ -117,7 +117,7 @@ public:
css::Rule* GetStyleRuleAt(int32_t aIndex) const; css::Rule* GetStyleRuleAt(int32_t aIndex) const;
nsresult DeleteRuleFromGroup(css::GroupRule* aGroup, uint32_t aIndex); nsresult DeleteRuleFromGroup(css::GroupRule* aGroup, uint32_t aIndex);
nsresult InsertRuleIntoGroup(const nsAString& aRule, css::GroupRule* aGroup, uint32_t aIndex, uint32_t* _retval); nsresult InsertRuleIntoGroup(const nsAString& aRule, css::GroupRule* aGroup, uint32_t aIndex);
void SetOwnerRule(css::ImportRule* aOwnerRule) { mOwnerRule = aOwnerRule; /* Not ref counted */ } void SetOwnerRule(css::ImportRule* aOwnerRule) { mOwnerRule = aOwnerRule; /* Not ref counted */ }
css::ImportRule* GetOwnerRule() const { return mOwnerRule; } css::ImportRule* GetOwnerRule() const { return mOwnerRule; }

Просмотреть файл

@ -368,14 +368,13 @@ GroupRule::InsertRule(const nsAString& aRule, uint32_t aIndex, ErrorResult& aRv)
NS_ASSERTION(count <= INT32_MAX, "Too many style rules!"); NS_ASSERTION(count <= INT32_MAX, "Too many style rules!");
uint32_t retval;
nsresult rv = nsresult rv =
sheet->AsGecko()->InsertRuleIntoGroup(aRule, this, aIndex, &retval); sheet->AsGecko()->InsertRuleIntoGroup(aRule, this, aIndex);
if (NS_FAILED(rv)) { if (NS_FAILED(rv)) {
aRv.Throw(rv); aRv.Throw(rv);
return 0; return 0;
} }
return retval; return aIndex;
} }
nsresult nsresult