Remove aTag argument from nsICSSPseudoComparator::PseudoMatches. (Bug 576794) r=bzbarsky a2.0=bsmedberg
authorCraig Topper <craig.topper@gmail.com>
Fri, 30 Jul 2010 16:48:57 -0700
changeset 48445 f7f9eb6c19d34229f04fff120ce041b697c0177d
parent 48444 06ae143d9ad887d022a52f61a74d59b5ff0b768c
child 48446 99873e7a2c8975a99f5543e3d3b87d23b7fc99c6
push idunknown
push userunknown
push dateunknown
reviewersbzbarsky
bugs576794
milestone2.0b3pre
Remove aTag argument from nsICSSPseudoComparator::PseudoMatches. (Bug 576794) r=bzbarsky a2.0=bsmedberg
layout/style/nsCSSRuleProcessor.cpp
layout/style/nsICSSPseudoComparator.h
layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp
layout/xul/base/src/tree/src/nsTreeBodyFrame.h
--- a/layout/style/nsCSSRuleProcessor.cpp
+++ b/layout/style/nsCSSRuleProcessor.cpp
@@ -2390,17 +2390,17 @@ nsCSSRuleProcessor::RulesMatching(XULTre
   if (cascade && cascade->mXULTreeRules.entryCount) {
     RuleHashTagTableEntry* entry = static_cast<RuleHashTagTableEntry*>
       (PL_DHashTableOperate(&cascade->mXULTreeRules, aData->mPseudoTag,
                             PL_DHASH_LOOKUP));
     if (PL_DHASH_ENTRY_IS_BUSY(entry)) {
       nsTArray<RuleValue>& rules = entry->mRules;
       for (RuleValue *value = rules.Elements(), *end = value + rules.Length();
            value != end; ++value) {
-        if (aData->mComparator->PseudoMatches(aData->mPseudoTag, value->mSelector)) {
+        if (aData->mComparator->PseudoMatches(value->mSelector)) {
           ContentEnumFunc(value->mRule, value->mSelector->mNext,
                           static_cast<RuleProcessorData*>(aData));
         }
       }
     }
   }
 }
 #endif
--- a/layout/style/nsICSSPseudoComparator.h
+++ b/layout/style/nsICSSPseudoComparator.h
@@ -41,12 +41,12 @@
 #define nsICSSPseudoComparator_h___
 
 class nsIAtom;
 struct nsCSSSelector;
 
 class nsICSSPseudoComparator
 {
 public:
-  virtual PRBool PseudoMatches(nsIAtom* aTag, nsCSSSelector* aSelector)=0;
+  virtual PRBool PseudoMatches(nsCSSSelector* aSelector)=0;
 };
 
 #endif /* nsICSSPseudoComparator_h___ */
--- a/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp
+++ b/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp
@@ -4196,20 +4196,18 @@ nsTreeBodyFrame::GetPseudoStyleContext(n
 {
   return mStyleCache.GetStyleContext(this, PresContext(), mContent,
                                      mStyleContext, aPseudoElement,
                                      mScratchArray);
 }
 
 // Our comparator for resolving our complex pseudos
 PRBool
-nsTreeBodyFrame::PseudoMatches(nsIAtom* aTag, nsCSSSelector* aSelector)
+nsTreeBodyFrame::PseudoMatches(nsCSSSelector* aSelector)
 {
-  NS_ABORT_IF_FALSE(aSelector->mLowercaseTag == aTag,
-                   "should not have been called");
   // Iterate the pseudoclass list.  For each item in the list, see if
   // it is contained in our scratch array.  If we have a miss, then
   // we aren't a match.  If all items in the pseudoclass list are
   // present in the scratch array, then we have a match.
   nsPseudoClassList* curr = aSelector->mPseudoClassList;
   while (curr) {
     PRInt32 index;
     mScratchArray->GetIndexOf(curr->mAtom, &index);
--- a/layout/xul/base/src/tree/src/nsTreeBodyFrame.h
+++ b/layout/xul/base/src/tree/src/nsTreeBodyFrame.h
@@ -138,17 +138,17 @@ public:
   virtual void SetBounds(nsBoxLayoutState& aBoxLayoutState, const nsRect& aRect,
                          PRBool aRemoveOverflowArea = PR_FALSE);
 
   // nsIReflowCallback
   virtual PRBool ReflowFinished();
   virtual void ReflowCallbackCanceled();
 
   // nsICSSPseudoComparator
-  virtual PRBool PseudoMatches(nsIAtom* aTag, nsCSSSelector* aSelector);
+  virtual PRBool PseudoMatches(nsCSSSelector* aSelector);
 
   // nsIScrollbarMediator
   NS_IMETHOD PositionChanged(nsIScrollbarFrame* aScrollbar, PRInt32 aOldIndex, PRInt32& aNewIndex);
   NS_IMETHOD ScrollbarButtonPressed(nsIScrollbarFrame* aScrollbar, PRInt32 aOldIndex, PRInt32 aNewIndex);
   NS_IMETHOD VisibilityChanged(PRBool aVisible) { Invalidate(); return NS_OK; }
 
   // Overridden from nsIFrame to cache our pres context.
   NS_IMETHOD Init(nsIContent*     aContent,