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/fde/css/cfde_csscomputedstyle.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/fde/css/cfde_csscomputedstyle.h')
-rw-r--r-- | xfa/fde/css/cfde_csscomputedstyle.h | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/xfa/fde/css/cfde_csscomputedstyle.h b/xfa/fde/css/cfde_csscomputedstyle.h index 73eb996f0d..1f73d87631 100644 --- a/xfa/fde/css/cfde_csscomputedstyle.h +++ b/xfa/fde/css/cfde_csscomputedstyle.h @@ -15,7 +15,7 @@ class CFDE_CSSValueList; -class CFDE_CSSComputedStyle : public IFX_Retainable { +class CFDE_CSSComputedStyle : public CFX_Retainable { public: class InheritedData { public: @@ -54,13 +54,6 @@ class CFDE_CSSComputedStyle : public IFX_Retainable { bool m_bHasPadding; }; - CFDE_CSSComputedStyle(); - ~CFDE_CSSComputedStyle() override; - - // IFX_Retainable - uint32_t Retain() override; - uint32_t Release() override; - int32_t CountFontFamilies() const; const CFX_WideString GetFontFamily(int32_t index) const; uint16_t GetFontWeight() const; @@ -105,7 +98,12 @@ class CFDE_CSSComputedStyle : public IFX_Retainable { NonInheritedData m_NonInheritedData; private: - uint32_t m_dwRefCount; + template <typename T, typename... Args> + friend CFX_RetainPtr<T> pdfium::MakeRetain(Args&&... args); + + CFDE_CSSComputedStyle(); + ~CFDE_CSSComputedStyle() override; + std::vector<CFX_WideString> m_CustomProperties; }; |