diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-01-23 16:24:26 -0500 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-01-24 15:05:29 +0000 |
commit | 7e5fdd0b1a2ce17e89723fee3e58ae472e32461f (patch) | |
tree | e8e14a43410d3d159cef27a0140c4fa8a633f8db /xfa/fxfa/app/cxfa_textparser.h | |
parent | aee2d80f628ba02d0561c921b7bb1939b3480fca (diff) | |
download | pdfium-7e5fdd0b1a2ce17e89723fee3e58ae472e32461f.tar.xz |
Track CFDE_CSSComputedStyle with retained ptrs
Remove the bare new and use CFX_RetainPtr to keep track of the computed styles.
Change-Id: Icf235623529797176707482c78676814b7a81b9e
Reviewed-on: https://pdfium-review.googlesource.com/2292
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/app/cxfa_textparser.h')
-rw-r--r-- | xfa/fxfa/app/cxfa_textparser.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/xfa/fxfa/app/cxfa_textparser.h b/xfa/fxfa/app/cxfa_textparser.h index 7a94f83aeb..9332dfc9e1 100644 --- a/xfa/fxfa/app/cxfa_textparser.h +++ b/xfa/fxfa/app/cxfa_textparser.h @@ -33,9 +33,11 @@ class CXFA_TextParser { void Reset(); void DoParse(CFDE_XMLNode* pXMLContainer, CXFA_TextProvider* pTextProvider); - CFDE_CSSComputedStyle* CreateRootStyle(CXFA_TextProvider* pTextProvider); - CFDE_CSSComputedStyle* ComputeStyle(CFDE_XMLNode* pXMLNode, - CFDE_CSSComputedStyle* pParentStyle); + CFX_RetainPtr<CFDE_CSSComputedStyle> CreateRootStyle( + CXFA_TextProvider* pTextProvider); + CFX_RetainPtr<CFDE_CSSComputedStyle> ComputeStyle( + CFDE_XMLNode* pXMLNode, + CFDE_CSSComputedStyle* pParentStyle); bool IsParsed() const { return m_bParsed; } @@ -89,7 +91,8 @@ class CXFA_TextParser { CFDE_CSSComputedStyle* pParentStyle); void ParseTagInfo(CFDE_XMLNode* pXMLNode, CXFA_CSSTagProvider& tagProvider); std::unique_ptr<CFDE_CSSStyleSheet> LoadDefaultSheetStyle(); - CFDE_CSSComputedStyle* CreateStyle(CFDE_CSSComputedStyle* pParentStyle); + CFX_RetainPtr<CFDE_CSSComputedStyle> CreateStyle( + CFDE_CSSComputedStyle* pParentStyle); std::unique_ptr<CFDE_CSSStyleSelector> m_pSelector; std::map<CFDE_XMLNode*, CXFA_TextParseContext*> m_mapXMLNodeToParseContext; |