7#include "core/fxcrt/css/cfx_cssrulecollection.h"
12#include "core/fxcrt/css/cfx_cssdeclaration.h"
13#include "core/fxcrt/css/cfx_cssselector.h"
14#include "core/fxcrt/css/cfx_cssstylerule.h"
15#include "core/fxcrt/css/cfx_cssstylesheet.h"
16#include "core/fxcrt/css/cfx_csssyntaxparser.h"
24 auto it = m_TagRules.find(FX_HashCode_GetLoweredW(tagname.AsStringView()));
25 return it != m_TagRules.end() ? &it->second :
nullptr;
30 for (size_t i = 0; i < sheet->CountRules(); ++i)
31 AddRule(sheet->GetRule(i));
36 size_t nSelectors = pStyleRule->CountSelectorLists();
37 for (size_t i = 0; i < nSelectors; ++i) {
39 m_TagRules[pSelector->name_hash()].push_back(
40 std::make_unique<Data>(pSelector, pDeclaration));
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)
CFX_CSSDeclaration * GetDeclaration()