7#ifndef CORE_FXCRT_CSS_CFX_CSSDECLARATION_H_
8#define CORE_FXCRT_CSS_CFX_CSSDECLARATION_H_
14#include "core/fxcrt/css/cfx_cssdata.h"
15#include "core/fxcrt/retain_ptr.h"
16#include "core/fxcrt/widestring.h"
35 bool* bImportant)
const;
37 bool empty()
const {
return properties_.empty(); }
42 return custom_properties_.begin();
62 void Add4ValuesProperty(
const std::vector<RetainPtr<CFX_CSSValue>>& list,
76 std::vector<std::unique_ptr<CFX_CSSPropertyHolder>> properties_;
77 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)
const_prop_iterator end() const
void AddProperty(const CFX_CSSData::Property *property, WideStringView value)
const_prop_iterator begin() const
static std::optional< WideStringView > ParseCSSString(WideStringView value)
void AddProperty(const WideString &prop, const WideString &value)
size_t PropertyCountForTesting() const
const_custom_iterator custom_begin() const
std::optional< FX_ARGB > ParseColorForTest(WideStringView value)
const_custom_iterator custom_end() const
static std::optional< FX_ARGB > ParseCSSColor(WideStringView value)
RetainPtr< CFX_CSSValue > GetProperty(CFX_CSSProperty eProperty, bool *bImportant) const
std::optional< Result > NextValue()
constexpr FX_ARGB ArgbEncode(uint32_t a, uint32_t r, uint32_t g, uint32_t b)
int FXSYS_HexCharToInt(char c)
#define NOTREACHED_NORETURN()
fxcrt::WideStringView WideStringView
CFX_CSSPropertyValue eName
fxcrt::WideString WideString