Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(454)

Side by Side Diff: xfa/fxfa/parser/cxfa_traversestrategy_contentareacontainerlayoutitem.h

Issue 2207033002: Split xfa_layout_appadapter (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: fix build Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7 #ifndef XFA_FXFA_PARSER_CXFA_TRAVERSESTRATEGY_CONTENTAREACONTAINERLAYOUTITEM_H_
8 #define XFA_FXFA_PARSER_CXFA_TRAVERSESTRATEGY_CONTENTAREACONTAINERLAYOUTITEM_H_
9
10 #include "xfa/fxfa/parser/cxfa_containerlayoutitem.h"
11
12 class CXFA_TraverseStrategy_ContentAreaContainerLayoutItem {
13 public:
14 static CXFA_ContainerLayoutItem* GetFirstChild(
15 CXFA_ContainerLayoutItem* pLayoutItem) {
16 for (CXFA_LayoutItem* pChildItem = pLayoutItem->m_pFirstChild; pChildItem;
17 pChildItem = pChildItem->m_pNextSibling) {
18 if (CXFA_ContainerLayoutItem* pContainer =
19 pChildItem->AsContainerLayoutItem()) {
20 return pContainer;
21 }
22 }
23 return nullptr;
24 }
25
26 static CXFA_ContainerLayoutItem* GetNextSibling(
27 CXFA_ContainerLayoutItem* pLayoutItem) {
28 for (CXFA_LayoutItem* pChildItem = pLayoutItem->m_pNextSibling; pChildItem;
29 pChildItem = pChildItem->m_pNextSibling) {
30 if (CXFA_ContainerLayoutItem* pContainer =
31 pChildItem->AsContainerLayoutItem()) {
32 return pContainer;
33 }
34 }
35 return nullptr;
36 }
37
38 static CXFA_ContainerLayoutItem* GetParent(
39 CXFA_ContainerLayoutItem* pLayoutItem) {
40 return static_cast<CXFA_ContainerLayoutItem*>(pLayoutItem->m_pParent);
41 }
42 };
43
44 #endif // XFA_FXFA_PARSER_CXFA_TRAVERSESTRATEGY_CONTENTAREACONTAINERLAYOUTITEM_ H_
OLDNEW
« no previous file with comments | « xfa/fxfa/parser/cxfa_layoutprocessor.cpp ('k') | xfa/fxfa/parser/cxfa_traversestrategy_contentlayoutitem.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698