diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-02-08 10:05:05 -0500 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-02-09 15:55:20 +0000 |
commit | 21e954b59fcef1b84fdcdb9ae337e2d4c060b19e (patch) | |
tree | 2053cd0a8b0d4c1bb6903db3aa6f753a23afedcf /xfa/fde/css/cfde_csscomputedstyle.h | |
parent | 1b08df18300bbc67dabd12fb35ab6ce1732a1024 (diff) | |
download | pdfium-21e954b59fcef1b84fdcdb9ae337e2d4c060b19e.tar.xz |
Remove CopyToLocal from CFDE_CSSDeclaration
This CL removes the CopyToLocal method and creates CFX_WideString's directly.
This fixes several memory leaks as the CopyToLocal strings were not cleaned
up correctly.
Change-Id: Ie5ba4cdc4d713cd0b8e3fb85e02f27dc09f38af1
Reviewed-on: https://pdfium-review.googlesource.com/2553
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 | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xfa/fde/css/cfde_csscomputedstyle.h b/xfa/fde/css/cfde_csscomputedstyle.h index 1f73d87631..92d832eff7 100644 --- a/xfa/fde/css/cfde_csscomputedstyle.h +++ b/xfa/fde/css/cfde_csscomputedstyle.h @@ -11,6 +11,7 @@ #include "core/fxcrt/fx_basic.h" #include "core/fxcrt/fx_string.h" +#include "xfa/fde/css/cfde_csscustomproperty.h" #include "xfa/fde/css/fde_css.h" class CFDE_CSSValueList; @@ -88,10 +89,9 @@ class CFDE_CSSComputedStyle : public CFX_Retainable { void SetNumberVerticalAlign(FX_FLOAT fAlign); void SetTextDecoration(uint32_t dwTextDecoration); void SetLetterSpacing(const FDE_CSSLength& letterSpacing); - void AddCustomStyle(const CFX_WideString& wsName, - const CFX_WideString& wsValue); + void AddCustomStyle(const CFDE_CSSCustomProperty& prop); - bool GetCustomStyle(const CFX_WideStringC& wsName, + bool GetCustomStyle(const CFX_WideString& wsName, CFX_WideString& wsValue) const; InheritedData m_InheritedData; @@ -104,7 +104,7 @@ class CFDE_CSSComputedStyle : public CFX_Retainable { CFDE_CSSComputedStyle(); ~CFDE_CSSComputedStyle() override; - std::vector<CFX_WideString> m_CustomProperties; + std::vector<CFDE_CSSCustomProperty> m_CustomProperties; }; #endif // XFA_FDE_CSS_CFDE_CSSCOMPUTEDSTYLE_H_ |