summaryrefslogtreecommitdiff
path: root/fpdfsdk/pdfwindow/cpwl_edit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/pdfwindow/cpwl_edit.cpp')
-rw-r--r--fpdfsdk/pdfwindow/cpwl_edit.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/fpdfsdk/pdfwindow/cpwl_edit.cpp b/fpdfsdk/pdfwindow/cpwl_edit.cpp
index 92b3f6498e..7d75bc693d 100644
--- a/fpdfsdk/pdfwindow/cpwl_edit.cpp
+++ b/fpdfsdk/pdfwindow/cpwl_edit.cpp
@@ -103,13 +103,8 @@ void CPWL_Edit::RePosChildWnd() {
}
CFX_FloatRect CPWL_Edit::GetClientRect() const {
- CFX_FloatRect rcClient = GetWindowRect();
- if (!rcClient.IsEmpty()) {
- float width = static_cast<float>(GetBorderWidth() + GetInnerBorderWidth());
- rcClient.Deflate(width, width);
- rcClient.Normalize();
- }
-
+ float width = static_cast<float>(GetBorderWidth() + GetInnerBorderWidth());
+ CFX_FloatRect rcClient = GetWindowRect().GetDeflated(width, width);
if (CPWL_ScrollBar* pVSB = GetVScrollBar()) {
if (pVSB->IsVisible()) {
rcClient.right -= PWL_SCROLLBAR_WIDTH;