#include "fxjs/xfa/cjx_eventpseudomodel.h"
#include <algorithm>
#include "core/fxcrt/notreached.h"
#include "core/fxcrt/numerics/safe_conversions.h"
#include "core/fxcrt/span.h"
#include "fxjs/fxv8.h"
#include "fxjs/xfa/cfxjse_engine.h"
#include "v8/include/v8-primitive.h"
#include "xfa/fxfa/cxfa_eventparam.h"
#include "xfa/fxfa/cxfa_ffnotify.h"
#include "xfa/fxfa/parser/cscript_eventpseudomodel.h"
namespace {
void StringProperty(v8::Isolate* pIsolate,
v8::Local<v8::Value>* pReturn,
WideString* wsValue,
bool bSetting) { … }
void IntegerProperty(v8::Isolate* pIsolate,
v8::Local<v8::Value>* pReturn,
int32_t* iValue,
bool bSetting) { … }
void BooleanProperty(v8::Isolate* pIsolate,
v8::Local<v8::Value>* pReturn,
bool* bValue,
bool bSetting) { … }
}
const CJX_MethodSpec CJX_EventPseudoModel::MethodSpecs[] = …;
CJX_EventPseudoModel::CJX_EventPseudoModel(CScript_EventPseudoModel* model)
: … { … }
CJX_EventPseudoModel::~CJX_EventPseudoModel() = default;
bool CJX_EventPseudoModel::DynamicTypeIs(TypeTag eType) const { … }
void CJX_EventPseudoModel::cancelAction(v8::Isolate* pIsolate,
v8::Local<v8::Value>* pValue,
bool bSetting,
XFA_Attribute eAttribute) { … }
void CJX_EventPseudoModel::change(v8::Isolate* pIsolate,
v8::Local<v8::Value>* pValue,
bool bSetting,
XFA_Attribute eAttribute) { … }
void CJX_EventPseudoModel::commitKey(v8::Isolate* pIsolate,
v8::Local<v8::Value>* pValue,
bool bSetting,
XFA_Attribute eAttribute) { … }
void CJX_EventPseudoModel::fullText(v8::Isolate* pIsolate,
v8::Local<v8::Value>* pValue,
bool bSetting,
XFA_Attribute eAttribute) { … }
void CJX_EventPseudoModel::keyDown(v8::Isolate* pIsolate,
v8::Local<v8::Value>* pValue,
bool bSetting,
XFA_Attribute eAttribute) { … }
void CJX_EventPseudoModel::modifier(v8::Isolate* pIsolate,
v8::Local<v8::Value>* pValue,
bool bSetting,
XFA_Attribute eAttribute) { … }
void CJX_EventPseudoModel::newContentType(v8::Isolate* pIsolate,
v8::Local<v8::Value>* pValue,
bool bSetting,
XFA_Attribute eAttribute) { … }
void CJX_EventPseudoModel::newText(v8::Isolate* pIsolate,
v8::Local<v8::Value>* pValue,
bool bSetting,
XFA_Attribute eAttribute) { … }
void CJX_EventPseudoModel::prevContentType(v8::Isolate* pIsolate,
v8::Local<v8::Value>* pValue,
bool bSetting,
XFA_Attribute eAttribute) { … }
void CJX_EventPseudoModel::prevText(v8::Isolate* pIsolate,
v8::Local<v8::Value>* pValue,
bool bSetting,
XFA_Attribute eAttribute) { … }
void CJX_EventPseudoModel::reenter(v8::Isolate* pIsolate,
v8::Local<v8::Value>* pValue,
bool bSetting,
XFA_Attribute eAttribute) { … }
void CJX_EventPseudoModel::selEnd(v8::Isolate* pIsolate,
v8::Local<v8::Value>* pValue,
bool bSetting,
XFA_Attribute eAttribute) { … }
void CJX_EventPseudoModel::selStart(v8::Isolate* pIsolate,
v8::Local<v8::Value>* pValue,
bool bSetting,
XFA_Attribute eAttribute) { … }
void CJX_EventPseudoModel::shift(v8::Isolate* pIsolate,
v8::Local<v8::Value>* pValue,
bool bSetting,
XFA_Attribute eAttribute) { … }
void CJX_EventPseudoModel::soapFaultCode(v8::Isolate* pIsolate,
v8::Local<v8::Value>* pValue,
bool bSetting,
XFA_Attribute eAttribute) { … }
void CJX_EventPseudoModel::soapFaultString(v8::Isolate* pIsolate,
v8::Local<v8::Value>* pValue,
bool bSetting,
XFA_Attribute eAttribute) { … }
void CJX_EventPseudoModel::target(v8::Isolate* pIsolate,
v8::Local<v8::Value>* pValue,
bool bSetting,
XFA_Attribute eAttribute) { … }
CJS_Result CJX_EventPseudoModel::emit(
CFXJSE_Engine* runtime,
pdfium::span<v8::Local<v8::Value>> params) { … }
CJS_Result CJX_EventPseudoModel::reset(
CFXJSE_Engine* runtime,
pdfium::span<v8::Local<v8::Value>> params) { … }
void CJX_EventPseudoModel::Property(v8::Isolate* pIsolate,
v8::Local<v8::Value>* pValue,
XFA_Event dwFlag,
bool bSetting) { … }