Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(360)

Unified Diff: xfa/fwl/theme/cfwl_checkboxtp.cpp

Issue 2016243003: Fix two bugs found by /analyze tool (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | xfa/fwl/theme/cfwl_formtp.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/theme/cfwl_checkboxtp.cpp
diff --git a/xfa/fwl/theme/cfwl_checkboxtp.cpp b/xfa/fwl/theme/cfwl_checkboxtp.cpp
index 9a10c60a3dfdf5e242a3854279007a327fe70d27..23cc21f3608c3accb219014f403daad1538c82d6 100644
--- a/xfa/fwl/theme/cfwl_checkboxtp.cpp
+++ b/xfa/fwl/theme/cfwl_checkboxtp.cpp
@@ -166,22 +166,21 @@ void CFWL_CheckBoxTP::DrawSign(IFWL_Widget* pWidget,
CFX_RectF rtSign(*pRtBox);
rtSign.Deflate(kSignMargin, kSignMargin);
uint32_t dwColor = m_pThemeData->clrSignCheck;
- FX_BOOL bCheck = TRUE;
+ bool bCheck = true;
if ((dwStates & CFWL_PartState_Disabled) &&
(dwStates & CFWL_PartState_Checked)) {
dwColor = m_pThemeData->clrSignBorderDisable;
} else if (dwStates & CFWL_PartState_Neutral) {
- if (dwStates & CFWL_PartState_Normal) {
- bCheck = FALSE;
- dwColor = m_pThemeData->clrSignNeutralNormal;
- } else if (dwStates & CFWL_PartState_Hovered) {
- bCheck = FALSE;
+ if (dwStates & CFWL_PartState_Hovered) {
dwColor = m_pThemeData->clrSignNeutralHover;
} else if (dwStates & CFWL_PartState_Pressed) {
- bCheck = FALSE, dwColor = m_pThemeData->clrSignNeutralPressed;
+ dwColor = m_pThemeData->clrSignNeutralPressed;
} else if (dwStates & CFWL_PartState_Disabled) {
- bCheck = FALSE, dwColor = m_pThemeData->clrSignBorderDisable;
+ dwColor = m_pThemeData->clrSignBorderDisable;
+ } else {
+ dwColor = m_pThemeData->clrSignNeutralNormal;
}
+ bCheck = false;
}
if (bCheck) {
uint32_t dwStyle = pWidget->GetStylesEx();
« no previous file with comments | « no previous file | xfa/fwl/theme/cfwl_formtp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698