summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/pdfwindow/PWL_ScrollBar.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-12-14 18:27:25 -0800
committerLei Zhang <thestig@chromium.org>2015-12-14 18:27:25 -0800
commit96660d6f382204339d6b1aadc3913303d436e252 (patch)
treeb5f84756e1a89251831cebc05b9d4e1f6cb2027b /fpdfsdk/src/pdfwindow/PWL_ScrollBar.cpp
parentd983b09c3ae29a97cba8e9ec9c6351545f6087ee (diff)
downloadpdfium-96660d6f382204339d6b1aadc3913303d436e252.tar.xz
Merge to XFA: Get rid of most instance of 'foo != NULL'
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1512763013 . (cherry picked from commit e3c7c2b54348da4a6939f6672f6c6bff126815a7) Review URL: https://codereview.chromium.org/1529553003 .
Diffstat (limited to 'fpdfsdk/src/pdfwindow/PWL_ScrollBar.cpp')
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_ScrollBar.cpp37
1 files changed, 2 insertions, 35 deletions
diff --git a/fpdfsdk/src/pdfwindow/PWL_ScrollBar.cpp b/fpdfsdk/src/pdfwindow/PWL_ScrollBar.cpp
index f4d4baf6e9..b6a1bb3e6e 100644
--- a/fpdfsdk/src/pdfwindow/PWL_ScrollBar.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_ScrollBar.cpp
@@ -14,9 +14,6 @@
#define IsFloatSmaller(fa, fb) ((fa) < (fb) && !IsFloatZero((fa) - (fb)))
#define IsFloatEqual(fa, fb) IsFloatZero((fa) - (fb))
-/* ------------------------------- PWL_FLOATRANGE
- * ------------------------------- */
-
PWL_FLOATRANGE::PWL_FLOATRANGE() {
Default();
}
@@ -49,9 +46,6 @@ FX_FLOAT PWL_FLOATRANGE::GetWidth() const {
return fMax - fMin;
}
-/* ------------------------------- PWL_SCROLL_PRIVATEDATA
- * ------------------------------- */
-
PWL_SCROLL_PRIVATEDATA::PWL_SCROLL_PRIVATEDATA() {
Default();
}
@@ -113,9 +107,6 @@ void PWL_SCROLL_PRIVATEDATA::SubBig() {
SetPos(ScrollRange.fMin);
}
-/* ------------------------------- CPWL_SBButton -------------------------------
- */
-
CPWL_SBButton::CPWL_SBButton(PWL_SCROLLBAR_TYPE eScrollBarType,
PWL_SBBUTTON_TYPE eButtonType) {
m_eScrollBarType = eScrollBarType;
@@ -405,8 +396,6 @@ void CPWL_SBButton::DrawThisAppearance(CFX_RenderDevice* pDevice,
}
} break;
case PSBT_POS: {
- // CPWL_Wnd::DrawThisAppearance(pDevice,pUser2Device);
-
// draw border
CPDF_Rect rcDraw = rectWnd;
CPWL_Utils::DrawStrokeRect(pDevice, pUser2Device, rcDraw,
@@ -532,14 +521,6 @@ void CPWL_SBButton::DrawThisAppearance(CFX_RenderDevice* pDevice,
CPWL_Utils::DrawStrokeLine(pDevice, pUser2Device, ptLeft, ptRight,
crStroke, 1.0f);
-
- /*
- ptLeft.y += 1.5f;
- ptRight.y += 1.5f;
-
- CPWL_Utils::DrawStrokeLine(pDevice, pUser2Device, ptLeft, ptRight,
- ArgbEncode(nTransparancy,150,150,150),1.0f);
- */
}
} break;
default:
@@ -580,24 +561,11 @@ FX_BOOL CPWL_SBButton::OnMouseMove(const CPDF_Point& point, FX_DWORD nFlag) {
if (CPWL_Wnd* pParent = GetParentWindow()) {
pParent->OnNotify(this, PNM_MOUSEMOVE, 0, (intptr_t)&point);
-
- /*
- if (m_bMouseDown && (m_eSBButtonType == PSBT_MIN || m_eSBButtonType ==
- PSBT_MAX))
- {
- if
- (!pParent->OnNotify(this,PNM_LBUTTONDOWN,nFlags,(intptr_t)&point))
- return FALSE;
- }
- */
}
return TRUE;
}
-/* ------------------------------- CPWL_ScrollBar
- * ---------------------------------- */
-
CPWL_ScrollBar::CPWL_ScrollBar(PWL_SCROLLBAR_TYPE sbType)
: m_sbType(sbType),
m_pMinButton(NULL),
@@ -923,9 +891,8 @@ void CPWL_ScrollBar::SetScrollStep(FX_FLOAT fBigStep, FX_FLOAT fSmallStep) {
}
void CPWL_ScrollBar::MovePosButton(FX_BOOL bRefresh) {
- ASSERT(m_pPosButton != NULL);
- ASSERT(m_pMinButton != NULL);
- ASSERT(m_pMaxButton != NULL);
+ ASSERT(m_pMinButton);
+ ASSERT(m_pMaxButton);
if (m_pPosButton->IsVisible()) {
CPDF_Rect rcClient;