Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(540)

Unified Diff: xfa/fde/css/fde_cssstylesheet.cpp

Issue 2162503003: Cleanup fgas/crt. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Win fixes Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fde/css/fde_cssstylesheet.h ('k') | xfa/fde/css/fde_csssyntax.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fde/css/fde_cssstylesheet.cpp
diff --git a/xfa/fde/css/fde_cssstylesheet.cpp b/xfa/fde/css/fde_cssstylesheet.cpp
index 87137c42590ec276b46a0e500a922e4e6429b15c..99beab8cf6082098fc33bc1746a53e2b1b5b8cb2 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) {
« no previous file with comments | « xfa/fde/css/fde_cssstylesheet.h ('k') | xfa/fde/css/fde_csssyntax.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698