From 8f3eb6051c0465923d6694bd0f0b6dc5bb51cbe3 Mon Sep 17 00:00:00 2001 From: npm Date: Fri, 11 Nov 2016 17:16:23 -0800 Subject: Remove IFGAS_FontMgr and clean up (the renamed) CFGAS_FontMgr a little. IFGAS_FontMgr is an interface only for a class only defined on Windows, plus a class only defined for non-Windows. I'm removing the interface, renaming the class to have the same name in both cases, and cleaning up a bit of unused methods. Review-Url: https://codereview.chromium.org/2494883002 --- xfa/fde/css/cfde_cssrulecollection.cpp | 4 ++-- xfa/fde/css/fde_css.h | 2 +- xfa/fde/css/fde_cssstyleselector.cpp | 2 +- xfa/fde/css/fde_cssstyleselector.h | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'xfa/fde/css') diff --git a/xfa/fde/css/cfde_cssrulecollection.cpp b/xfa/fde/css/cfde_cssrulecollection.cpp index 70cc655a56..28a482b834 100644 --- a/xfa/fde/css/cfde_cssrulecollection.cpp +++ b/xfa/fde/css/cfde_cssrulecollection.cpp @@ -39,7 +39,7 @@ CFDE_CSSRuleCollection::~CFDE_CSSRuleCollection() { void CFDE_CSSRuleCollection::AddRulesFrom(const CFDE_CSSStyleSheetArray& sheets, uint32_t dwMediaList, - IFGAS_FontMgr* pFontMgr) { + CFGAS_FontMgr* pFontMgr) { int32_t iSheets = sheets.GetSize(); for (int32_t i = 0; i < iSheets; ++i) { IFDE_CSSStyleSheet* pSheet = sheets.GetAt(i); @@ -55,7 +55,7 @@ void CFDE_CSSRuleCollection::AddRulesFrom(const CFDE_CSSStyleSheetArray& sheets, void CFDE_CSSRuleCollection::AddRulesFrom(IFDE_CSSStyleSheet* pStyleSheet, IFDE_CSSRule* pRule, uint32_t dwMediaList, - IFGAS_FontMgr* pFontMgr) { + CFGAS_FontMgr* pFontMgr) { switch (pRule->GetType()) { case FDE_CSSRULETYPE_Style: { IFDE_CSSStyleRule* pStyleRule = static_cast(pRule); diff --git a/xfa/fde/css/fde_css.h b/xfa/fde/css/fde_css.h index 1ee037537c..b9a0d2be5d 100644 --- a/xfa/fde/css/fde_css.h +++ b/xfa/fde/css/fde_css.h @@ -10,7 +10,7 @@ #include "core/fxge/fx_dib.h" #include "xfa/fgas/crt/fgas_stream.h" #include "xfa/fgas/crt/fgas_utils.h" -#include "xfa/fgas/font/fgas_font.h" +#include "xfa/fgas/font/cfgas_fontmgr.h" class CFDE_CSSAccelerator; class CFDE_CSSDeclaration; diff --git a/xfa/fde/css/fde_cssstyleselector.cpp b/xfa/fde/css/fde_cssstyleselector.cpp index 3eef4e4a4a..1bcd161f0c 100644 --- a/xfa/fde/css/fde_cssstyleselector.cpp +++ b/xfa/fde/css/fde_cssstyleselector.cpp @@ -106,7 +106,7 @@ FDE_CSSRuleData::FDE_CSSRuleData(CFDE_CSSSelector* pSel, } } -CFDE_CSSStyleSelector::CFDE_CSSStyleSelector(IFGAS_FontMgr* pFontMgr) +CFDE_CSSStyleSelector::CFDE_CSSStyleSelector(CFGAS_FontMgr* pFontMgr) : m_pFontMgr(pFontMgr), m_fDefFontSize(12.0f) { m_ePriorities[FDE_CSSSTYLESHEETPRIORITY_High] = FDE_CSSSTYLESHEETGROUP_Author; m_ePriorities[FDE_CSSSTYLESHEETPRIORITY_Mid] = FDE_CSSSTYLESHEETGROUP_User; diff --git a/xfa/fde/css/fde_cssstyleselector.h b/xfa/fde/css/fde_cssstyleselector.h index d72c9bf0cd..8ef3885823 100644 --- a/xfa/fde/css/fde_cssstyleselector.h +++ b/xfa/fde/css/fde_cssstyleselector.h @@ -39,7 +39,7 @@ class CFDE_CSSRuleCollection : public CFX_Target { void AddRulesFrom(const CFDE_CSSStyleSheetArray& sheets, uint32_t dwMediaList, - IFGAS_FontMgr* pFontMgr); + CFGAS_FontMgr* pFontMgr); void Clear(); int32_t CountSelectors() const { return m_iSelectors; } @@ -70,7 +70,7 @@ class CFDE_CSSRuleCollection : public CFX_Target { void AddRulesFrom(IFDE_CSSStyleSheet* pStyleSheet, IFDE_CSSRule* pRule, uint32_t dwMediaList, - IFGAS_FontMgr* pFontMgr); + CFGAS_FontMgr* pFontMgr); void AddRuleTo(CFX_MapPtrToPtr& map, uint32_t dwKey, CFDE_CSSSelector* pSel, @@ -88,7 +88,7 @@ class CFDE_CSSRuleCollection : public CFX_Target { class CFDE_CSSStyleSelector : public CFX_Target { public: - explicit CFDE_CSSStyleSelector(IFGAS_FontMgr* pFontMgr); + explicit CFDE_CSSStyleSelector(CFGAS_FontMgr* pFontMgr); ~CFDE_CSSStyleSelector() override; void SetDefFontSize(FX_FLOAT fFontSize); @@ -172,7 +172,7 @@ class CFDE_CSSStyleSelector : public CFX_Target { FDE_CSSRUBYPOSITION ToRubyPosition(FDE_CSSPROPERTYVALUE eValue); FDE_CSSRUBYSPAN ToRubySpan(FDE_CSSPROPERTYVALUE eValue); - IFGAS_FontMgr* const m_pFontMgr; + CFGAS_FontMgr* const m_pFontMgr; FX_FLOAT m_fDefFontSize; std::unique_ptr m_pRuleDataStore; CFDE_CSSStyleSheetArray m_SheetGroups[FDE_CSSSTYLESHEETGROUP_MAX]; -- cgit v1.2.3