summaryrefslogtreecommitdiff
path: root/xfa/fxfa
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-02-14 16:21:30 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-02-14 16:21:30 +0000
commit68dde3bce9bb5594b8c1320a0114ebc4be9d3ee7 (patch)
treeb14c24b3ab4e8de4aed58beb24e838b047441086 /xfa/fxfa
parent2fa6441d686e1205eb25ed2cbfc4cf47d96efec6 (diff)
downloadpdfium-68dde3bce9bb5594b8c1320a0114ebc4be9d3ee7.tar.xz
Cleanup some CXFA_Node flags and methods.
This CL removes one unused flag and inlines the check for if the node has an owned XML node. Change-Id: Id750192b37f09901a81e2faaa929a81d2262d4c7 Reviewed-on: https://pdfium-review.googlesource.com/26770 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa')
-rw-r--r--xfa/fxfa/parser/cxfa_node.cpp2
-rw-r--r--xfa/fxfa/parser/cxfa_node.h8
2 files changed, 4 insertions, 6 deletions
diff --git a/xfa/fxfa/parser/cxfa_node.cpp b/xfa/fxfa/parser/cxfa_node.cpp
index 46e601d556..a534d6ee4f 100644
--- a/xfa/fxfa/parser/cxfa_node.cpp
+++ b/xfa/fxfa/parser/cxfa_node.cpp
@@ -537,7 +537,7 @@ CXFA_Node::CXFA_Node(CXFA_Document* pDoc,
pdfium::MakeUnique<CJX_Node>(this)) {}
CXFA_Node::~CXFA_Node() {
- if (m_pXMLNode && IsOwnedXMLNode())
+ if (m_pXMLNode && HasFlag(XFA_NodeFlag_OwnXMLNode))
delete m_pXMLNode;
}
diff --git a/xfa/fxfa/parser/cxfa_node.h b/xfa/fxfa/parser/cxfa_node.h
index f34bd9bfba..8193f59e05 100644
--- a/xfa/fxfa/parser/cxfa_node.h
+++ b/xfa/fxfa/parser/cxfa_node.h
@@ -67,10 +67,9 @@ enum XFA_NodeFlag {
XFA_NodeFlag_NeedsInitApp = 1 << 2,
XFA_NodeFlag_BindFormItems = 1 << 3,
XFA_NodeFlag_UserInteractive = 1 << 4,
- XFA_NodeFlag_SkipDataBinding = 1 << 5,
- XFA_NodeFlag_OwnXMLNode = 1 << 6,
- XFA_NodeFlag_UnusedNode = 1 << 7,
- XFA_NodeFlag_LayoutGeneratedNode = 1 << 8
+ XFA_NodeFlag_OwnXMLNode = 1 << 5,
+ XFA_NodeFlag_UnusedNode = 1 << 6,
+ XFA_NodeFlag_LayoutGeneratedNode = 1 << 7
};
class CXFA_Node : public CXFA_Object {
@@ -470,7 +469,6 @@ class CXFA_Node : public CXFA_Object {
void SetImageEdit(const WideString& wsContentType,
const WideString& wsHref,
const WideString& wsData);
- bool IsOwnedXMLNode() const { return HasFlag(XFA_NodeFlag_OwnXMLNode); }
CXFA_Node* GetBindingNode() const {
if (binding_nodes_.empty())
return nullptr;