From 94fc2af0c9a800f39e4dbcac859f1ad490f7d725 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Mon, 8 Jan 2018 15:12:10 -0500 Subject: Move CXFA_WidgetAcc from CJX_Object to CXFA_Object This CL change the CJX code to not store the pointer to the CXFA_WidgetAcc. If needed the CJX object gets the Acc from the Node itself. Change-Id: I5a5a500b8fbc1749d362346d72678acd5250d112 Reviewed-on: https://pdfium-review.googlesource.com/22411 Reviewed-by: Henrique Nakashima Commit-Queue: dsinclair --- xfa/fxfa/parser/cxfa_object.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'xfa/fxfa/parser/cxfa_object.cpp') diff --git a/xfa/fxfa/parser/cxfa_object.cpp b/xfa/fxfa/parser/cxfa_object.cpp index 666186c4ba..7c73db0ff5 100644 --- a/xfa/fxfa/parser/cxfa_object.cpp +++ b/xfa/fxfa/parser/cxfa_object.cpp @@ -11,6 +11,7 @@ #include "core/fxcrt/fx_extension.h" #include "fxjs/cfxjse_engine.h" #include "fxjs/cfxjse_value.h" +#include "third_party/base/ptr_util.h" #include "xfa/fxfa/cxfa_ffnotify.h" #include "xfa/fxfa/parser/cxfa_document.h" #include "xfa/fxfa/parser/cxfa_node.h" @@ -55,6 +56,10 @@ const CXFA_TreeList* CXFA_Object::AsTreeList() const { return IsTreeList() ? static_cast(this) : nullptr; } +void CXFA_Object::CreateWidgetAcc() { + acc_ = pdfium::MakeUnique(AsNode()); +} + CXFA_Node* ToNode(CXFA_Object* pObj) { return pObj ? pObj->AsNode() : nullptr; } -- cgit v1.2.3