summaryrefslogtreecommitdiff
path: root/xfa/fde/css/cfde_cssstylesheet.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-01-23 13:55:39 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-01-23 20:24:23 +0000
commitb76f49b36baffea2b2ecb90d67c7b6bb734e7bb9 (patch)
tree3331545c1296500ddf164267f4bb715c16e38bb3 /xfa/fde/css/cfde_cssstylesheet.cpp
parent6414b273506f97012f82c8a32c020b483d5df31a (diff)
downloadpdfium-b76f49b36baffea2b2ecb90d67c7b6bb734e7bb9.tar.xz
Remove unused author and and user stylesheets
We only load atyles from the CXFA_TextParser which loads a static UserAgent stylesheet. This CL removes the User and Author styles from the system and simplifies the storage of the stylesheets. Change-Id: I7abcf39333655f8dd6bc2cfe685c8cf73b779c7d Reviewed-on: https://pdfium-review.googlesource.com/2293 Reviewed-by: Nicolás Peña <npm@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fde/css/cfde_cssstylesheet.cpp')
-rw-r--r--xfa/fde/css/cfde_cssstylesheet.cpp15
1 files changed, 2 insertions, 13 deletions
diff --git a/xfa/fde/css/cfde_cssstylesheet.cpp b/xfa/fde/css/cfde_cssstylesheet.cpp
index 7dc122f1da..b05e837f95 100644
--- a/xfa/fde/css/cfde_cssstylesheet.cpp
+++ b/xfa/fde/css/cfde_cssstylesheet.cpp
@@ -15,7 +15,7 @@
#include "xfa/fde/css/fde_cssdatatable.h"
#include "xfa/fgas/crt/fgas_codepage.h"
-CFDE_CSSStyleSheet::CFDE_CSSStyleSheet() : m_wRefCount(1) {}
+CFDE_CSSStyleSheet::CFDE_CSSStyleSheet() {}
CFDE_CSSStyleSheet::~CFDE_CSSStyleSheet() {
Reset();
@@ -26,22 +26,11 @@ void CFDE_CSSStyleSheet::Reset() {
m_StringCache.clear();
}
-uint32_t CFDE_CSSStyleSheet::Retain() {
- return ++m_wRefCount;
-}
-
-uint32_t CFDE_CSSStyleSheet::Release() {
- uint32_t dwRefCount = --m_wRefCount;
- if (dwRefCount == 0)
- delete this;
- return dwRefCount;
-}
-
int32_t CFDE_CSSStyleSheet::CountRules() const {
return pdfium::CollectionSize<int32_t>(m_RuleArray);
}
-CFDE_CSSStyleRule* CFDE_CSSStyleSheet::GetRule(int32_t index) {
+CFDE_CSSStyleRule* CFDE_CSSStyleSheet::GetRule(int32_t index) const {
return m_RuleArray[index].get();
}