summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_node.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-02-13 19:00:27 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-02-13 19:00:27 +0000
commit8853b7f0c083c3e1829b11425a6eb796fa9bd22d (patch)
tree8e3243f61eb37ab5b46b4856d22eedcb61acbd75 /xfa/fxfa/parser/cxfa_node.cpp
parentdb8ef922e8f45fec00470e6234d9ba65e9be9537 (diff)
downloadpdfium-8853b7f0c083c3e1829b11425a6eb796fa9bd22d.tar.xz
Add tests for CXFA_Node child manipulation
This CL adds tests for CXFA_Node::InsertChild and CXFA_Node::RemoveChild methods. Change-Id: I6ef9e76dfbfa8a9b8246620ecf80c88812b332fc Reviewed-on: https://pdfium-review.googlesource.com/26371 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_node.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_node.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/xfa/fxfa/parser/cxfa_node.cpp b/xfa/fxfa/parser/cxfa_node.cpp
index 04e947e64f..4896d0c39f 100644
--- a/xfa/fxfa/parser/cxfa_node.cpp
+++ b/xfa/fxfa/parser/cxfa_node.cpp
@@ -1149,9 +1149,6 @@ void CXFA_Node::InsertChild(int32_t index, CXFA_Node* pNode) {
while (++iCount != index && pPrev->next_sibling_)
pPrev = pPrev->next_sibling_;
- if (index > 0 && index != iCount)
- return;
-
pNode->next_sibling_ = pPrev->next_sibling_;
pPrev->next_sibling_ = pNode;
index = iCount;