diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-11-20 20:28:23 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-11-20 20:28:23 +0000 |
commit | e74ae8c02f6b5efa37ba11bcad6b714046cfc7b0 (patch) | |
tree | 1c5353b26b58732e5bda616ba5d9fc8f414a7037 /xfa/fxfa/parser/cxfa_contentlayoutitem.cpp | |
parent | 68c77592f25f9173d2166fa01fb34b4155f4cfcb (diff) | |
download | pdfium-e74ae8c02f6b5efa37ba11bcad6b714046cfc7b0.tar.xz |
Convert calc data and layout item to store in CJX_Node
This CL moves the XFA_CalcData and XFA_LayoutItem out of the map'd data
for a CJX_Node and stores directly on the node. This makes the object a
bit bigger but makes the code a lot more understandable.
Change-Id: I8897a52d61d37595181960c23928984aa5d67efc
Reviewed-on: https://pdfium-review.googlesource.com/18590
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_contentlayoutitem.cpp')
-rw-r--r-- | xfa/fxfa/parser/cxfa_contentlayoutitem.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xfa/fxfa/parser/cxfa_contentlayoutitem.cpp b/xfa/fxfa/parser/cxfa_contentlayoutitem.cpp index 28871259ce..0c9cab4e2d 100644 --- a/xfa/fxfa/parser/cxfa_contentlayoutitem.cpp +++ b/xfa/fxfa/parser/cxfa_contentlayoutitem.cpp @@ -15,6 +15,6 @@ CXFA_ContentLayoutItem::CXFA_ContentLayoutItem(CXFA_Node* pNode) m_dwStatus(0) {} CXFA_ContentLayoutItem::~CXFA_ContentLayoutItem() { - if (m_pFormNode->JSNode()->GetUserData(XFA_LAYOUTITEMKEY, false) == this) - m_pFormNode->JSNode()->SetUserData(XFA_LAYOUTITEMKEY, nullptr, nullptr); + if (m_pFormNode->JSNode()->GetLayoutItem() == this) + m_pFormNode->JSNode()->SetLayoutItem(nullptr); } |