summaryrefslogtreecommitdiff
path: root/xfa/fde/css/fde_cssstylesheet.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-01-17 16:03:48 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-01-17 22:07:32 +0000
commita715f524e66a1fd8b974f6e2af0db3c23b8c5190 (patch)
tree07c7f5a82b6528e99a26b5bc87260e4787b1bf5c /xfa/fde/css/fde_cssstylesheet.h
parent3285c56b0dd6b83c2fcc8b8f714324185a09c920 (diff)
downloadpdfium-a715f524e66a1fd8b974f6e2af0db3c23b8c5190.tar.xz
More css parser tests; more memory fixes.
Change-Id: I929b00204e05eea71c6fd4d52e480cc9c6d6018e Reviewed-on: https://pdfium-review.googlesource.com/2230 Reviewed-by: Nicolás Peña <npm@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fde/css/fde_cssstylesheet.h')
-rw-r--r--xfa/fde/css/fde_cssstylesheet.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/xfa/fde/css/fde_cssstylesheet.h b/xfa/fde/css/fde_cssstylesheet.h
index 7acccd5776..46c0897694 100644
--- a/xfa/fde/css/fde_cssstylesheet.h
+++ b/xfa/fde/css/fde_cssstylesheet.h
@@ -51,16 +51,16 @@ class CFDE_CSSStyleRule : public CFDE_CSSRule {
CFDE_CSSStyleRule();
~CFDE_CSSStyleRule() override;
- int32_t CountSelectorLists() const;
+ size_t CountSelectorLists() const;
CFDE_CSSSelector* GetSelectorList(int32_t index) const;
CFDE_CSSDeclaration* GetDeclaration();
CFDE_CSSDeclaration& GetDeclImp() { return m_Declaration; }
- void SetSelector(const std::vector<std::unique_ptr<CFDE_CSSSelector>>& list);
+
+ void SetSelector(std::vector<std::unique_ptr<CFDE_CSSSelector>>* list);
private:
CFDE_CSSDeclaration m_Declaration;
- std::vector<CFDE_CSSSelector*> m_ppSelector; // Owned by the stylessheet.
- int32_t m_iSelectors;
+ std::vector<std::unique_ptr<CFDE_CSSSelector>> m_ppSelector;
};
class CFDE_CSSMediaRule : public CFDE_CSSRule {
@@ -126,7 +126,6 @@ class CFDE_CSSStyleSheet : public IFX_Retainable {
uint32_t m_dwMediaList;
std::vector<std::unique_ptr<CFDE_CSSRule>> m_RuleArray;
CFX_WideString m_szUrl;
- std::vector<std::unique_ptr<CFDE_CSSSelector>> m_Selectors;
std::unordered_map<uint32_t, FX_WCHAR*> m_StringCache;
};