aboutsummaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_variables.cpp
diff options
context:
space:
mode:
authorkumarashishg <kumarashishg@google.com>2023-06-23 13:21:22 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-12-13 18:01:36 +0000
commit326d96bf5d52fdcf790b467b13f58ba3df3e81e4 (patch)
tree6a57f6a0948032e6ec387c22d8b462215e6ca1e4 /xfa/fxfa/parser/cxfa_variables.cpp
parent8bbfdf2fca7197a0eccfef7b6fc27c590a44e7f7 (diff)
downloadpdfium-326d96bf5d52fdcf790b467b13f58ba3df3e81e4.tar.gz
Update pdfium to Chrome 114.0.5735.130 pdfium
pdfium last commit id: 9505810f6 Bug: 279055389 Test: Build the code and flash the device and check Print functionality Test: atest FrameworksCoreTests Test: atest CtsPrintTestCases Test: atest CtsPdfTestCases (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:bd17c0b8cf8436f15500ecf027db133b666141d6) Merged-In: I2efabeec0d0fa3925bcbeebf36031cee6f7f9fc4 Change-Id: I2efabeec0d0fa3925bcbeebf36031cee6f7f9fc4
Diffstat (limited to 'xfa/fxfa/parser/cxfa_variables.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_variables.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/xfa/fxfa/parser/cxfa_variables.cpp b/xfa/fxfa/parser/cxfa_variables.cpp
index 5974b9ed4..87ee907a7 100644
--- a/xfa/fxfa/parser/cxfa_variables.cpp
+++ b/xfa/fxfa/parser/cxfa_variables.cpp
@@ -1,4 +1,4 @@
-// Copyright 2017 PDFium Authors. All rights reserved.
+// Copyright 2017 The PDFium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -7,7 +7,7 @@
#include "xfa/fxfa/parser/cxfa_variables.h"
#include "fxjs/xfa/cjx_container.h"
-#include "third_party/base/ptr_util.h"
+#include "xfa/fxfa/parser/cxfa_document.h"
namespace {
@@ -19,14 +19,23 @@ const CXFA_Node::AttributeData kVariablesAttributeData[] = {
} // namespace
+// static
+CXFA_Variables* CXFA_Variables::FromNode(CXFA_Node* pNode) {
+ return pNode && pNode->GetElementType() == XFA_Element::Variables
+ ? static_cast<CXFA_Variables*>(pNode)
+ : nullptr;
+}
+
CXFA_Variables::CXFA_Variables(CXFA_Document* doc, XFA_PacketType packet)
: CXFA_Node(doc,
packet,
- (XFA_XDPPACKET_Template | XFA_XDPPACKET_Form),
+ {XFA_XDPPACKET::kTemplate, XFA_XDPPACKET::kForm},
XFA_ObjectType::ContainerNode,
XFA_Element::Variables,
{},
kVariablesAttributeData,
- pdfium::MakeUnique<CJX_Container>(this)) {}
+ cppgc::MakeGarbageCollected<CJX_Container>(
+ doc->GetHeap()->GetAllocationHandle(),
+ this)) {}
CXFA_Variables::~CXFA_Variables() = default;