diff options
author | tsepez <tsepez@chromium.org> | 2017-01-05 09:09:49 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2017-01-05 09:09:49 -0800 |
commit | e4d611c9c6d882bd47b6936554bdfc5c1ea614a0 (patch) | |
tree | 0d74e49c9b56c687b343e41df8afd42e0d694dbb /xfa/fde/css/fde_cssstyleselector.cpp | |
parent | 0ef7ba086f9e48100f9caebd0a52de478f0ada0a (diff) | |
download | pdfium-e4d611c9c6d882bd47b6936554bdfc5c1ea614a0.tar.xz |
Remove CFX_MapPtrToPtr from xfa/fde.
Fix spelling of "pseudo" along the way.
Remove some FDE_LPCxxx typedefs for the sake of clarity.
Review-Url: https://codereview.chromium.org/2616813002
Diffstat (limited to 'xfa/fde/css/fde_cssstyleselector.cpp')
-rw-r--r-- | xfa/fde/css/fde_cssstyleselector.cpp | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/xfa/fde/css/fde_cssstyleselector.cpp b/xfa/fde/css/fde_cssstyleselector.cpp index 72e5ffc12b..681d189fcc 100644 --- a/xfa/fde/css/fde_cssstyleselector.cpp +++ b/xfa/fde/css/fde_cssstyleselector.cpp @@ -198,9 +198,8 @@ void CFDE_CSSStyleSelector::Reset() { int32_t CFDE_CSSStyleSelector::MatchDeclarations( CXFA_CSSTagProvider* pTag, CFDE_CSSDeclarationArray& matchedDecls, - FDE_CSSPERSUDO ePersudoType) { - ASSERT(m_pAccelerator && pTag); - + FDE_CSSPSEUDO ePseudoType) { + ASSERT(pTag); FDE_CSSTagCache* pCache = m_pAccelerator->GetTopElement(); ASSERT(pCache && pCache->GetTag() == pTag); @@ -212,20 +211,20 @@ int32_t CFDE_CSSStyleSelector::MatchDeclarations( if (rules.CountSelectors() == 0) continue; - if (ePersudoType == FDE_CSSPERSUDO_NONE) { - MatchRules(pCache, rules.GetUniversalRuleData(), ePersudoType); + if (ePseudoType == FDE_CSSPSEUDO_NONE) { + MatchRules(pCache, rules.GetUniversalRuleData(), ePseudoType); if (pCache->HashTag()) { MatchRules(pCache, rules.GetTagRuleData(pCache->HashTag()), - ePersudoType); + ePseudoType); } int32_t iCount = pCache->CountHashClass(); for (int32_t i = 0; i < iCount; i++) { pCache->SetClassIndex(i); MatchRules(pCache, rules.GetClassRuleData(pCache->HashClass()), - ePersudoType); + ePseudoType); } } else { - MatchRules(pCache, rules.GetPersudoRuleData(), ePersudoType); + MatchRules(pCache, rules.GetPseudoRuleData(), ePseudoType); } std::sort(m_MatchedRules.begin(), m_MatchedRules.end(), @@ -241,9 +240,9 @@ int32_t CFDE_CSSStyleSelector::MatchDeclarations( void CFDE_CSSStyleSelector::MatchRules(FDE_CSSTagCache* pCache, FDE_CSSRuleData* pList, - FDE_CSSPERSUDO ePersudoType) { + FDE_CSSPSEUDO ePseudoType) { while (pList) { - if (MatchSelector(pCache, pList->pSelector, ePersudoType)) + if (MatchSelector(pCache, pList->pSelector, ePseudoType)) m_MatchedRules.push_back(pList); pList = pList->pNext; } @@ -251,7 +250,7 @@ void CFDE_CSSStyleSelector::MatchRules(FDE_CSSTagCache* pCache, bool CFDE_CSSStyleSelector::MatchSelector(FDE_CSSTagCache* pCache, CFDE_CSSSelector* pSel, - FDE_CSSPERSUDO ePersudoType) { + FDE_CSSPSEUDO ePseudoType) { uint32_t dwHash; while (pSel && pCache) { switch (pSel->GetType()) { @@ -261,7 +260,7 @@ bool CFDE_CSSStyleSelector::MatchSelector(FDE_CSSTagCache* pCache, if (dwHash != FDE_CSSUNIVERSALHASH && dwHash != pCache->HashTag()) { continue; } - if (MatchSelector(pCache, pSel->GetNextSelector(), ePersudoType)) { + if (MatchSelector(pCache, pSel->GetNextSelector(), ePseudoType)) { return true; } } @@ -284,8 +283,8 @@ bool CFDE_CSSStyleSelector::MatchSelector(FDE_CSSTagCache* pCache, return false; } break; - case FDE_CSSSELECTORTYPE_Persudo: - dwHash = FDE_GetCSSPersudoByEnum(ePersudoType)->dwHash; + case FDE_CSSSELECTORTYPE_Pseudo: + dwHash = FDE_GetCSSPseudoByEnum(ePseudoType)->dwHash; if (dwHash != pSel->GetNameHash()) { return false; } |