Lines Matching refs:pszValue
26 bool ParseCSSNumber(const FX_WCHAR* pszValue, in ParseCSSNumber() argument
30 ASSERT(pszValue && iValueLen > 0); in ParseCSSNumber()
32 fValue = FXSYS_wcstof(pszValue, iValueLen, &iUsedLen); in ParseCSSNumber()
37 pszValue += iUsedLen; in ParseCSSNumber()
39 if (iValueLen >= 1 && *pszValue == '%') { in ParseCSSNumber()
43 FDE_GetCSSLengthUnitByName(CFX_WideStringC(pszValue, 2)); in ParseCSSNumber()
53 bool CFDE_CSSDeclaration::ParseCSSString(const FX_WCHAR* pszValue, in ParseCSSString() argument
57 ASSERT(pszValue && iValueLen > 0); in ParseCSSString()
61 FX_WCHAR first = pszValue[0], last = pszValue[iValueLen - 1]; in ParseCSSString()
71 bool CFDE_CSSDeclaration::ParseCSSColor(const FX_WCHAR* pszValue, in ParseCSSColor() argument
74 ASSERT(pszValue && iValueLen > 0); in ParseCSSColor()
77 if (*pszValue == '#') { in ParseCSSColor()
80 uint8_t red = Hex2Dec((uint8_t)pszValue[1], (uint8_t)pszValue[1]); in ParseCSSColor()
81 uint8_t green = Hex2Dec((uint8_t)pszValue[2], (uint8_t)pszValue[2]); in ParseCSSColor()
82 uint8_t blue = Hex2Dec((uint8_t)pszValue[3], (uint8_t)pszValue[3]); in ParseCSSColor()
87 uint8_t red = Hex2Dec((uint8_t)pszValue[1], (uint8_t)pszValue[2]); in ParseCSSColor()
88 uint8_t green = Hex2Dec((uint8_t)pszValue[3], (uint8_t)pszValue[4]); in ParseCSSColor()
89 uint8_t blue = Hex2Dec((uint8_t)pszValue[5], (uint8_t)pszValue[6]); in ParseCSSColor()
99 if (pszValue[iValueLen - 1] != ')' || FXSYS_wcsnicmp(L"rgb(", pszValue, 4)) in ParseCSSColor()
105 CFDE_CSSValueListParser list(pszValue + 4, iValueLen - 5, ','); in ParseCSSColor()
107 if (!list.NextValue(eType, pszValue, iValueLen)) in ParseCSSColor()
112 if (!ParseCSSNumber(pszValue, iValueLen, fValue, eNumType)) in ParseCSSColor()
124 FDE_GetCSSColorByName(CFX_WideStringC(pszValue, iValueLen)); in ParseCSSColor()
162 const FX_WCHAR* pszValue = value.c_str(); in AddProperty() local
166 if (iValueLen >= 10 && pszValue[iValueLen - 10] == '!' && in AddProperty()
167 FXSYS_wcsnicmp(L"important", pszValue + iValueLen - 9, 9) == 0) { in AddProperty()
190 pCSSValue = ParseNumber(pszValue, iValueLen); in AddProperty()
193 pCSSValue = ParseEnum(pszValue, iValueLen); in AddProperty()
196 pCSSValue = ParseColor(pszValue, iValueLen); in AddProperty()
199 pCSSValue = ParseString(pszValue, iValueLen); in AddProperty()
217 ParseFontProperty(pszValue, iValueLen, bImportant); in AddProperty()
220 if (ParseBorderProperty(pszValue, iValueLen, pWidth)) { in AddProperty()
233 if (ParseBorderProperty(pszValue, iValueLen, pWidth)) { in AddProperty()
240 if (ParseBorderProperty(pszValue, iValueLen, pWidth)) { in AddProperty()
247 if (ParseBorderProperty(pszValue, iValueLen, pWidth)) { in AddProperty()
254 if (ParseBorderProperty(pszValue, iValueLen, pWidth)) { in AddProperty()
265 ParseValueListProperty(pTable, pszValue, iValueLen, bImportant); in AddProperty()
280 const FX_WCHAR* pszValue, in ParseNumber() argument
284 if (!ParseCSSNumber(pszValue, iValueLen, fValue, eUnit)) in ParseNumber()
290 const FX_WCHAR* pszValue, in ParseEnum() argument
293 FDE_GetCSSPropertyValueByName(CFX_WideStringC(pszValue, iValueLen)); in ParseEnum()
299 const FX_WCHAR* pszValue, in ParseColor() argument
302 if (!ParseCSSColor(pszValue, iValueLen, &dwColor)) in ParseColor()
308 const FX_WCHAR* pszValue, in ParseString() argument
311 if (!ParseCSSString(pszValue, iValueLen, &iOffset, &iValueLen)) in ParseString()
318 CFX_WideString(pszValue + iOffset, iValueLen)); in ParseString()
323 const FX_WCHAR* pszValue, in ParseValueListProperty() argument
328 CFDE_CSSValueListParser parser(pszValue, iValueLen, separator); in ParseValueListProperty()
333 while (parser.NextValue(eType, pszValue, iValueLen)) { in ParseValueListProperty()
339 if (ParseCSSNumber(pszValue, iValueLen, fValue, eNumType)) in ParseValueListProperty()
347 if (ParseCSSColor(pszValue, iValueLen, &dwColor)) { in ParseValueListProperty()
355 CFX_WideStringC(pszValue, iValueLen)); in ParseValueListProperty()
364 CFX_WideString(pszValue, iValueLen))); in ParseValueListProperty()
370 if (ParseCSSColor(pszValue, iValueLen, &dwColor)) { in ParseValueListProperty()
447 const FX_WCHAR* pszValue, in ParseBorderProperty() argument
452 CFDE_CSSValueListParser parser(pszValue, iValueLen, ' '); in ParseBorderProperty()
454 while (parser.NextValue(eType, pszValue, iValueLen)) { in ParseBorderProperty()
462 if (ParseCSSNumber(pszValue, iValueLen, fValue, eNumType)) in ParseBorderProperty()
468 FDE_GetCSSColorByName(CFX_WideStringC(pszValue, iValueLen)); in ParseBorderProperty()
473 FDE_GetCSSPropertyValueByName(CFX_WideStringC(pszValue, iValueLen)); in ParseBorderProperty()
500 void CFDE_CSSDeclaration::ParseFontProperty(const FX_WCHAR* pszValue, in ParseFontProperty() argument
503 CFDE_CSSValueListParser parser(pszValue, iValueLen, '/'); in ParseFontProperty()
511 while (parser.NextValue(eType, pszValue, iValueLen)) { in ParseFontProperty()
515 FDE_GetCSSPropertyValueByName(CFX_WideStringC(pszValue, iValueLen)); in ParseFontProperty()
566 CFX_WideString(pszValue, iValueLen))); in ParseFontProperty()
574 if (!ParseCSSNumber(pszValue, iValueLen, fValue, eNumType)) in ParseFontProperty()