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_xfa.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_xfa.h"
8
9#include "fxjs/fxv8.h"
10#include "fxjs/xfa/cfxjse_engine.h"
11#include "v8/include/v8-object.h"
12#include "xfa/fxfa/parser/cxfa_document.h"
13#include "xfa/fxfa/parser/cxfa_xfa.h"
14
15CJX_Xfa::CJX_Xfa(CXFA_Xfa* node) : CJX_Model(node) {}
16
17CJX_Xfa::~CJX_Xfa() = default;
18
19bool CJX_Xfa::DynamicTypeIs(TypeTag eType) const {
20 return eType == static_type__ || ParentType__::DynamicTypeIs(eType);
21}
22
23void CJX_Xfa::thisValue(v8::Isolate* pIsolate,
24 v8::Local<v8::Value>* pValue,
25 bool bSetting,
26 XFA_Attribute eAttribute) {
27 if (bSetting)
28 return;
29
30 auto* pScriptContext = GetDocument()->GetScriptContext();
31 CXFA_Object* pThis = pScriptContext->GetThisObject();
32 *pValue =
33 pThis ? pScriptContext->GetOrCreateJSBindingFromMap(pThis).As<v8::Value>()
34 : fxv8::NewNullHelper(pIsolate);
35}
bool DynamicTypeIs(TypeTag eType) const override
Definition cjx_model.cpp:31
CXFA_Document * GetDocument() const
~CJX_Xfa() override
bool DynamicTypeIs(TypeTag eType) const override
Definition cjx_xfa.cpp:19
XFA_Attribute
Definition fxfa_basic.h:67