Bug 1220509 - Remove unused CSSStyleSheet::PrependStyleRule. r=bzbarsky
authorCameron McCormack <cam@mcc.id.au>
Thu, 05 Nov 2015 18:24:30 +1100
changeset 306933 4b086ed88cb0c00ba360de85737e6a051729b93b
parent 306932 9a8d90e52285feab6af54a24d9dad90b9310e97e
child 306934 8e6a677f96a46ac62f6fba7c388999d486f0b0a9
push id7225
push usermjzffr@gmail.com
push dateThu, 05 Nov 2015 20:58:39 +0000
reviewersbzbarsky
bugs1220509
milestone45.0a1
Bug 1220509 - Remove unused CSSStyleSheet::PrependStyleRule. r=bzbarsky
layout/style/CSSStyleSheet.cpp
layout/style/CSSStyleSheet.h
--- a/layout/style/CSSStyleSheet.cpp
+++ b/layout/style/CSSStyleSheet.cpp
@@ -1549,32 +1549,16 @@ CSSStyleSheet::InsertStyleSheetAt(CSSSty
   // This is not reference counted. Our parent tells us when
   // it's going away.
   aSheet->mParent = this;
   aSheet->mDocument = mDocument;
   DidDirty();
 }
 
 void
-CSSStyleSheet::PrependStyleRule(css::Rule* aRule)
-{
-  NS_PRECONDITION(nullptr != aRule, "null arg");
-
-  WillDirty();
-  mInner->mOrderedRules.InsertObjectAt(aRule, 0);
-  aRule->SetStyleSheet(this);
-  DidDirty();
-
-  if (css::Rule::NAMESPACE_RULE == aRule->GetType()) {
-    // no api to prepend a namespace (ugh), release old ones and re-create them all
-    mInner->RebuildNameSpaces();
-  }
-}
-
-void
 CSSStyleSheet::AppendStyleRule(css::Rule* aRule)
 {
   NS_PRECONDITION(nullptr != aRule, "null arg");
 
   WillDirty();
   mInner->mOrderedRules.AppendObject(aRule);
   aRule->SetStyleSheet(this);
   DidDirty();
--- a/layout/style/CSSStyleSheet.h
+++ b/layout/style/CSSStyleSheet.h
@@ -154,17 +154,16 @@ public:
 #ifdef DEBUG
   virtual void List(FILE* out = stdout, int32_t aIndent = 0) const override;
 #endif
 
   void AppendStyleSheet(CSSStyleSheet* aSheet);
   void InsertStyleSheetAt(CSSStyleSheet* aSheet, int32_t aIndex);
 
   // XXX do these belong here or are they generic?
-  void PrependStyleRule(css::Rule* aRule);
   void AppendStyleRule(css::Rule* aRule);
   void ReplaceStyleRule(css::Rule* aOld, css::Rule* aNew);
 
   int32_t StyleRuleCount() const;
   css::Rule* GetStyleRuleAt(int32_t aIndex) const;
 
   nsresult DeleteRuleFromGroup(css::GroupRule* aGroup, uint32_t aIndex);
   nsresult InsertRuleIntoGroup(const nsAString& aRule, css::GroupRule* aGroup, uint32_t aIndex, uint32_t* _retval);