From e74ae8c02f6b5efa37ba11bcad6b714046cfc7b0 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Mon, 20 Nov 2017 20:28:23 +0000 Subject: 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 Reviewed-by: Tom Sepez --- xfa/fxfa/parser/cxfa_layoutprocessor.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'xfa/fxfa/parser/cxfa_layoutprocessor.cpp') diff --git a/xfa/fxfa/parser/cxfa_layoutprocessor.cpp b/xfa/fxfa/parser/cxfa_layoutprocessor.cpp index a2494e24b1..b8afd6ec19 100644 --- a/xfa/fxfa/parser/cxfa_layoutprocessor.cpp +++ b/xfa/fxfa/parser/cxfa_layoutprocessor.cpp @@ -122,8 +122,7 @@ CXFA_ContainerLayoutItem* CXFA_LayoutProcessor::GetPage(int32_t index) const { } CXFA_LayoutItem* CXFA_LayoutProcessor::GetLayoutItem(CXFA_Node* pFormItem) { - return static_cast( - pFormItem->JSNode()->GetUserData(XFA_LAYOUTITEMKEY, false)); + return pFormItem->JSNode()->GetLayoutItem(); } void CXFA_LayoutProcessor::AddChangedContainer(CXFA_Node* pContainer) { -- cgit v1.2.3