diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-11-30 21:29:11 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-11-30 21:29:11 +0000 |
commit | c40c5aa2d7f1753dd382c35955deafdaca660020 (patch) | |
tree | b427f5516046d40b8dd63f8c7a552fac0bf278ae /xfa/fxfa/parser/cxfa_simple_parser.h | |
parent | 9daec60824d085db8c2f841fd389c725df1f8b0b (diff) | |
download | pdfium-c40c5aa2d7f1753dd382c35955deafdaca660020.tar.xz |
A CXFA_Node can only be in one packet
When a CXFA_Node is created it's created as part of a specific packet.
Previously the code would accept an XFA_XDPPACKET which was stored
internally. This had the potential to allow a node to exist in multiple
packets.
This CL changes the XFA_XDPPacket to the XFA_PacketType enum class and
cleans up a lot of uses to use the more specific packet type.
Change-Id: I7fc8c843bfa6bd32295ae58a26bcec311e43c4b0
Reviewed-on: https://pdfium-review.googlesource.com/20012
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_simple_parser.h')
-rw-r--r-- | xfa/fxfa/parser/cxfa_simple_parser.h | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/xfa/fxfa/parser/cxfa_simple_parser.h b/xfa/fxfa/parser/cxfa_simple_parser.h index 00250e7257..f7465b64d6 100644 --- a/xfa/fxfa/parser/cxfa_simple_parser.h +++ b/xfa/fxfa/parser/cxfa_simple_parser.h @@ -39,24 +39,20 @@ class CXFA_SimpleParser { private: CXFA_Node* ParseAsXDPPacket(CFX_XMLNode* pXMLDocumentNode, XFA_XDPPACKET ePacketID); - CXFA_Node* ParseAsXDPPacket_XDP(CFX_XMLNode* pXMLDocumentNode, - XFA_XDPPACKET ePacketID); + CXFA_Node* ParseAsXDPPacket_XDP(CFX_XMLNode* pXMLDocumentNode); CXFA_Node* ParseAsXDPPacket_Config(CFX_XMLNode* pXMLDocumentNode, - XFA_XDPPACKET ePacketID); + XFA_PacketType ePacketID); CXFA_Node* ParseAsXDPPacket_TemplateForm(CFX_XMLNode* pXMLDocumentNode, - XFA_XDPPACKET ePacketID); - CXFA_Node* ParseAsXDPPacket_Data(CFX_XMLNode* pXMLDocumentNode, - XFA_XDPPACKET ePacketID); + XFA_PacketType ePacketID); + CXFA_Node* ParseAsXDPPacket_Data(CFX_XMLNode* pXMLDocumentNode); CXFA_Node* ParseAsXDPPacket_LocaleConnectionSourceSet( CFX_XMLNode* pXMLDocumentNode, - XFA_XDPPACKET ePacketID); - CXFA_Node* ParseAsXDPPacket_Xdc(CFX_XMLNode* pXMLDocumentNode, - XFA_XDPPACKET ePacketID); - CXFA_Node* ParseAsXDPPacket_User(CFX_XMLNode* pXMLDocumentNode, - XFA_XDPPACKET ePacketID); + XFA_PacketType ePacketID); + CXFA_Node* ParseAsXDPPacket_Xdc(CFX_XMLNode* pXMLDocumentNode); + CXFA_Node* ParseAsXDPPacket_User(CFX_XMLNode* pXMLDocumentNode); CXFA_Node* NormalLoader(CXFA_Node* pXFANode, CFX_XMLNode* pXMLDoc, - XFA_XDPPACKET ePacketID, + XFA_PacketType ePacketID, bool bUseAttribute); CXFA_Node* DataLoader(CXFA_Node* pXFANode, CFX_XMLNode* pXMLDoc, @@ -64,16 +60,16 @@ class CXFA_SimpleParser { CXFA_Node* UserPacketLoader(CXFA_Node* pXFANode, CFX_XMLNode* pXMLDoc); void ParseContentNode(CXFA_Node* pXFANode, CFX_XMLNode* pXMLNode, - XFA_XDPPACKET ePacketID); + XFA_PacketType ePacketID); void ParseDataValue(CXFA_Node* pXFANode, CFX_XMLNode* pXMLNode, - XFA_XDPPACKET ePacketID); + XFA_PacketType ePacketID); void ParseDataGroup(CXFA_Node* pXFANode, CFX_XMLNode* pXMLNode, - XFA_XDPPACKET ePacketID); + XFA_PacketType ePacketID); void ParseInstruction(CXFA_Node* pXFANode, CFX_XMLInstruction* pXMLInstruction, - XFA_XDPPACKET ePacketID); + XFA_PacketType ePacketID); CFX_XMLParser* m_pXMLParser; std::unique_ptr<CFX_XMLDoc> m_pXMLDoc; |