Bug 1332550 - Use our existing function for removing a rule at a given index from a group rule. r=heycam, a=abillings
authorBoris Zbarsky <bzbarsky@mit.edu>
Fri, 20 Jan 2017 12:39:53 -0500
changeset 480401 f67c25a9d2a909969bcba04b9a0c263415cfeddd
parent 480400 80a2d38b0b2216e3ef89975f27e2d0a764d7fb24
child 480402 405ee5de06739ed6cf90e38b4f006e8dc47bfbd7
push id44524
push usermartin.thomson@gmail.com
push dateWed, 08 Feb 2017 05:10:11 +0000
reviewersheycam, abillings
bugs1332550
milestone52.0
Bug 1332550 - Use our existing function for removing a rule at a given index from a group rule. r=heycam, a=abillings
layout/style/nsCSSRules.cpp
--- a/layout/style/nsCSSRules.cpp
+++ b/layout/style/nsCSSRules.cpp
@@ -2393,17 +2393,17 @@ nsCSSKeyframesRule::FindRuleIndexForKey(
 NS_IMETHODIMP
 nsCSSKeyframesRule::DeleteRule(const nsAString& aKey)
 {
   uint32_t index = FindRuleIndexForKey(aKey);
   if (index != RULE_NOT_FOUND) {
     nsIDocument* doc = GetDocument();
     MOZ_AUTO_DOC_UPDATE(doc, UPDATE_STYLE, true);
 
-    mRules.RemoveObjectAt(index);
+    DeleteStyleRuleAt(index);
 
     CSSStyleSheet* sheet = GetStyleSheet();
     if (sheet) {
       sheet->SetModifiedByChildRule();
 
       if (doc) {
         doc->StyleRuleChanged(sheet, this);
       }