7#ifndef CORE_FXCRT_CSS_CFX_CSSSYNTAXPARSER_H_
8#define CORE_FXCRT_CSS_CFX_CSSSYNTAXPARSER_H_
12#include "core/fxcrt/css/cfx_cssinputtextbuf.h"
13#include "core/fxcrt/css/cfx_cssoutputtextbuf.h"
14#include "core/fxcrt/widestring.h"
38 enum class Mode : uint8_t {
46 void SaveMode(Mode eMode);
49 bool m_bHasError =
false;
50 Mode m_eMode = Mode::kRuleSet;
53 std::stack<Mode> m_ModeStack;
Data(CFX_CSSSelector *pSel, CFX_CSSDeclaration *pDecl)
const std::vector< std::unique_ptr< Data > > * GetTagRuleData(const WideString &tagname) const
void SetRulesFromSheet(const CFX_CSSStyleSheet *sheet)
bool is_descendant() const
static std::unique_ptr< CFX_CSSSelector > FromString(WideStringView str)
uint32_t name_hash() const
CFX_CSSSelector(WideStringView str, std::unique_ptr< CFX_CSSSelector > next)
const CFX_CSSSelector * next_selector() const
CFX_CSSDeclaration * GetDeclaration()
CFX_CSSSelector * GetSelectorList(size_t index) const
size_t CountSelectorLists() const
void SetSelector(std::vector< std::unique_ptr< CFX_CSSSelector > > *list)
size_t CountRules() const
bool LoadBuffer(WideStringView buffer)
CFX_CSSStyleRule * GetRule(size_t index) const
CFX_CSSSyntaxParser(WideStringView str)
WideStringView GetCurrentString() const
void SetParseOnlyDeclarations()