7#include "core/fxcrt/css/cfx_cssvaluelistparser.h"
9#include "core/fxcrt/fx_extension.h"
10#include "core/fxcrt/fx_system.h"
11#include "third_party/base/check.h"
12#include "third_party/base/check_op.h"
17 : m_Separator(separator), m_pCur(psz), m_pEnd(psz + nLen) {
23 const wchar_t** pStart,
25 while (m_pCur < m_pEnd && (*m_pCur <=
' ' || *m_pCur == m_Separator))
34 wchar_t wch = *m_pCur;
36 *nLength = SkipToChar(
' ');
37 if (*nLength == 4 || *nLength == 7)
41 while (m_pCur < m_pEnd && (*m_pCur >
' ' && *m_pCur != m_Separator))
44 *nLength = m_pCur - *pStart;
46 }
else if (wch ==
'\"' || wch ==
'\'') {
49 *nLength = SkipToChar(wch);
52 }
else if (m_pEnd - m_pCur > 5 && m_pCur[3] ==
'(') {
54 *nLength = SkipToChar(
')') + 1;
59 *nLength = SkipToCharMatchingParens(m_Separator);
62 return m_pCur <= m_pEnd && *nLength > 0;
66 const wchar_t* pStart = m_pCur;
67 while (m_pCur < m_pEnd && *m_pCur != wch) {
70 return m_pCur - pStart;
74 const wchar_t* pStart = m_pCur;
75 int64_t bracketCount = 0;
76 while (m_pCur < m_pEnd && *m_pCur != wch) {
81 else if (*m_pCur ==
')')
85 while (bracketCount > 0 && m_pCur < m_pEnd) {
90 return m_pCur - pStart;
CFX_CSSValueListParser(const wchar_t *psz, size_t nLen, wchar_t separator)
bool NextValue(CFX_CSSValue::PrimitiveType *eType, const wchar_t **pStart, size_t *nLength)
bool FXSYS_IsDecimalDigit(wchar_t c)
int32_t FXSYS_wcsnicmp(const wchar_t *s1, const wchar_t *s2, size_t count)