7#ifndef CORE_FXCRT_CSS_CFX_CSSDECLARATION_H_
8#define CORE_FXCRT_CSS_CFX_CSSDECLARATION_H_
13#include "core/fxcrt/css/cfx_cssdata.h"
14#include "core/fxcrt/retain_ptr.h"
38 bool* bImportant)
const;
44 return custom_properties_.begin();
48 bool empty()
const {
return properties_.empty(); }
51 void AddProperty(
const WideString& prop,
const WideString& value);
57 FX_ARGB* dwColor)
const;
60 void ParseFontProperty(
const wchar_t* pszValue,
63 bool ParseBorderProperty(
const wchar_t* pszValue,
67 const wchar_t* pszValue,
70 void Add4ValuesProperty(
const std::vector<RetainPtr<CFX_CSSValue>>& list,
86 std::vector<std::unique_ptr<CFX_CSSPropertyHolder>> properties_;
87 std::vector<std::unique_ptr<CFX_CSSCustomProperty>> custom_properties_;
@ CFX_CSSVALUETYPE_Shorthand
@ CFX_CSSVALUETYPE_Primitive
@ CFX_CSSVALUETYPE_MaybeEnum
@ CFX_CSSVALUETYPE_MaybeString
@ CFX_CSSVALUETYPE_MaybeColor
@ CFX_CSSVALUETYPE_MaybeNumber
static const Color * GetColorByName(WideStringView wsName)
static const LengthUnit * GetLengthUnitByName(WideStringView wsName)
static const PropertyValue * GetPropertyValueByName(WideStringView wsName)
static bool ParseCSSString(const wchar_t *pszValue, size_t nValueLen, size_t *nOffset, size_t *nLength)
FX_ARGB ParseColorForTest(const wchar_t *pszValue, size_t nValueLen, FX_ARGB *dwColor) const
const_prop_iterator end() const
void AddProperty(const CFX_CSSData::Property *property, WideStringView value)
const_prop_iterator begin() const
void AddProperty(const WideString &prop, const WideString &value)
size_t PropertyCountForTesting() const
const_custom_iterator custom_begin() const
const_custom_iterator custom_end() const
RetainPtr< CFX_CSSValue > GetProperty(CFX_CSSProperty eProperty, bool *bImportant) const
static bool ParseCSSColor(const wchar_t *pszValue, size_t nValueLen, FX_ARGB *dwColor)
constexpr FX_ARGB ArgbEncode(uint32_t a, uint32_t r, uint32_t g, uint32_t b)
int FXSYS_HexCharToInt(char c)
int FXSYS_roundf(float f)
CFX_CSSNumberValue::Unit type
CFX_CSSPropertyValue eName