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>
diff --git a/fpdfsdk/formfiller/cffl_formfiller.cpp b/fpdfsdk/formfiller/cffl_formfiller.cpp
index 31f6963..6d71be5 100644
--- a/fpdfsdk/formfiller/cffl_formfiller.cpp
+++ b/fpdfsdk/formfiller/cffl_formfiller.cpp
@@ -73,7 +73,11 @@
if (!rcFocus.IsEmpty())
rcWin.Union(rcFocus);
- return CPWL_Utils::InflateRect(rcWin, 1).GetOuterRect();
+ if (!rcWin.IsEmpty()) {
+ rcWin.Inflate(1, 1);
+ rcWin.Normalize();
+ }
+ return rcWin.GetOuterRect();
}
void CFFL_FormFiller::OnDraw(CPDFSDK_PageView* pPageView,