Bug 676174. Remove the unncessary RuleHash_CSMatchEntry and resulting complications from AtomSelector_CSOps. r=dbaron

This commit is contained in:
Boris Zbarsky 2011-08-07 22:23:36 -04:00
Родитель 537d46bc21
Коммит 12d67eca4e
1 изменённых файлов: 5 добавлений и 8 удалений

Просмотреть файл

@ -769,18 +769,15 @@ AtomSelector_GetKey(PLDHashTable *table, const PLDHashEntryHdr *hdr)
} }
// Case-sensitive ops. // Case-sensitive ops.
static const RuleHashTableOps AtomSelector_CSOps = { static const PLDHashTableOps AtomSelector_CSOps = {
{
PL_DHashAllocTable, PL_DHashAllocTable,
PL_DHashFreeTable, PL_DHashFreeTable,
PL_DHashVoidPtrKeyStub, PL_DHashVoidPtrKeyStub,
RuleHash_CSMatchEntry, PL_DHashMatchEntryStub,
PL_DHashMoveEntryStub, PL_DHashMoveEntryStub,
AtomSelector_ClearEntry, AtomSelector_ClearEntry,
PL_DHashFinalizeStub, PL_DHashFinalizeStub,
AtomSelector_InitEntry AtomSelector_InitEntry
},
AtomSelector_GetKey
}; };
// Case-insensitive ops. // Case-insensitive ops.
@ -811,17 +808,17 @@ struct RuleCascadeData {
{ {
// mAttributeSelectors is matching on the attribute _name_, not the value, // 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. // 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); sizeof(AtomSelectorEntry), 16);
PL_DHashTableInit(&mAnonBoxRules, &RuleHash_TagTable_Ops, nsnull, PL_DHashTableInit(&mAnonBoxRules, &RuleHash_TagTable_Ops, nsnull,
sizeof(RuleHashTagTableEntry), 16); sizeof(RuleHashTagTableEntry), 16);
PL_DHashTableInit(&mIdSelectors, PL_DHashTableInit(&mIdSelectors,
aQuirksMode ? &AtomSelector_CIOps.ops : aQuirksMode ? &AtomSelector_CIOps.ops :
&AtomSelector_CSOps.ops, &AtomSelector_CSOps,
nsnull, sizeof(AtomSelectorEntry), 16); nsnull, sizeof(AtomSelectorEntry), 16);
PL_DHashTableInit(&mClassSelectors, PL_DHashTableInit(&mClassSelectors,
aQuirksMode ? &AtomSelector_CIOps.ops : aQuirksMode ? &AtomSelector_CIOps.ops :
&AtomSelector_CSOps.ops, &AtomSelector_CSOps,
nsnull, sizeof(AtomSelectorEntry), 16); nsnull, sizeof(AtomSelectorEntry), 16);
memset(mPseudoElementRuleHashes, 0, sizeof(mPseudoElementRuleHashes)); memset(mPseudoElementRuleHashes, 0, sizeof(mPseudoElementRuleHashes));
#ifdef MOZ_XUL #ifdef MOZ_XUL