Bug 676174. Remove the unncessary RuleHash_CSMatchEntry and resulting complications from AtomSelector_CSOps. r=dbaron
authorBoris Zbarsky <bzbarsky@mit.edu>
Sun, 07 Aug 2011 22:23:36 -0400
changeset 73966 fd30726145d5db2f40e82e81c656402cc336ed81
parent 73965 1ca50e8b3d3780837065b31bae3fc75cc7ef3da5
child 73967 3b5da2d845387075947c25c91a554d01803b70e1
push id1039
push userbzbarsky@mozilla.com
push dateMon, 08 Aug 2011 02:36:57 +0000
treeherdermozilla-inbound@840e9e5c5059 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs676174
milestone8.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 676174. Remove the unncessary RuleHash_CSMatchEntry and resulting complications from AtomSelector_CSOps. r=dbaron
layout/style/nsCSSRuleProcessor.cpp
--- a/layout/style/nsCSSRuleProcessor.cpp
+++ b/layout/style/nsCSSRuleProcessor.cpp
@@ -764,28 +764,25 @@ AtomSelector_InitEntry(PLDHashTable *tab
 static nsIAtom*
 AtomSelector_GetKey(PLDHashTable *table, const PLDHashEntryHdr *hdr)
 {
   const AtomSelectorEntry *entry = static_cast<const AtomSelectorEntry*>(hdr);
   return entry->mAtom;
 }
 
 // Case-sensitive ops.
-static const RuleHashTableOps AtomSelector_CSOps = {
-  {
+static const PLDHashTableOps AtomSelector_CSOps = {
   PL_DHashAllocTable,
   PL_DHashFreeTable,
   PL_DHashVoidPtrKeyStub,
-  RuleHash_CSMatchEntry,
+  PL_DHashMatchEntryStub,
   PL_DHashMoveEntryStub,
   AtomSelector_ClearEntry,
   PL_DHashFinalizeStub,
   AtomSelector_InitEntry
-  },
-  AtomSelector_GetKey
 };
 
 // Case-insensitive ops.
 static const RuleHashTableOps AtomSelector_CIOps = {
   {
   PL_DHashAllocTable,
   PL_DHashFreeTable,
   RuleHash_CIHashKey,
@@ -806,27 +803,27 @@ struct RuleCascadeData {
       mStateSelectors(),
       mSelectorDocumentStates(0),
       mCacheKey(aMedium),
       mNext(nsnull),
       mQuirksMode(aQuirksMode)
   {
     // mAttributeSelectors is matching on the attribute _name_, not the value,
     // and we case-fold names at parse-time, so this is a case-sensitive match.
-    PL_DHashTableInit(&mAttributeSelectors, &AtomSelector_CSOps.ops, nsnull,
+    PL_DHashTableInit(&mAttributeSelectors, &AtomSelector_CSOps, nsnull,
                       sizeof(AtomSelectorEntry), 16);
     PL_DHashTableInit(&mAnonBoxRules, &RuleHash_TagTable_Ops, nsnull,
                       sizeof(RuleHashTagTableEntry), 16);
     PL_DHashTableInit(&mIdSelectors,
                       aQuirksMode ? &AtomSelector_CIOps.ops :
-                                    &AtomSelector_CSOps.ops,
+                                    &AtomSelector_CSOps,
                       nsnull, sizeof(AtomSelectorEntry), 16);
     PL_DHashTableInit(&mClassSelectors,
                       aQuirksMode ? &AtomSelector_CIOps.ops :
-                                    &AtomSelector_CSOps.ops,
+                                    &AtomSelector_CSOps,
                       nsnull, sizeof(AtomSelectorEntry), 16);
     memset(mPseudoElementRuleHashes, 0, sizeof(mPseudoElementRuleHashes));
 #ifdef MOZ_XUL
     PL_DHashTableInit(&mXULTreeRules, &RuleHash_TagTable_Ops, nsnull,
                       sizeof(RuleHashTagTableEntry), 16);
 #endif
   }