OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "xfa/src/foxitlib.h" | 9 #include "xfa/src/foxitlib.h" |
10 #include "xfa/src/fxfa/src/common/xfa_utils.h" | 10 #include "xfa/src/fxfa/src/common/xfa_utils.h" |
(...skipping 1752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1763 return fTotalHeight; | 1763 return fTotalHeight; |
1764 } | 1764 } |
1765 if (pProcessor->m_pLayoutItem == NULL) { | 1765 if (pProcessor->m_pLayoutItem == NULL) { |
1766 pProcessor->m_pLayoutItem = | 1766 pProcessor->m_pLayoutItem = |
1767 pProcessor->CreateContentLayoutItem(pCurChildNode); | 1767 pProcessor->CreateContentLayoutItem(pCurChildNode); |
1768 pProcessor->m_pLayoutItem->m_sSize.Set(0, 0); | 1768 pProcessor->m_pLayoutItem->m_sSize.Set(0, 0); |
1769 } | 1769 } |
1770 while (pProcessor->m_rgPendingNodes.GetCount() > 0) { | 1770 while (pProcessor->m_rgPendingNodes.GetCount() > 0) { |
1771 FX_POSITION pos = pProcessor->m_rgPendingNodes.GetHeadPosition(); | 1771 FX_POSITION pos = pProcessor->m_rgPendingNodes.GetHeadPosition(); |
1772 CXFA_Node* pPendingNode = | 1772 CXFA_Node* pPendingNode = |
1773 (CXFA_Node*)pProcessor->m_rgPendingNodes.GetAt(pos); | 1773 reinterpret_cast<CXFA_Node*>(pProcessor->m_rgPendingNodes.GetAt(pos)); |
1774 pProcessor->m_rgPendingNodes.RemoveAt(pos); | 1774 pProcessor->m_rgPendingNodes.RemoveAt(pos); |
1775 CXFA_ContentLayoutItem* pPendingLayoutItem = NULL; | 1775 CXFA_ContentLayoutItem* pPendingLayoutItem = NULL; |
1776 CXFA_ItemLayoutProcessor* pPendingProcessor = | 1776 CXFA_ItemLayoutProcessor* pPendingProcessor = |
1777 new CXFA_ItemLayoutProcessor(pPendingNode, NULL); | 1777 new CXFA_ItemLayoutProcessor(pPendingNode, NULL); |
1778 #ifndef _XFA_LAYOUTITEM_ProcessCACHE_ | 1778 #ifndef _XFA_LAYOUTITEM_ProcessCACHE_ |
1779 pPendingProcessor->m_pPageMgrCreateItem = pProcessor->m_pPageMgrCreateItem; | 1779 pPendingProcessor->m_pPageMgrCreateItem = pProcessor->m_pPageMgrCreateItem; |
1780 #endif | 1780 #endif |
1781 pPendingProcessor->DoLayout(FALSE, XFA_LAYOUT_FLOAT_MAX); | 1781 pPendingProcessor->DoLayout(FALSE, XFA_LAYOUT_FLOAT_MAX); |
1782 pPendingLayoutItem = pPendingProcessor->HasLayoutItem() | 1782 pPendingLayoutItem = pPendingProcessor->HasLayoutItem() |
1783 ? pPendingProcessor->ExtractLayoutItem() | 1783 ? pPendingProcessor->ExtractLayoutItem() |
(...skipping 1233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3017 (int32_t)(uintptr_t)m_PendingNodesCount.GetValueAt(pTemplate); | 3017 (int32_t)(uintptr_t)m_PendingNodesCount.GetValueAt(pTemplate); |
3018 if (iCount >= iMax) { | 3018 if (iCount >= iMax) { |
3019 return FALSE; | 3019 return FALSE; |
3020 } | 3020 } |
3021 iCount++; | 3021 iCount++; |
3022 m_PendingNodesCount.SetAt(pTemplate, (void*)(uintptr_t)(iCount)); | 3022 m_PendingNodesCount.SetAt(pTemplate, (void*)(uintptr_t)(iCount)); |
3023 return TRUE; | 3023 return TRUE; |
3024 } | 3024 } |
3025 return TRUE; | 3025 return TRUE; |
3026 } | 3026 } |
OLD | NEW |