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 #ifndef XFA_FXFA_PARSER_CXFA_NODE_H_ 8 #define XFA_FXFA_PARSER_CXFA_NODE_H_ 9 10 #include <stddef.h> 11 #include <stdint.h> 12 13 #include <optional> 14 #include <utility> 15 #include <vector> 16 17 #include "core/fxcrt/fx_coordinates.h" 18 #include "core/fxcrt/mask.h" 19 #include "core/fxcrt/raw_span.h" 20 #include "core/fxcrt/retain_ptr.h" 21 #include "core/fxcrt/span.h" 22 #include "core/fxcrt/unowned_ptr.h" 23 #include "core/fxcrt/unowned_ptr_exclusion.h" 24 #include "core/fxcrt/widestring.h" 25 #include "core/fxge/dib/fx_dib.h" 26 #include "fxjs/gc/gced_tree_node_mixin.h" 27 #include "v8/include/cppgc/member.h" 28 #include "v8/include/cppgc/visitor.h" 29 #include "xfa/fxfa/cxfa_ffwidget_type.h" 30 #include "xfa/fxfa/fxfa.h" 31 #include "xfa/fxfa/parser/cxfa_object.h" 32 33 class CFGAS_GEFont; 34 class CFX_DIBitmap; 35 class CFX_XMLDocument; 36 class CFX_XMLNode; 37 class CXFA_Bind; 38 class CXFA_Border; 39 class CXFA_Calculate; 40 class CXFA_Caption; 41 class CXFA_Event; 42 class CXFA_EventParam; 43 class CXFA_FFDoc; 44 class CXFA_FFDocView; 45 class CXFA_Font; 46 class CXFA_Keep; 47 class CXFA_Margin; 48 class CXFA_Measurement; 49 class CXFA_Occur; 50 class CXFA_Para; 51 class CXFA_Script; 52 class CXFA_TextLayout; 53 class CXFA_Ui; 54 class CXFA_Validate; 55 class CXFA_Value; 56 class CXFA_WidgetLayoutData; 57 class GCedLocaleIface; 58 59 enum class XFA_NodeFilter : uint8_t { 60 kChildren = 1 << 0, 61 kProperties = 1 << 1, 62 kOneOfProperty = 1 << 2, 63 }; 64 65 enum class XFA_CheckState : uint8_t { 66 kOn = 0, 67 kOff = 1, 68 kNeutral = 2, 69 }; 70 71 enum class XFA_ValuePicture : uint8_t { 72 kRaw = 0, 73 kDisplay, 74 kEdit, 75 kDataBind, 76 }; 77 78 enum class XFA_NodeFlag : uint8_t { 79 kNone = 0, 80 kInitialized = 1 << 0, 81 kHasRemovedChildren = 1 << 1, 82 kNeedsInitApp = 1 << 2, 83 kBindFormItems = 1 << 3, 84 kUserInteractive = 1 << 4, 85 kUnusedNode = 1 << 5, 86 kLayoutGeneratedNode = 1 << 6 87 }; 88 89 enum class XFA_PropertyFlag : uint8_t { 90 kOneOf = 1 << 0, 91 kDefaultOneOf = 1 << 1, 92 }; 93 94 class CXFA_Node : public CXFA_Object, public GCedTreeNodeMixin<CXFA_Node> { 95 public: 96 struct PropertyData { 97 PropertyData() = delete; PropertyDataPropertyData98 constexpr PropertyData(XFA_Element property, 99 uint8_t occurrence_count, 100 Mask<XFA_PropertyFlag> flags) 101 : property(property), 102 occurrence_count(occurrence_count), 103 flags(flags) {} 104 105 XFA_Element property; 106 uint8_t occurrence_count; 107 Mask<XFA_PropertyFlag> flags; 108 }; 109 110 struct AttributeData { 111 XFA_Attribute attribute; 112 XFA_AttributeType type; 113 UNOWNED_PTR_EXCLUSION void* default_value; // POD type. 114 }; 115 116 struct BoolScriptResult { 117 XFA_EventError xfa_event_result; 118 bool script_result; 119 }; 120 121 // Node is created from cppgc heap. 122 static CXFA_Node* Create(CXFA_Document* doc, 123 XFA_Element element, 124 XFA_PacketType packet); 125 126 ~CXFA_Node() override; 127 128 // CXFA_Object: 129 void Trace(cppgc::Visitor* visitor) const override; 130 131 bool HasProperty(XFA_Element property) const; 132 bool HasPropertyFlag(XFA_Element property, XFA_PropertyFlag flag) const; 133 uint8_t PropertyOccurrenceCount(XFA_Element property) const; 134 135 std::pair<CXFA_Node*, int32_t> GetProperty(int32_t index, 136 XFA_Element eProperty) const; 137 CXFA_Node* GetOrCreateProperty(int32_t index, XFA_Element eProperty); 138 139 void SendAttributeChangeMessage(XFA_Attribute eAttribute, bool bScriptModify); 140 141 bool HasAttribute(XFA_Attribute attr) const; 142 XFA_AttributeType GetAttributeType(XFA_Attribute type) const; 143 144 // Note: returns XFA_Attribute::Unknown for invalid indicies. 145 XFA_Attribute GetAttribute(size_t i) const; 146 GetPacketType()147 XFA_PacketType GetPacketType() const { return m_ePacket; } 148 149 void SetInitializedFlagAndNotify(); 150 void SetFlag(XFA_NodeFlag dwFlag); 151 void ClearFlag(XFA_NodeFlag dwFlag); 152 153 CXFA_Node* CreateInstanceIfPossible(bool bDataMerge); 154 int32_t GetCount(); 155 CXFA_Node* GetItemIfExists(int32_t iIndex); 156 void RemoveItem(CXFA_Node* pRemoveInstance, bool bRemoveDataBinding); 157 void InsertItem(CXFA_Node* pNewInstance, 158 int32_t iPos, 159 int32_t iCount, 160 bool bMoveDataBindingNodes); 161 IsInitialized()162 bool IsInitialized() const { return HasFlag(XFA_NodeFlag::kInitialized); } IsUserInteractive()163 bool IsUserInteractive() const { 164 return HasFlag(XFA_NodeFlag::kUserInteractive); 165 } IsUnusedNode()166 bool IsUnusedNode() const { return HasFlag(XFA_NodeFlag::kUnusedNode); } IsLayoutGeneratedNode()167 bool IsLayoutGeneratedNode() const { 168 return HasFlag(XFA_NodeFlag::kLayoutGeneratedNode); 169 } 170 171 bool PresenceRequiresSpace() const; 172 void SetBindingNode(CXFA_Node* node); 173 void SetNodeAndDescendantsUnused(); 174 HasRemovedChildren()175 bool HasRemovedChildren() const { 176 return HasFlag(XFA_NodeFlag::kHasRemovedChildren); 177 } 178 179 bool IsAttributeInXML(); IsFormContainer()180 bool IsFormContainer() const { 181 return m_ePacket == XFA_PacketType::Form && IsContainerNode(); 182 } 183 SetXMLMappingNode(CFX_XMLNode * node)184 void SetXMLMappingNode(CFX_XMLNode* node) { xml_node_ = node; } GetXMLMappingNode()185 CFX_XMLNode* GetXMLMappingNode() const { return xml_node_; } 186 CFX_XMLNode* CreateXMLMappingNode(); 187 bool IsNeedSavingXMLNode() const; 188 189 void SetToXML(const WideString& value); 190 GetNameHash()191 uint32_t GetNameHash() const { return m_dwNameHash; } IsUnnamed()192 bool IsUnnamed() const { return m_dwNameHash == 0; } 193 CXFA_Node* GetModelNode(); 194 void UpdateNameHash(); 195 196 size_t CountChildren(XFA_Element eType, bool bOnlyChild); 197 198 template <typename T> GetChild(size_t index,XFA_Element eType,bool bOnlyChild)199 T* GetChild(size_t index, XFA_Element eType, bool bOnlyChild) { 200 return static_cast<T*>(GetChildInternal(index, eType, bOnlyChild)); 201 } 202 203 template <typename T> GetChild(size_t index,XFA_Element eType,bool bOnlyChild)204 const T* GetChild(size_t index, XFA_Element eType, bool bOnlyChild) const { 205 return static_cast<const T*>(GetChildInternal(index, eType, bOnlyChild)); 206 } 207 208 bool IsAncestorOf(const CXFA_Node* that) const; 209 210 void InsertChildAndNotify(int32_t index, CXFA_Node* pNode); 211 void InsertChildAndNotify(CXFA_Node* pNode, CXFA_Node* pBeforeNode); 212 void RemoveChildAndNotify(CXFA_Node* pNode, bool bNotify); 213 214 CXFA_Node* Clone(bool bRecursive); 215 216 CXFA_Node* GetNextContainerSibling() const; 217 CXFA_Node* GetPrevContainerSibling() const; 218 CXFA_Node* GetFirstContainerChild() const; 219 CXFA_Node* GetContainerParent() const; 220 221 std::vector<CXFA_Node*> GetNodeListForType(XFA_Element eTypeFilter); 222 std::vector<CXFA_Node*> GetNodeListWithFilter(Mask<XFA_NodeFilter> dwFilter); 223 CXFA_Node* CreateSamePacketNode(XFA_Element eType); 224 CXFA_Node* CloneTemplateToForm(bool bRecursive); 225 CXFA_Node* GetTemplateNodeIfExists() const; 226 void SetTemplateNode(CXFA_Node* pTemplateNode); 227 CXFA_Node* GetDataDescriptionNode(); 228 void SetDataDescriptionNode(CXFA_Node* pDataDescriptionNode); 229 CXFA_Node* GetBindData(); HasBindItems()230 bool HasBindItems() const { return !binding_nodes_.empty(); } 231 std::vector<CXFA_Node*> GetBindItemsCopy() const; 232 void AddBindItem(CXFA_Node* pFormNode); 233 // Returns true if there are still more items. 234 bool RemoveBindItem(CXFA_Node* pFormNode); 235 bool HasBindItem() const; 236 CXFA_Node* GetContainerNode(); 237 GCedLocaleIface* GetLocale(); 238 std::optional<WideString> GetLocaleName(); 239 XFA_AttributeValue GetIntact(); 240 WideString GetNameExpression(); 241 242 CXFA_Node* GetFirstChildByName(WideStringView wsNodeName) const; 243 CXFA_Node* GetFirstChildByName(uint32_t dwNodeNameHash) const; 244 template <typename T> GetFirstChildByClass(XFA_Element eType)245 T* GetFirstChildByClass(XFA_Element eType) const { 246 return static_cast<T*>(GetFirstChildByClassInternal(eType)); 247 } 248 CXFA_Node* GetNextSameNameSibling(uint32_t dwNodeNameHash) const; 249 template <typename T> GetNextSameNameSibling(WideStringView wsNodeName)250 T* GetNextSameNameSibling(WideStringView wsNodeName) const { 251 return static_cast<T*>(GetNextSameNameSiblingInternal(wsNodeName)); 252 } 253 template <typename T> GetNextSameClassSibling(XFA_Element eType)254 T* GetNextSameClassSibling(XFA_Element eType) const { 255 return static_cast<T*>(GetNextSameClassSiblingInternal(eType)); 256 } 257 258 CXFA_Node* GetOneChildNamed(WideStringView wsName); 259 CXFA_Node* GetOneChildOfClass(WideStringView wsClass); 260 261 std::vector<CXFA_Node*> GetSiblings(bool bIsClassName); 262 size_t GetIndex(bool bIsProperty, bool bIsClassIndex); 263 size_t GetIndexByName(); 264 size_t GetIndexByClassName(); 265 266 CXFA_Node* GetInstanceMgrOfSubform(); 267 268 std::optional<bool> GetDefaultBoolean(XFA_Attribute attr) const; 269 std::optional<int32_t> GetDefaultInteger(XFA_Attribute attr) const; 270 std::optional<CXFA_Measurement> GetDefaultMeasurement( 271 XFA_Attribute attr) const; 272 std::optional<WideString> GetDefaultCData(XFA_Attribute attr) const; 273 std::optional<XFA_AttributeValue> GetDefaultEnum(XFA_Attribute attr) const; 274 275 bool IsOpenAccess() const; 276 277 CXFA_Occur* GetOccurIfExists(); 278 CXFA_Border* GetBorderIfExists() const; 279 CXFA_Border* GetOrCreateBorderIfPossible(); 280 CXFA_Caption* GetCaptionIfExists() const; 281 CXFA_Font* GetFontIfExists() const; 282 CXFA_Font* GetOrCreateFontIfPossible(); 283 284 float GetFontSize() const; 285 FX_ARGB GetTextColor() const; 286 float GetLineHeight() const; 287 288 CXFA_Margin* GetMarginIfExists() const; 289 CXFA_Para* GetParaIfExists() const; 290 CXFA_Calculate* GetCalculateIfExists() const; 291 CXFA_Validate* GetValidateIfExists() const; 292 CXFA_Validate* GetOrCreateValidateIfPossible(); 293 294 CXFA_Value* GetFormValueIfExists() const; 295 WideString GetRawValue() const; 296 297 int32_t GetRotate() const; 298 std::optional<float> TryWidth(); 299 300 CXFA_Node* GetExclGroupIfExists(); 301 302 XFA_EventError ProcessEvent(CXFA_FFDocView* pDocView, 303 XFA_AttributeValue iActivity, 304 CXFA_EventParam* pEventParam); 305 XFA_EventError ProcessCalculate(CXFA_FFDocView* pDocView); 306 XFA_EventError ProcessValidate(CXFA_FFDocView* pDocView, int32_t iFlags); 307 XFA_EventError ExecuteScript(CXFA_FFDocView* pDocView, 308 CXFA_Script* script, 309 CXFA_EventParam* pEventParam); 310 BoolScriptResult ExecuteBoolScript(CXFA_FFDocView* pDocView, 311 CXFA_Script* script, 312 CXFA_EventParam* pEventParam); 313 314 CXFA_Node* GetUIChildNode(); 315 316 // NOTE: value returned is often determined by child UI node, and 317 // can't be used to infer anything about this particual node itself. 318 XFA_FFWidgetType GetFFWidgetType(); 319 320 CFX_RectF GetUIMargin(); 321 CXFA_Border* GetUIBorder(); 322 SetPreNull(bool val)323 void SetPreNull(bool val) { m_bPreNull = val; } IsNull()324 bool IsNull() const { return m_bIsNull; } SetIsNull(bool val)325 void SetIsNull(bool val) { m_bIsNull = val; } 326 SetWidgetReady()327 void SetWidgetReady() { is_widget_ready_ = true; } IsWidgetReady()328 bool IsWidgetReady() const { return is_widget_ready_; } 329 std::vector<CXFA_Event*> GetEventByActivity(XFA_AttributeValue iActivity, 330 bool bIsFormReady); 331 332 void ResetData(); 333 void StartWidgetLayout(CXFA_FFDoc* doc, 334 float* pCalcWidth, 335 float* pCalcHeight); 336 std::optional<float> FindSplitPos(CXFA_FFDocView* pDocView, 337 size_t szBlockIndex, 338 float fCalcHeight); 339 340 bool LoadCaption(CXFA_FFDoc* doc); 341 CXFA_TextLayout* GetCaptionTextLayout(); 342 CXFA_TextLayout* GetTextLayout(); 343 344 bool LoadLayoutImage(CXFA_FFDoc* doc); 345 bool LoadEditImage(CXFA_FFDoc* doc); 346 CFX_Size GetLayoutImageDpi() const; 347 CFX_Size GetEditImageDpi() const; 348 RetainPtr<CFX_DIBitmap> GetLayoutImage(); 349 RetainPtr<CFX_DIBitmap> GetEditImage(); 350 void SetLayoutImage(RetainPtr<CFX_DIBitmap> newImage); 351 void SetEditImage(RetainPtr<CFX_DIBitmap> newImage); 352 353 RetainPtr<CFGAS_GEFont> GetFGASFont(CXFA_FFDoc* doc); 354 355 bool IsListBox(); 356 bool IsRadioButton(); 357 bool IsMultiLine(); 358 359 bool HasButtonRollover() const; 360 bool HasButtonDown() const; 361 362 float GetCheckButtonSize(); 363 364 XFA_CheckState GetCheckState(); 365 void SetCheckState(XFA_CheckState eCheckState); 366 367 CXFA_Node* GetSelectedMember(); 368 CXFA_Node* SetSelectedMember(WideStringView wsName); 369 void SetSelectedMemberByValue(WideStringView wsValue, 370 bool bNotify, 371 bool bScriptModify, 372 bool bSyncData); 373 374 CXFA_Node* GetExclGroupFirstMember(); 375 CXFA_Node* GetExclGroupNextMember(CXFA_Node* pNode); 376 377 bool IsChoiceListAllowTextEntry(); 378 size_t CountChoiceListItems(bool bSaveValue); 379 std::optional<WideString> GetChoiceListItem(int32_t nIndex, bool bSaveValue); 380 bool IsChoiceListMultiSelect(); 381 bool IsChoiceListCommitOnSelect(); 382 std::vector<WideString> GetChoiceListItems(bool bSaveValue); 383 384 int32_t CountSelectedItems(); 385 int32_t GetSelectedItem(int32_t nIndex); 386 std::vector<int32_t> GetSelectedItems(); 387 std::vector<WideString> GetSelectedItemsValue(); 388 void SetSelectedItems(const std::vector<int32_t>& iSelArray, 389 bool bNotify, 390 bool bScriptModify, 391 bool bSyncData); 392 void InsertItem(const WideString& wsLabel, 393 const WideString& wsValue, 394 bool bNotify); 395 bool DeleteItem(int32_t nIndex, bool bNotify, bool bScriptModify); 396 void ClearAllSelections(); 397 398 bool GetItemState(int32_t nIndex); 399 void SetItemState(int32_t nIndex, 400 bool bSelected, 401 bool bNotify, 402 bool bScriptModify); 403 404 WideString GetItemValue(WideStringView wsLabel); 405 406 bool IsHorizontalScrollPolicyOff(); 407 bool IsVerticalScrollPolicyOff(); 408 std::optional<int32_t> GetNumberOfCells(); 409 410 bool SetValue(XFA_ValuePicture eValueType, const WideString& wsValue); 411 WideString GetValue(XFA_ValuePicture eValueType); 412 WideString GetPictureContent(XFA_ValuePicture ePicture); 413 WideString GetNormalizeDataValue(const WideString& wsValue); 414 WideString GetFormatDataValue(const WideString& wsValue); 415 WideString NormalizeNumStr(const WideString& wsValue); 416 417 std::pair<XFA_Element, int32_t> GetMaxChars() const; 418 int32_t GetFracDigits() const; 419 int32_t GetLeadDigits() const; 420 421 WideString NumericLimit(const WideString& wsValue); 422 423 bool IsTransparent() const; 424 bool IsProperty() const; 425 426 protected: 427 CXFA_Node(CXFA_Document* pDoc, 428 XFA_PacketType ePacket, 429 Mask<XFA_XDPPACKET> validPackets, 430 XFA_ObjectType oType, 431 XFA_Element eType, 432 pdfium::span<const PropertyData> properties, 433 pdfium::span<const AttributeData> attributes, 434 CJX_Object* js_object); 435 436 virtual XFA_Element GetValueNodeType() const; 437 virtual XFA_FFWidgetType GetDefaultFFWidgetType() const; 438 439 private: 440 void ProcessScriptTestValidate(CXFA_FFDocView* pDocView, 441 CXFA_Validate* validate, 442 bool bVersionFlag); 443 XFA_EventError ProcessFormatTestValidate(CXFA_FFDocView* pDocView, 444 CXFA_Validate* validate, 445 bool bVersionFlag); 446 XFA_EventError ProcessNullTestValidate(CXFA_FFDocView* pDocView, 447 CXFA_Validate* validate, 448 int32_t iFlags, 449 bool bVersionFlag); 450 WideString GetValidateCaptionName(bool bVersionFlag); 451 WideString GetValidateMessage(bool bError, bool bVersionFlag); 452 453 bool HasFlag(XFA_NodeFlag dwFlag) const; 454 const PropertyData* GetPropertyData(XFA_Element property) const; 455 const AttributeData* GetAttributeData(XFA_Attribute attr) const; 456 std::optional<XFA_Element> GetFirstPropertyWithFlag( 457 XFA_PropertyFlag flag) const; 458 void OnRemoved(bool bNotify) const; 459 std::optional<void*> GetDefaultValue(XFA_Attribute attr, 460 XFA_AttributeType eType) const; 461 CXFA_Node* GetChildInternal(size_t index, 462 XFA_Element eType, 463 bool bOnlyChild) const; 464 CXFA_Node* GetFirstChildByClassInternal(XFA_Element eType) const; 465 CXFA_Node* GetNextSameNameSiblingInternal(WideStringView wsNodeName) const; 466 CXFA_Node* GetNextSameClassSiblingInternal(XFA_Element eType) const; 467 void CalcCaptionSize(CXFA_FFDoc* doc, CFX_SizeF* pszCap); 468 bool CalculateFieldAutoSize(CXFA_FFDoc* doc, CFX_SizeF* pSize); 469 bool CalculateWidgetAutoSize(CFX_SizeF* pSize); 470 bool CalculateTextEditAutoSize(CXFA_FFDoc* doc, CFX_SizeF* pSize); 471 bool CalculateCheckButtonAutoSize(CXFA_FFDoc* doc, CFX_SizeF* pSize); 472 bool CalculatePushButtonAutoSize(CXFA_FFDoc* doc, CFX_SizeF* pSize); 473 CFX_SizeF CalculateImageSize(float img_width, 474 float img_height, 475 const CFX_Size& dpi); 476 bool CalculateImageEditAutoSize(CXFA_FFDoc* doc, CFX_SizeF* pSize); 477 bool CalculateImageAutoSize(CXFA_FFDoc* doc, CFX_SizeF* pSize); 478 float CalculateWidgetAutoHeight(float fHeightCalc); 479 float CalculateWidgetAutoWidth(float fWidthCalc); 480 float GetWidthWithoutMargin(float fWidthCalc) const; 481 float GetHeightWithoutMargin(float fHeightCalc) const; 482 void CalculateTextContentSize(CXFA_FFDoc* doc, CFX_SizeF* pSize); 483 CFX_SizeF CalculateAccWidthAndHeight(CXFA_FFDoc* doc, float fWidth); 484 void InitLayoutData(CXFA_FFDoc* doc); 485 void StartTextLayout(CXFA_FFDoc* doc, float* pCalcWidth, float* pCalcHeight); 486 487 void InsertListTextItem(CXFA_Node* pItems, 488 const WideString& wsText, 489 int32_t nIndex); 490 WideString GetItemLabel(WideStringView wsValue) const; 491 492 std::pair<XFA_FFWidgetType, CXFA_Ui*> CreateChildUIAndValueNodesIfNeeded(); 493 void CreateValueNodeIfNeeded(CXFA_Value* value, CXFA_Node* pUIChild); 494 CXFA_Node* CreateUINodeIfNeeded(CXFA_Ui* ui, XFA_Element type); 495 bool IsValidInPacket(XFA_PacketType packet) const; 496 void SetImageEdit(const WideString& wsContentType, 497 const WideString& wsHref, 498 const WideString& wsData); GetBindingNode()499 CXFA_Node* GetBindingNode() const { 500 if (binding_nodes_.empty()) 501 return nullptr; 502 return binding_nodes_[0]; 503 } BindsFormItems()504 bool BindsFormItems() const { return HasFlag(XFA_NodeFlag::kBindFormItems); } NeedsInitApp()505 bool NeedsInitApp() const { return HasFlag(XFA_NodeFlag::kNeedsInitApp); } 506 void SyncValue(const WideString& wsValue, bool bNotify); 507 CXFA_Value* GetDefaultValueIfExists(); 508 CXFA_Bind* GetBindIfExists() const; 509 std::optional<XFA_AttributeValue> GetIntactFromKeep( 510 const CXFA_Keep* pKeep, 511 XFA_AttributeValue eLayoutType) const; 512 CXFA_Node* GetTransparentParent(); 513 514 std::optional<float> TryHeight(); 515 std::optional<float> TryMinWidth(); 516 std::optional<float> TryMinHeight(); 517 std::optional<float> TryMaxWidth(); 518 std::optional<float> TryMaxHeight(); 519 XFA_EventError ProcessEventInternal(CXFA_FFDocView* pDocView, 520 XFA_AttributeValue iActivity, 521 CXFA_Event* event, 522 CXFA_EventParam* pEventParam); 523 524 CFX_XMLDocument* GetXMLDocument() const; 525 526 XFA_FFWidgetType ff_widget_type_ = XFA_FFWidgetType::kNone; 527 bool m_bIsNull = true; 528 bool m_bPreNull = true; 529 bool is_widget_ready_ = false; 530 const pdfium::raw_span<const PropertyData> m_Properties; 531 const pdfium::raw_span<const AttributeData> m_Attributes; 532 const Mask<XFA_XDPPACKET> m_ValidPackets; 533 UnownedPtr<CFX_XMLNode> xml_node_; 534 const XFA_PacketType m_ePacket; 535 uint8_t m_ExecuteRecursionDepth = 0; 536 Mask<XFA_NodeFlag> m_uNodeFlags = XFA_NodeFlag::kNone; 537 uint32_t m_dwNameHash = 0; 538 cppgc::Member<CXFA_Node> m_pAuxNode; 539 cppgc::Member<CXFA_WidgetLayoutData> m_pLayoutData; 540 cppgc::Member<CXFA_Ui> ui_; 541 std::vector<cppgc::Member<CXFA_Node>> binding_nodes_; 542 }; 543 544 #endif // XFA_FXFA_PARSER_CXFA_NODE_H_ 545