summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_treelist.cpp
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2017-12-13 21:57:12 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-12-13 21:57:12 +0000
commit604f5b9e042267cffd8949f309a86c370a3d01d4 (patch)
tree4d671f259e0c423ae012dc831c7165c4a32e89a5 /xfa/fxfa/parser/cxfa_treelist.cpp
parent2614250d4f11ed02033a7da095a1694ece12ab78 (diff)
downloadpdfium-chromium/3294.tar.xz
Refactor CFXA_*List constructorschromium/3294
This removes the double adding to the cache list in the engine that is occuring for TreeList. It also sets the correct TreeList specific values at the Object level. BUG=pdfium:665 Change-Id: Ie972daee4c638f34ad207f6502dc6d34cbebf1b6 Reviewed-on: https://pdfium-review.googlesource.com/21171 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_treelist.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_treelist.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/xfa/fxfa/parser/cxfa_treelist.cpp b/xfa/fxfa/parser/cxfa_treelist.cpp
index 520818c94a..754c80d661 100644
--- a/xfa/fxfa/parser/cxfa_treelist.cpp
+++ b/xfa/fxfa/parser/cxfa_treelist.cpp
@@ -16,10 +16,11 @@
#include "xfa/fxfa/parser/cxfa_node.h"
CXFA_TreeList::CXFA_TreeList(CXFA_Document* pDocument)
- : CXFA_List(pDocument, pdfium::MakeUnique<CJX_TreeList>(this)) {
- m_pDocument->GetScriptContext()->AddToCacheList(
- std::unique_ptr<CXFA_TreeList>(this));
-}
+ : CXFA_List(pDocument,
+ XFA_ObjectType::TreeList,
+ XFA_Element::TreeList,
+ WideStringView(L"treeList"),
+ pdfium::MakeUnique<CJX_TreeList>(this)) {}
CXFA_TreeList::~CXFA_TreeList() {}