From 12d67eca4e904d6c8945181a039527b7c7d2f1f3 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Sun, 7 Aug 2011 22:23:36 -0400 Subject: [PATCH] Bug 676174. Remove the unncessary RuleHash_CSMatchEntry and resulting complications from AtomSelector_CSOps. r=dbaron --- layout/style/nsCSSRuleProcessor.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/layout/style/nsCSSRuleProcessor.cpp b/layout/style/nsCSSRuleProcessor.cpp index 3bfb64f71ad..e8eadfbe676 100644 --- a/layout/style/nsCSSRuleProcessor.cpp +++ b/layout/style/nsCSSRuleProcessor.cpp @@ -769,18 +769,15 @@ AtomSelector_GetKey(PLDHashTable *table, const PLDHashEntryHdr *hdr) } // 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. @@ -811,17 +808,17 @@ struct RuleCascadeData { { // 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