diff options
Diffstat (limited to 'xfa/fde/css')
-rw-r--r-- | xfa/fde/css/fde_cssstyleselector.cpp | 8 | ||||
-rw-r--r-- | xfa/fde/css/fde_cssstyleselector.h | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/xfa/fde/css/fde_cssstyleselector.cpp b/xfa/fde/css/fde_cssstyleselector.cpp index 1bcd161f0c..117afcc7ab 100644 --- a/xfa/fde/css/fde_cssstyleselector.cpp +++ b/xfa/fde/css/fde_cssstyleselector.cpp @@ -9,6 +9,7 @@ #include <algorithm> #include <memory> +#include "third_party/base/stl_util.h" #include "xfa/fde/css/fde_csscache.h" #include "xfa/fde/css/fde_cssdeclaration.h" #include "xfa/fde/css/fde_cssstylesheet.h" @@ -1749,7 +1750,8 @@ IFDE_CSSParagraphStyle* CFDE_CSSComputedStyle::GetParagraphStyles() { bool CFDE_CSSComputedStyle::GetCustomStyle(const CFX_WideStringC& wsName, CFX_WideString& wsValue) const { - for (int32_t i = m_CustomProperties.GetSize() - 2; i > -1; i -= 2) { + for (int32_t i = pdfium::CollectionSize<int32_t>(m_CustomProperties) - 2; + i > -1; i -= 2) { if (wsName == m_CustomProperties[i]) { wsValue = m_CustomProperties[i + 1]; return true; @@ -1895,8 +1897,8 @@ void CFDE_CSSComputedStyle::SetLetterSpacing( void CFDE_CSSComputedStyle::AddCustomStyle(const CFX_WideString& wsName, const CFX_WideString& wsValue) { - m_CustomProperties.Add(wsName); - m_CustomProperties.Add(wsValue); + m_CustomProperties.push_back(wsName); + m_CustomProperties.push_back(wsValue); } CFDE_CSSInheritedData::CFDE_CSSInheritedData() { diff --git a/xfa/fde/css/fde_cssstyleselector.h b/xfa/fde/css/fde_cssstyleselector.h index 0096b7a34a..81566a93b1 100644 --- a/xfa/fde/css/fde_cssstyleselector.h +++ b/xfa/fde/css/fde_cssstyleselector.h @@ -414,7 +414,7 @@ class CFDE_CSSComputedStyle : public IFDE_CSSComputedStyle, IFX_MemoryAllocator* const m_pAllocator; CFDE_CSSInheritedData m_InheritedData; CFDE_CSSNonInheritedData m_NonInheritedData; - CFX_WideStringArray m_CustomProperties; + std::vector<CFX_WideString> m_CustomProperties; }; #endif // XFA_FDE_CSS_FDE_CSSSTYLESELECTOR_H_ |