diff options
Diffstat (limited to 'xfa/fde/css/cfde_cssselector.cpp')
-rw-r--r-- | xfa/fde/css/cfde_cssselector.cpp | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/xfa/fde/css/cfde_cssselector.cpp b/xfa/fde/css/cfde_cssselector.cpp index bd800c0fa5..718cb46415 100644 --- a/xfa/fde/css/cfde_cssselector.cpp +++ b/xfa/fde/css/cfde_cssselector.cpp @@ -78,34 +78,7 @@ std::unique_ptr<CFDE_CSSSelector> CFDE_CSSSelector::FromString( for (psz = pStart; psz < pEnd;) { FX_WCHAR wch = *psz; - if (wch == '.' || wch == '#') { - if (psz == pStart || psz[-1] == ' ') { - auto p = pdfium::MakeUnique<CFDE_CSSSelector>( - FDE_CSSSelectorType::Element, L"*", 1, true); - - if (pFirst) { - pFirst->SetType(FDE_CSSSelectorType::Descendant); - p->SetNext(std::move(pFirst)); - } - pFirst = std::move(p); - pLast = pFirst.get(); - } - ASSERT(pLast); - - int32_t iNameLen = GetCSSNameLen(++psz, pEnd); - if (iNameLen == 0) - return nullptr; - - FDE_CSSSelectorType eType = - wch == '.' ? FDE_CSSSelectorType::Class : FDE_CSSSelectorType::ID; - auto p = - pdfium::MakeUnique<CFDE_CSSSelector>(eType, psz, iNameLen, false); - - p->SetNext(pLast->ReleaseNextSelector()); - pLast->SetNext(std::move(p)); - pLast = pLast->GetNextSelector(); - psz += iNameLen; - } else if (IsCSSChar(wch) || wch == '*') { + if (IsCSSChar(wch) || wch == '*') { int32_t iNameLen = wch == '*' ? 1 : GetCSSNameLen(psz, pEnd); if (iNameLen == 0) return nullptr; |