diff options
author | dsinclair <dsinclair@chromium.org> | 2016-07-18 13:14:49 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-07-18 13:14:49 -0700 |
commit | 34965459f4f53a77f6c925292304eface57d12c6 (patch) | |
tree | 788cb62af316f8b5c5d520583eaa0313dd48144e /xfa/fde/css/fde_cssstylesheet.cpp | |
parent | aae4566ee8b2eaffb182861047c466ed1ec04902 (diff) | |
download | pdfium-34965459f4f53a77f6c925292304eface57d12c6.tar.xz |
Cleanup fgas/crt.
This CL removes unused methods and default parameters from the fgas/crt code.
Review-Url: https://codereview.chromium.org/2162503003
Diffstat (limited to 'xfa/fde/css/fde_cssstylesheet.cpp')
-rw-r--r-- | xfa/fde/css/fde_cssstylesheet.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/xfa/fde/css/fde_cssstylesheet.cpp b/xfa/fde/css/fde_cssstylesheet.cpp index 87137c4259..99beab8cf6 100644 --- a/xfa/fde/css/fde_cssstylesheet.cpp +++ b/xfa/fde/css/fde_cssstylesheet.cpp @@ -78,7 +78,8 @@ CFDE_CSSStyleSheet::CFDE_CSSStyleSheet(uint32_t dwMediaList) : m_wCodePage(FX_CODEPAGE_UTF8), m_wRefCount(1), m_dwMediaList(dwMediaList), - m_pAllocator(nullptr) { + m_pAllocator(nullptr), + m_RuleArray(100) { ASSERT(m_dwMediaList > 0); } @@ -104,7 +105,7 @@ void CFDE_CSSStyleSheet::Reset() { break; } } - m_RuleArray.RemoveAll(); + m_RuleArray.RemoveAll(FALSE); m_Selectors.RemoveAll(); m_StringCache.clear(); delete m_pAllocator; @@ -241,7 +242,7 @@ FDE_CSSSYNTAXSTATUS CFDE_CSSStyleSheet::LoadMediaRule( FDE_CSSSYNTAXSTATUS CFDE_CSSStyleSheet::LoadStyleRule( CFDE_CSSSyntaxParser* pSyntax, - CFDE_CSSRuleArray& ruleArray) { + CFX_MassArrayTemplate<IFDE_CSSRule*>& ruleArray) { m_Selectors.RemoveAt(0, m_Selectors.GetSize()); CFDE_CSSStyleRule* pStyleRule = nullptr; const FX_WCHAR* pszValue = nullptr; @@ -306,7 +307,7 @@ FDE_CSSSYNTAXSTATUS CFDE_CSSStyleSheet::LoadStyleRule( FDE_CSSSYNTAXSTATUS CFDE_CSSStyleSheet::LoadFontFaceRule( CFDE_CSSSyntaxParser* pSyntax, - CFDE_CSSRuleArray& ruleArray) { + CFX_MassArrayTemplate<IFDE_CSSRule*>& ruleArray) { CFDE_CSSFontFaceRule* pFontFaceRule = nullptr; const FX_WCHAR* pszValue = nullptr; int32_t iValueLen = 0; @@ -392,8 +393,9 @@ CFDE_CSSDeclaration* CFDE_CSSStyleRule::GetDeclaration() { return &m_Declaration; } -void CFDE_CSSStyleRule::SetSelector(IFX_MemoryAllocator* pStaticStore, - const CFDE_CSSSelectorArray& list) { +void CFDE_CSSStyleRule::SetSelector( + IFX_MemoryAllocator* pStaticStore, + const CFX_ArrayTemplate<CFDE_CSSSelector*>& list) { ASSERT(!m_ppSelector); m_iSelectors = list.GetSize(); m_ppSelector = static_cast<CFDE_CSSSelector**>( @@ -404,7 +406,7 @@ void CFDE_CSSStyleRule::SetSelector(IFX_MemoryAllocator* pStaticStore, } CFDE_CSSMediaRule::CFDE_CSSMediaRule(uint32_t dwMediaList) - : m_dwMediaList(dwMediaList) {} + : m_dwMediaList(dwMediaList), m_RuleArray(100) {} CFDE_CSSMediaRule::~CFDE_CSSMediaRule() { for (int32_t i = m_RuleArray.GetSize() - 1; i >= 0; --i) { |