summaryrefslogtreecommitdiff
path: root/fpdfsdk/pdfwindow/cpwl_wnd.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-07-05 14:18:14 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-07-05 19:46:20 +0000
commita9e28433600816a20406709c5652ba91697bc387 (patch)
tree8b0ad8cc5f67f5abbdf096501efb49443efd6288 /fpdfsdk/pdfwindow/cpwl_wnd.cpp
parent7f6bec9b4c0cb2f53724ea83715d4fe22eed1d28 (diff)
downloadpdfium-a9e28433600816a20406709c5652ba91697bc387.tar.xz
Cleanup some CPWL_Wnd defines
This CL removes unused #define's and moves ones that are only used in a single .cpp class to that file. Change-Id: I6c503d5d4c031a870b7a1362086205a810d31478 Reviewed-on: https://pdfium-review.googlesource.com/7256 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/pdfwindow/cpwl_wnd.cpp')
-rw-r--r--fpdfsdk/pdfwindow/cpwl_wnd.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/fpdfsdk/pdfwindow/cpwl_wnd.cpp b/fpdfsdk/pdfwindow/cpwl_wnd.cpp
index 564c98c9e2..6e2e75c5a1 100644
--- a/fpdfsdk/pdfwindow/cpwl_wnd.cpp
+++ b/fpdfsdk/pdfwindow/cpwl_wnd.cpp
@@ -15,6 +15,13 @@
#include "third_party/base/ptr_util.h"
#include "third_party/base/stl_util.h"
+namespace {
+
+constexpr float kDefaultFontSize = 9.0f;
+constexpr int kInvalidationInflate = 2;
+
+} // namespace
+
PWL_CREATEPARAM::PWL_CREATEPARAM()
: rcRectWnd(0, 0, 0, 0),
pSystemHandler(nullptr),
@@ -29,7 +36,7 @@ PWL_CREATEPARAM::PWL_CREATEPARAM()
sBorderColor(),
sTextColor(),
nTransparency(255),
- fFontSize(PWL_DEFAULT_FONTSIZE),
+ fFontSize(kDefaultFontSize),
sDash(3, 0, 0),
pAttachedData(nullptr),
pParentWnd(nullptr),
@@ -326,10 +333,10 @@ void CPWL_Wnd::InvalidateRect(CFX_FloatRect* pRect) {
}
FX_RECT rcWin = PWLtoWnd(rcRefresh);
- rcWin.left -= PWL_INVALIDATE_INFLATE;
- rcWin.top -= PWL_INVALIDATE_INFLATE;
- rcWin.right += PWL_INVALIDATE_INFLATE;
- rcWin.bottom += PWL_INVALIDATE_INFLATE;
+ rcWin.left -= kInvalidationInflate;
+ rcWin.top -= kInvalidationInflate;
+ rcWin.right += kInvalidationInflate;
+ rcWin.bottom += kInvalidationInflate;
if (CFX_SystemHandler* pSH = GetSystemHandler()) {
if (CPDFSDK_Widget* widget = static_cast<CPDFSDK_Widget*>(