summaryrefslogtreecommitdiff
path: root/xfa/fde/css
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fde/css')
-rw-r--r--xfa/fde/css/cfde_cssrulecollection.cpp8
-rw-r--r--xfa/fde/css/cfde_cssrulecollection.h6
-rw-r--r--xfa/fde/css/cfde_cssstyleselector.cpp5
-rw-r--r--xfa/fde/css/cfde_cssstyleselector.h4
4 files changed, 8 insertions, 15 deletions
diff --git a/xfa/fde/css/cfde_cssrulecollection.cpp b/xfa/fde/css/cfde_cssrulecollection.cpp
index e318651137..b945fd518b 100644
--- a/xfa/fde/css/cfde_cssrulecollection.cpp
+++ b/xfa/fde/css/cfde_cssrulecollection.cpp
@@ -33,16 +33,14 @@ CFDE_CSSRuleCollection::GetTagRuleData(const CFX_WideString& tagname) const {
return it != m_TagRules.end() ? &it->second : nullptr;
}
-void CFDE_CSSRuleCollection::AddRulesFrom(const CFDE_CSSStyleSheet* sheet,
- CFGAS_FontMgr* pFontMgr) {
+void CFDE_CSSRuleCollection::AddRulesFrom(const CFDE_CSSStyleSheet* sheet) {
int32_t iRules = sheet->CountRules();
for (int32_t j = 0; j < iRules; j++)
- AddRulesFrom(sheet, sheet->GetRule(j), pFontMgr);
+ AddRulesFrom(sheet, sheet->GetRule(j));
}
void CFDE_CSSRuleCollection::AddRulesFrom(const CFDE_CSSStyleSheet* pStyleSheet,
- CFDE_CSSStyleRule* pStyleRule,
- CFGAS_FontMgr* pFontMgr) {
+ CFDE_CSSStyleRule* pStyleRule) {
CFDE_CSSDeclaration* pDeclaration = pStyleRule->GetDeclaration();
int32_t iSelectors = pStyleRule->CountSelectorLists();
for (int32_t i = 0; i < iSelectors; ++i) {
diff --git a/xfa/fde/css/cfde_cssrulecollection.h b/xfa/fde/css/cfde_cssrulecollection.h
index 5d49922fcd..e9ce7c31d3 100644
--- a/xfa/fde/css/cfde_cssrulecollection.h
+++ b/xfa/fde/css/cfde_cssrulecollection.h
@@ -17,7 +17,6 @@ class CFDE_CSSDeclaration;
class CFDE_CSSSelector;
class CFDE_CSSStyleRule;
class CFDE_CSSStyleSheet;
-class CFGAS_FontMgr;
class CFDE_CSSRuleCollection {
public:
@@ -32,7 +31,7 @@ class CFDE_CSSRuleCollection {
CFDE_CSSRuleCollection();
~CFDE_CSSRuleCollection();
- void AddRulesFrom(const CFDE_CSSStyleSheet* sheet, CFGAS_FontMgr* pFontMgr);
+ void AddRulesFrom(const CFDE_CSSStyleSheet* sheet);
void Clear();
int32_t CountSelectors() const { return m_iSelectors; }
@@ -41,8 +40,7 @@ class CFDE_CSSRuleCollection {
private:
void AddRulesFrom(const CFDE_CSSStyleSheet* pStyleSheet,
- CFDE_CSSStyleRule* pRule,
- CFGAS_FontMgr* pFontMgr);
+ CFDE_CSSStyleRule* pRule);
std::map<uint32_t, std::vector<std::unique_ptr<Data>>> m_TagRules;
int32_t m_iSelectors;
diff --git a/xfa/fde/css/cfde_cssstyleselector.cpp b/xfa/fde/css/cfde_cssstyleselector.cpp
index 51e60bce4f..141e74c865 100644
--- a/xfa/fde/css/cfde_cssstyleselector.cpp
+++ b/xfa/fde/css/cfde_cssstyleselector.cpp
@@ -22,8 +22,7 @@
#include "xfa/fde/css/cfde_csssyntaxparser.h"
#include "xfa/fde/css/cfde_cssvaluelist.h"
-CFDE_CSSStyleSelector::CFDE_CSSStyleSelector(CFGAS_FontMgr* pFontMgr)
- : m_pFontMgr(pFontMgr), m_fDefFontSize(12.0f) {}
+CFDE_CSSStyleSelector::CFDE_CSSStyleSelector() : m_fDefFontSize(12.0f) {}
CFDE_CSSStyleSelector::~CFDE_CSSStyleSelector() {}
@@ -47,7 +46,7 @@ void CFDE_CSSStyleSelector::SetUAStyleSheet(
void CFDE_CSSStyleSelector::UpdateStyleIndex() {
m_UARules.Clear();
- m_UARules.AddRulesFrom(m_UAStyles.get(), m_pFontMgr.Get());
+ m_UARules.AddRulesFrom(m_UAStyles.get());
}
std::vector<const CFDE_CSSDeclaration*>
diff --git a/xfa/fde/css/cfde_cssstyleselector.h b/xfa/fde/css/cfde_cssstyleselector.h
index 6f40c968c7..7ead812fd2 100644
--- a/xfa/fde/css/cfde_cssstyleselector.h
+++ b/xfa/fde/css/cfde_cssstyleselector.h
@@ -23,11 +23,10 @@ class CFDE_CSSSelector;
class CFDE_CSSStyleSheet;
class CFDE_CSSValue;
class CFDE_CSSValueList;
-class CFGAS_FontMgr;
class CFDE_CSSStyleSelector {
public:
- explicit CFDE_CSSStyleSelector(CFGAS_FontMgr* pFontMgr);
+ CFDE_CSSStyleSelector();
~CFDE_CSSStyleSelector();
void SetDefFontSize(float fFontSize);
@@ -78,7 +77,6 @@ class CFDE_CSSStyleSelector {
uint32_t ToTextDecoration(const CFX_RetainPtr<CFDE_CSSValueList>& pList);
FDE_CSSFontVariant ToFontVariant(FDE_CSSPropertyValue eValue);
- CFX_UnownedPtr<CFGAS_FontMgr> const m_pFontMgr;
float m_fDefFontSize;
std::unique_ptr<CFDE_CSSStyleSheet> m_UAStyles;
CFDE_CSSRuleCollection m_UARules;