diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2018-01-03 11:11:16 -0500 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-01-03 17:21:40 +0000 |
commit | cbd4410908e2a4898fdd5e0d6d17591fc2c71f54 (patch) | |
tree | 85ee81736d4c8de97e117a6500fafe6ac3c726fb /xfa/fxfa/cxfa_ffwidget.cpp | |
parent | cf3d40d10276686f972761bafd005a7715f6eb1c (diff) | |
download | pdfium-cbd4410908e2a4898fdd5e0d6d17591fc2c71f54.tar.xz |
Fold CXFA_MarginData into CXFA_Marginchromium/3311
This CL removes the CXFA_MarginData wrapper and moves the methods
directly to CXFA_Margin.
Change-Id: I7c9e979fb78d0d356605f1318489daabcb8c32cd
Reviewed-on: https://pdfium-review.googlesource.com/22110
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_ffwidget.cpp')
-rw-r--r-- | xfa/fxfa/cxfa_ffwidget.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/xfa/fxfa/cxfa_ffwidget.cpp b/xfa/fxfa/cxfa_ffwidget.cpp index fdb10a34f2..9367301175 100644 --- a/xfa/fxfa/cxfa_ffwidget.cpp +++ b/xfa/fxfa/cxfa_ffwidget.cpp @@ -31,6 +31,7 @@ #include "xfa/fxfa/cxfa_textlayout.h" #include "xfa/fxfa/cxfa_widgetacc.h" #include "xfa/fxfa/parser/cxfa_cornerdata.h" +#include "xfa/fxfa/parser/cxfa_margin.h" #include "xfa/fxfa/parser/cxfa_node.h" #include "xfa/fxgraphics/cxfa_gecolor.h" #include "xfa/fxgraphics/cxfa_gepath.h" @@ -989,9 +990,9 @@ void CXFA_FFWidget::RenderWidget(CXFA_Graphics* pGS, return; CFX_RectF rtBorder = GetRectWithoutRotate(); - CXFA_MarginData marginData = borderData.GetMarginData(); - if (marginData.HasValidNode()) - XFA_RectWidthoutMargin(rtBorder, marginData); + CXFA_Margin* margin = borderData.GetMargin(); + if (margin) + XFA_RectWidthoutMargin(rtBorder, margin); rtBorder.Normalize(); DrawBorder(pGS, borderData, rtBorder, matrix); @@ -2016,13 +2017,13 @@ RetainPtr<CFX_DIBitmap> XFA_LoadImageFromBuffer( } void XFA_RectWidthoutMargin(CFX_RectF& rt, - const CXFA_MarginData& marginData, + const CXFA_Margin* margin, bool bUI) { - if (!marginData.HasValidNode()) + if (!margin) return; - rt.Deflate(marginData.GetLeftInset(), marginData.GetTopInset(), - marginData.GetRightInset(), marginData.GetBottomInset()); + rt.Deflate(margin->GetLeftInset(), margin->GetTopInset(), + margin->GetRightInset(), margin->GetBottomInset()); } CXFA_FFWidget* XFA_GetWidgetFromLayoutItem(CXFA_LayoutItem* pLayoutItem) { |