#include "core/fxcrt/css/cfx_cssdeclaration.h"
#include <math.h>
#include <array>
#include <utility>
#include "core/fxcrt/check.h"
#include "core/fxcrt/check_op.h"
#include "core/fxcrt/compiler_specific.h"
#include "core/fxcrt/css/cfx_csscolorvalue.h"
#include "core/fxcrt/css/cfx_csscustomproperty.h"
#include "core/fxcrt/css/cfx_cssenumvalue.h"
#include "core/fxcrt/css/cfx_cssnumbervalue.h"
#include "core/fxcrt/css/cfx_csspropertyholder.h"
#include "core/fxcrt/css/cfx_cssstringvalue.h"
#include "core/fxcrt/css/cfx_cssvaluelist.h"
#include "core/fxcrt/css/cfx_cssvaluelistparser.h"
#include "core/fxcrt/fx_extension.h"
#include "core/fxcrt/fx_system.h"
#include "core/fxcrt/notreached.h"
namespace {
uint8_t Hex2Dec(uint8_t hexHigh, uint8_t hexLow) { … }
std::optional<CFX_CSSNumber> ParseCSSNumber(WideStringView view) { … }
}
std::optional<WideStringView> CFX_CSSDeclaration::ParseCSSString(
WideStringView value) { … }
std::optional<FX_ARGB> CFX_CSSDeclaration::ParseCSSColor(WideStringView value) { … }
CFX_CSSDeclaration::CFX_CSSDeclaration() = default;
CFX_CSSDeclaration::~CFX_CSSDeclaration() = default;
RetainPtr<CFX_CSSValue> CFX_CSSDeclaration::GetProperty(
CFX_CSSProperty eProperty,
bool* bImportant) const { … }
void CFX_CSSDeclaration::AddPropertyHolder(CFX_CSSProperty eProperty,
RetainPtr<CFX_CSSValue> pValue,
bool bImportant) { … }
void CFX_CSSDeclaration::AddProperty(const CFX_CSSData::Property* property,
WideStringView value) { … }
void CFX_CSSDeclaration::AddProperty(const WideString& prop,
const WideString& value) { … }
RetainPtr<CFX_CSSValue> CFX_CSSDeclaration::ParseNumber(WideStringView view) { … }
RetainPtr<CFX_CSSValue> CFX_CSSDeclaration::ParseEnum(WideStringView value) { … }
RetainPtr<CFX_CSSValue> CFX_CSSDeclaration::ParseColor(WideStringView value) { … }
RetainPtr<CFX_CSSValue> CFX_CSSDeclaration::ParseString(WideStringView value) { … }
void CFX_CSSDeclaration::ParseValueListProperty(
const CFX_CSSData::Property* pProperty,
WideStringView value,
bool bImportant) { … }
void CFX_CSSDeclaration::Add4ValuesProperty(
const std::vector<RetainPtr<CFX_CSSValue>>& list,
bool bImportant,
CFX_CSSProperty eLeft,
CFX_CSSProperty eTop,
CFX_CSSProperty eRight,
CFX_CSSProperty eBottom) { … }
RetainPtr<CFX_CSSValue> CFX_CSSDeclaration::ParseBorderProperty(
WideStringView value) const { … }
void CFX_CSSDeclaration::ParseFontProperty(WideStringView value,
bool bImportant) { … }
size_t CFX_CSSDeclaration::PropertyCountForTesting() const { … }