Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
cjx_container.cpp
Go to the documentation of this file.
1// Copyright 2017 The PDFium Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7#include "fxjs/xfa/cjx_container.h"
8
9#include "core/fxcrt/span.h"
10#include "fxjs/xfa/cfxjse_class.h"
11#include "fxjs/xfa/cfxjse_engine.h"
12#include "fxjs/xfa/cfxjse_value.h"
13#include "v8/include/cppgc/allocation.h"
14#include "v8/include/v8-object.h"
15#include "xfa/fxfa/parser/cxfa_arraynodelist.h"
16#include "xfa/fxfa/parser/cxfa_document.h"
17#include "xfa/fxfa/parser/cxfa_field.h"
18
19const CJX_MethodSpec CJX_Container::MethodSpecs[] = {
20 {"getDelta", getDelta_static},
21 {"getDeltas", getDeltas_static}};
22
24 DefineMethods(MethodSpecs);
25}
26
27CJX_Container::~CJX_Container() = default;
28
30 return eType == static_type__ || ParentType__::DynamicTypeIs(eType);
31}
32
33CJS_Result CJX_Container::getDelta(CFXJSE_Engine* runtime,
34 pdfium::span<v8::Local<v8::Value>> params) {
36}
37
38CJS_Result CJX_Container::getDeltas(CFXJSE_Engine* runtime,
39 pdfium::span<v8::Local<v8::Value>> params) {
40 CXFA_Document* pDoc = GetDocument();
41 auto* pList = cppgc::MakeGarbageCollected<CXFA_ArrayNodeList>(
42 pDoc->GetHeap()->GetAllocationHandle(), pDoc);
44 return CJS_Result::Success(runtime->NewNormalXFAObject(pList));
45}
friend class EventParamScope
static CJS_Result Success()
Definition cjs_result.h:28
bool DynamicTypeIs(TypeTag eType) const override
~CJX_Container() override
CJX_Container(CXFA_Node *node)
bool DynamicTypeIs(TypeTag eType) const override
Definition cjx_node.cpp:112
CJX_Node(CXFA_Node *node)
Definition cjx_node.cpp:106
CXFA_Document * GetDocument() const
CXFA_NodeOwner * GetNodeOwner()
void PersistList(CXFA_List *list)