7#ifndef FXJS_XFA_CFXJSE_RESOLVEPROCESSOR_H_
8#define FXJS_XFA_CFXJSE_RESOLVEPROCESSOR_H_
12#include "core/fxcrt/unowned_ptr.h"
13#include "core/fxcrt/widestring.h"
14#include "fxjs/xfa/cfxjse_engine.h"
15#include "v8/include/cppgc/macros.h"
16#include "xfa/fxfa/fxfa_basic.h"
17#include "xfa/fxfa/parser/xfa_basic_data.h"
24 CPPGC_STACK_ALLOCATED();
50 WideStringView strAttr);
51 bool ResolveAnyChild(
v8::Isolate* pIsolate,
NodeData& rnd);
52 bool ResolveDollar(
v8::Isolate* pIsolate,
NodeData& rnd);
53 bool ResolveExcalmatory(
v8::Isolate* pIsolate,
NodeData& rnd);
54 bool ResolveNumberSign(
v8::Isolate* pIsolate,
NodeData& rnd);
56 bool ResolveNormal(
v8::Isolate* pIsolate,
NodeData& rnd);
59 void ConditionArray(size_t iCurIndex,
60 WideString wsCondition,
63 void FilterCondition(
v8::Isolate* pIsolate,
64 WideString wsCondition,
66 void DoPredicateFilter(
v8::Isolate* pIsolate,
67 WideString wsCondition,
71 int32_t m_iCurStart = 0;
const FXJSE_CLASS_DESCRIPTOR kNormalClassDescriptor
const FXJSE_CLASS_DESCRIPTOR kGlobalClassDescriptor
const FXJSE_CLASS_DESCRIPTOR kVariablesClassDescriptor
EventParamScope(CFXJSE_Engine *pEngine, CXFA_Node *pTarget, CXFA_EventParam *pEventParam)
ResolveResult & operator=(const ResolveResult &that)
XFA_SCRIPTATTRIBUTEINFO script_attribute
ResolveResult(const ResolveResult &that)
void SetRunAtType(XFA_AttributeValue eRunAt)
static CJS_Result NormalMethodCall(const v8::FunctionCallbackInfo< v8::Value > &info, const WideString &functionName)
bool IsResolvingNodes() const
CXFA_Object * ToXFAObject(v8::Local< v8::Value > obj)
CXFA_Node * GetEventTarget() const
static v8::Local< v8::Value > NormalPropertyGetter(v8::Isolate *pIsolate, v8::Local< v8::Object > pObject, ByteStringView szPropName)
static void GlobalPropertySetter(v8::Isolate *pIsolate, v8::Local< v8::Object > pObject, ByteStringView szPropName, v8::Local< v8::Value > pValue)
CFXJSE_Engine(CXFA_Document *pDocument, CJS_Runtime *fxjs_runtime)
static FXJSE_ClassPropType GlobalPropTypeGetter(v8::Isolate *pIsolate, v8::Local< v8::Object > pObject, ByteStringView szPropName, bool bQueryIn)
CXFA_EventParam * GetEventParam() const
static CXFA_Object * ToObject(const v8::FunctionCallbackInfo< v8::Value > &info)
CXFA_Object * GetThisObject() const
CXFA_Script::Type GetType()
CFXJSE_Class * GetJseNormalClass() const
void AddNodesOfRunScript(CXFA_Node *pNode)
void SetNodesOfRunScript(std::vector< cppgc::Persistent< CXFA_Node > > *pArray)
static v8::Local< v8::Value > GlobalPropertyGetter(v8::Isolate *pIsolate, v8::Local< v8::Object > pObject, ByteStringView szPropName)
friend class EventParamScope
static FXJSE_ClassPropType NormalPropTypeGetter(v8::Isolate *pIsolate, v8::Local< v8::Object > pObject, ByteStringView szPropName, bool bQueryIn)
static CXFA_Object * ToObject(v8::Isolate *pIsolate, CFXJSE_Value *pValue)
absl::optional< ResolveResult > ResolveObjectsWithBindNode(CXFA_Object *refObject, WideStringView wsExpression, Mask< XFA_ResolveFlag > dwStyles, CXFA_Node *bindNode)
CFXJSE_Context * GetJseContextForTest() const
v8::Local< v8::Object > NewNormalXFAObject(CXFA_Object *obj)
CFXJSE_Context::ExecutionResult RunScript(CXFA_Script::Type eScriptType, WideStringView wsScript, CXFA_Object *pThisObject)
static void NormalPropertySetter(v8::Isolate *pIsolate, v8::Local< v8::Object > pObject, ByteStringView szPropName, v8::Local< v8::Value > pValue)
CXFA_Node * LastObjectFromUpArray()
~CFXJSE_Engine() override
absl::optional< ResolveResult > ResolveObjects(CXFA_Object *refObject, WideStringView wsExpression, Mask< XFA_ResolveFlag > dwStyles)
static CXFA_Object * ToObject(v8::Isolate *pIsolate, v8::Local< v8::Value > value)
static CXFA_Object * ToObject(CFXJSE_HostObject *pHostObj)
CXFA_Document * GetDocument() const
void AddObjectToUpArray(CXFA_Node *pNode)
v8::Local< v8::Object > GetOrCreateJSBindingFromMap(CXFA_Object *pObject)
v8::Local< v8::Value > GlobalPropertyGetter()
static void Space(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void CTerm(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void Put(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void get_fm_value(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void Pmt(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static ByteString Local2IsoDate(CFXJSE_HostObject *pThis, ByteStringView bsDate, ByteStringView bsFormat, ByteStringView bsLocale)
static void IPmt(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void UnitValue(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void TimeFmt(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void greater_operator(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void Uuid(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void Lower(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void Len(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void LocalDateFmt(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void Encode(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static ByteString Num2AllTime(CFXJSE_HostObject *pThis, int32_t iTime, ByteStringView bsFormat, ByteStringView bsLocale, bool bGM)
CXFA_Document * GetDocument() const
static void At(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static ByteString GetStandardTimeFormat(CFXJSE_HostObject *pThis, int32_t iStyle, ByteStringView bsLocale)
static bool fm_ref_equal(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void Round(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void Num2Time(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void less_operator(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
v8::Isolate * GetIsolate() const
static void Time2Num(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void Mod(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void Concat(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void is_fm_array(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void Rate(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void Sum(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void is_fm_object(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void Replace(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static ByteString GetStandardDateFormat(CFXJSE_HostObject *pThis, int32_t iStyle, ByteStringView bsLocale)
static void logical_or_operator(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
CFXJSE_FormCalcContext * AsFormCalcContext() override
static void Decode(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void equality_operator(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void concat_fm_object(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void NPV(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void positive_operator(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void UnitType(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void DateFmt(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void Format(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void Num2GMTime(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void Rtrim(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void greaterequal_operator(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void Max(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void PV(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void multiple_operator(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void negative_operator(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static ByteString GetLocalDateFormat(CFXJSE_HostObject *pThis, int32_t iStyle, ByteStringView bsLocale, bool bStandard)
static void Within(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void lessequal_operator(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
~CFXJSE_FormCalcContext() override
static void Exists(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void Ceil(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void Right(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void logical_not_operator(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void Get(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void IsoTime2Num(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void Apr(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void Ref(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void Ltrim(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void Eval(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void divide_operator(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void Abs(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void Date2Num(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void HasValue(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void If(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void Date(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void WordNum(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void FV(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void Stuff(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void assign_value_operator(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void fm_var_filter(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void logical_and_operator(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void notequality_operator(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void Str(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void minus_operator(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void dotdot_accessor(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void Choose(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void Oneof(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void Post(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void Count(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static absl::optional< WideTextBuffer > Translate(cppgc::Heap *pHeap, WideStringView wsFormcalc)
static void get_fm_jsobj(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
CFXJSE_FormCalcContext(v8::Isolate *pIsolate, CFXJSE_Context *pScriptContext, CXFA_Document *pDoc)
static void Time(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void Avg(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void dot_accessor(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static ByteString GetLocalTimeFormat(CFXJSE_HostObject *pThis, int32_t iStyle, ByteStringView bsLocale, bool bStandard)
static void IsoDate2Num(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void Num2Date(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void Parse(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static ByteString IsoDate2Local(CFXJSE_HostObject *pThis, ByteStringView bsDate, ByteStringView bsFormat, ByteStringView bsLocale)
static void Left(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void plus_operator(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void Upper(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void Substr(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static ByteString IsoTime2Local(CFXJSE_HostObject *pThis, ByteStringView bsTime, ByteStringView bsFormat, ByteStringView bsLocale)
static void PPmt(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void LocalTimeFmt(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void Min(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void eval_translation(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void Term(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
static void Floor(CFXJSE_HostObject *pThis, const v8::FunctionCallbackInfo< v8::Value > &info)
virtual CJX_Object * AsCJXObject()
bool CreateNode(const WideString &wsName, const WideString &wsCondition, bool bLastNode, CFXJSE_Engine *pScriptContext)
cppgc::Persistent< CXFA_Node > m_pCreateParent
XFA_Element m_eLastCreateType
bool CreateNodeForCondition(const WideString &wsCondition)
void SetCreateNodeType(CXFA_Node *refNode)
cppgc::Persistent< CXFA_Node > m_pAllStartParent
CFXJSE_Engine::ResolveResult::Type m_iCreateFlag
CFXJSE_Engine::ResolveResult m_Result
Mask< XFA_ResolveFlag > m_dwStyles
UnownedPtr< CXFA_Object > m_CurObject
void SetCurStart(int32_t start)
bool Resolve(v8::Isolate *pIsolate, NodeData &rnd)
~CFXJSE_ResolveProcessor()
int32_t GetFilter(WideStringView wsExpression, int32_t nStart, NodeData &rnd)
int32_t IndexForDataBind(const WideString &wsNextCondition, int32_t iCount)
CFXJSE_ResolveProcessor(CFXJSE_Engine *pEngine, CFXJSE_NodeHelper *pHelper)
CFXJSE_ScopeUtil_IsolateHandleContext(CFXJSE_Context *pContext)
static CJS_Result Failure(const WideString &str)
bool HasMethod(const WideString &func) const
CXFA_Object * GetXFAObject() const
CXFA_FFNotify * GetNotify() const
CFXJSE_Engine * GetScriptContext() const
CXFA_Object * GetXFAObject(XFA_HashCode wsNodeNameHash)
CXFA_Node * GetRoot() const
IJS_Runtime * GetIJSRuntime() const
CXFA_FFDoc * GetFFDoc() const
XFA_Element GetElementType() const
CXFA_Document * GetDocument() const
static CXFA_Script * FromNode(CXFA_Node *pNode)
XFA_AttributeValue GetRunAt()
WideString GetExpression()
CXFA_Script * GetScriptNode() const
CXFA_Node * GetThisNode() const
static CXFA_Variables * FromNode(CXFA_Node *pNode)
static WideString FromUTF8(ByteStringView str)
bool EqualsASCII(ByteStringView that) const
CXFA_ThisProxy * ToThisProxy(CXFA_Object *pObj)
CXFA_Node * ToNode(CXFA_Object *pObj)
#define CONSTRUCT_VIA_MAKE_GARBAGE_COLLECTED
bool IsUndefined(v8::Local< v8::Value > value)
XFA_ScriptType eValueType
XFA_PacketSupport support
XFA_PacketType packet_type
XFA_ScriptType eValueType
XFA_ATTRIBUTE_CALLBACK callback
XFA_Element XFA_GetElementByName(WideStringView name)
ByteStringView XFA_AttributeValueToName(XFA_AttributeValue item)
absl::optional< XFA_AttributeValue > XFA_GetAttributeValueByName(WideStringView name)
ByteStringView XFA_ElementToName(XFA_Element elem)
absl::optional< XFA_SCRIPTATTRIBUTEINFO > XFA_GetScriptAttributeByName(XFA_Element eElement, WideStringView wsAttributeName)
absl::optional< XFA_PACKETINFO > XFA_GetPacketByName(WideStringView wsName)
absl::optional< XFA_ATTRIBUTEINFO > XFA_GetAttributeByName(WideStringView name)
XFA_PACKETINFO XFA_GetPacketByIndex(XFA_PacketType ePacket)
ByteStringView XFA_AttributeToName(XFA_Attribute attr)