7#include "xfa/fxfa/layout/cxfa_contentlayoutitem.h"
9#include "fxjs/xfa/cjx_object.h"
10#include "third_party/base/check_op.h"
11#include "xfa/fxfa/cxfa_ffwidget.h"
12#include "xfa/fxfa/parser/cxfa_margin.h"
13#include "xfa/fxfa/parser/cxfa_node.h"
15CXFA_ContentLayoutItem::CXFA_ContentLayoutItem(
CXFA_Node* pNode,
19 m_pFFWidget->SetLayoutItem(
this);
24void CXFA_ContentLayoutItem::
Trace(
cppgc::Visitor* visitor)
const {
25 CXFA_LayoutItem::Trace(visitor);
26 visitor->Trace(m_pPrev);
27 visitor->Trace(m_pNext);
28 visitor->Trace(m_pFFWidget);
31CXFA_ContentLayoutItem* CXFA_ContentLayoutItem::
GetFirst() {
32 CXFA_ContentLayoutItem* pCurNode =
this;
39CXFA_ContentLayoutItem* CXFA_ContentLayoutItem::
GetLast() {
40 CXFA_ContentLayoutItem* pCurNode =
this;
47void CXFA_ContentLayoutItem::
InsertAfter(CXFA_ContentLayoutItem* pItem) {
48 CHECK_NE(
this, pItem);
50 pItem->m_pNext = m_pNext;
51 pItem->m_pPrev =
this;
54 pItem->m_pNext->m_pPrev = pItem;
57void CXFA_ContentLayoutItem::RemoveSelf() {
59 m_pNext->m_pPrev = m_pPrev;
61 m_pPrev->m_pNext = m_pNext;
65 return CFX_RectF(m_sPos, m_sSize);
69 CFX_PointF sPos = m_sPos;
70 CFX_SizeF sSize = m_sSize;
73 pLayoutItem = pLayoutItem->GetParent()) {
75 sPos += pContent->m_sPos;
76 CXFA_Margin* pMarginNode =
80 sPos += CFX_PointF(pMarginNode->JSObject()->GetMeasureInUnit(
82 pMarginNode->JSObject()->GetMeasureInUnit(
105 const CXFA_ContentLayoutItem* pCurNode =
this;
void InsertAfter(CXFA_ContentLayoutItem *pNext)
CXFA_ContentLayoutItem * GetPrev() const
CXFA_ContentLayoutItem * GetNext() const
CFX_RectF GetAbsoluteRect() const
CFX_RectF GetRelativeRect() const
~CXFA_ContentLayoutItem() override
CXFA_ContentLayoutItem * GetLast()
void Trace(cppgc::Visitor *visitor) const override
CXFA_ContentLayoutItem * GetFirst()
CXFA_ContentLayoutItem * AsContentLayoutItem()
CXFA_Node * GetFormNode() const
CXFA_LayoutItem(CXFA_Node *pNode, ItemType type)
XFA_Element GetElementType() const