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 487440 1a39a54b5feab3ebdedfbb3f5e45ec77fea53c50
parent 487439 d4ade4b5a5381ebf2895d9facf33dd0959bcf2ea
child 487441 9828c3bb7b7358822de3d2dbf80046bf82ac0f7c
push id46228
push userpaul@paul.cx
push dateTue, 21 Feb 2017 16:19:44 +0000
reviewersheycam, abillings
bugs1332550
milestone45.7.1
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
@@ -2388,17 +2388,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);
       }