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 <vector>
10
11#include "fxjs/xfa/cfxjse_class.h"
12#include "fxjs/xfa/cfxjse_engine.h"
13#include "fxjs/xfa/cfxjse_value.h"
14#include "third_party/base/containers/span.h"
15#include "v8/include/cppgc/allocation.h"
16#include "v8/include/v8-object.h"
17#include "xfa/fxfa/parser/cxfa_arraynodelist.h"
18#include "xfa/fxfa/parser/cxfa_document.h"
19#include "xfa/fxfa/parser/cxfa_field.h"
20
21const CJX_MethodSpec CJX_Container::MethodSpecs[] = {
22 {"getDelta", getDelta_static},
23 {"getDeltas", getDeltas_static}};
24
28
29CJX_Container::~CJX_Container() = default;
30
32 return eType == static_type__ || ParentType__::DynamicTypeIs(eType);
33}
34
35CJS_Result CJX_Container::getDelta(CFXJSE_Engine* runtime,
36 pdfium::span<v8::Local<v8::Value>> params) {
38}
39
40CJS_Result CJX_Container::getDeltas(CFXJSE_Engine* runtime,
41 pdfium::span<v8::Local<v8::Value>> params) {
42 CXFA_Document* pDoc = GetDocument();
43 auto* pList = cppgc::MakeGarbageCollected<CXFA_ArrayNodeList>(
44 pDoc->GetHeap()->GetAllocationHandle(), pDoc);
46 return CJS_Result::Success(runtime->NewNormalXFAObject(pList));
47}
friend class EventParamScope
static CJS_Result Success()
Definition cjs_result.h:27
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
void DefineMethods(pdfium::span< const CJX_MethodSpec > methods)
CXFA_Document * GetDocument() const
CXFA_NodeOwner * GetNodeOwner()
void PersistList(CXFA_List *list)