diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-01-23 13:55:39 -0500 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-01-23 20:24:23 +0000 |
commit | b76f49b36baffea2b2ecb90d67c7b6bb734e7bb9 (patch) | |
tree | 3331545c1296500ddf164267f4bb715c16e38bb3 /xfa/fde/css/cfde_cssrulecollection.cpp | |
parent | 6414b273506f97012f82c8a32c020b483d5df31a (diff) | |
download | pdfium-b76f49b36baffea2b2ecb90d67c7b6bb734e7bb9.tar.xz |
Remove unused author and and user stylesheets
We only load atyles from the CXFA_TextParser which loads a static UserAgent
stylesheet. This CL removes the User and Author styles from the system
and simplifies the storage of the stylesheets.
Change-Id: I7abcf39333655f8dd6bc2cfe685c8cf73b779c7d
Reviewed-on: https://pdfium-review.googlesource.com/2293
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fde/css/cfde_cssrulecollection.cpp')
-rw-r--r-- | xfa/fde/css/cfde_cssrulecollection.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/xfa/fde/css/cfde_cssrulecollection.cpp b/xfa/fde/css/cfde_cssrulecollection.cpp index 6f12105d85..7ef36f2093 100644 --- a/xfa/fde/css/cfde_cssrulecollection.cpp +++ b/xfa/fde/css/cfde_cssrulecollection.cpp @@ -34,20 +34,14 @@ CFDE_CSSRuleCollection::~CFDE_CSSRuleCollection() { Clear(); } -void CFDE_CSSRuleCollection::AddRulesFrom( - const CFX_ArrayTemplate<CFDE_CSSStyleSheet*>& sheets, - CFGAS_FontMgr* pFontMgr) { - int32_t iSheets = sheets.GetSize(); - for (int32_t i = 0; i < iSheets; ++i) { - CFDE_CSSStyleSheet* pSheet = sheets.GetAt(i); - int32_t iRules = pSheet->CountRules(); - for (int32_t j = 0; j < iRules; j++) { - AddRulesFrom(pSheet, pSheet->GetRule(j), pFontMgr); - } - } +void CFDE_CSSRuleCollection::AddRulesFrom(const CFDE_CSSStyleSheet* sheet, + CFGAS_FontMgr* pFontMgr) { + int32_t iRules = sheet->CountRules(); + for (int32_t j = 0; j < iRules; j++) + AddRulesFrom(sheet, sheet->GetRule(j), pFontMgr); } -void CFDE_CSSRuleCollection::AddRulesFrom(CFDE_CSSStyleSheet* pStyleSheet, +void CFDE_CSSRuleCollection::AddRulesFrom(const CFDE_CSSStyleSheet* pStyleSheet, CFDE_CSSStyleRule* pStyleRule, CFGAS_FontMgr* pFontMgr) { CFDE_CSSDeclaration* pDeclaration = pStyleRule->GetDeclaration(); |