summaryrefslogtreecommitdiff
path: root/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
diff options
context:
space:
mode:
authordan sinclair <dsinclair@chromium.org>2017-07-12 21:56:27 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-07-13 17:11:16 +0000
commitadf922f278d23e7f955b89f48cc64b5de7925977 (patch)
tree1cae79929399b712938d88480d90ebc2c7ea59ff /fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
parenta860a3d596f3daeadfdca0cc2093bfca722fa3a3 (diff)
downloadpdfium-adf922f278d23e7f955b89f48cc64b5de7925977.tar.xz
Remove CPWL_Utils::{In,De}flateRect
This CL removes the custom InflateRect and Deflate rect code in CPWL_Utils in favour of calling the CFX_FloatRect version. This required inlining some extra code at each callsite to check the rect size and normalize. Change-Id: I7f60e5de03fc1db0c1d8e51eaa1d0e0700ebf157 Reviewed-on: https://pdfium-review.googlesource.com/7710 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/formfiller/cffl_interactiveformfiller.cpp')
-rw-r--r--fpdfsdk/formfiller/cffl_interactiveformfiller.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp b/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
index d718e7ca40..5f5e21a274 100644
--- a/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
+++ b/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
@@ -45,7 +45,11 @@ FX_RECT CFFL_InteractiveFormFiller::GetViewBBox(CPDFSDK_PageView* pPageView,
ASSERT(pPageView);
CPDF_Annot* pPDFAnnot = pAnnot->GetPDFAnnot();
- CFX_FloatRect rcWin = CPWL_Utils::InflateRect(pPDFAnnot->GetRect(), 1);
+ CFX_FloatRect rcWin = pPDFAnnot->GetRect();
+ if (!rcWin.IsEmpty()) {
+ rcWin.Inflate(1, 1);
+ rcWin.Normalize();
+ }
return rcWin.GetOuterRect();
}