summaryrefslogtreecommitdiff
path: root/xfa/fwl/core/ifwl_caret.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-11-16 08:44:31 -0800
committerCommit bot <commit-bot@chromium.org>2016-11-16 08:44:31 -0800
commitd4f24c79c8b67401bdb1326c03083853326f7554 (patch)
tree6725841e42e304ce2c35614267ab1873d81949a9 /xfa/fwl/core/ifwl_caret.cpp
parent92549cd7502296328aecef23dab6d7fc0e847645 (diff)
downloadpdfium-d4f24c79c8b67401bdb1326c03083853326f7554.tar.xz
Continue fwl/core nit cleanup.
Review-Url: https://codereview.chromium.org/2501033005
Diffstat (limited to 'xfa/fwl/core/ifwl_caret.cpp')
-rw-r--r--xfa/fwl/core/ifwl_caret.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/xfa/fwl/core/ifwl_caret.cpp b/xfa/fwl/core/ifwl_caret.cpp
index f333fdd94c..0b84cdf53b 100644
--- a/xfa/fwl/core/ifwl_caret.cpp
+++ b/xfa/fwl/core/ifwl_caret.cpp
@@ -65,21 +65,21 @@ void IFWL_Caret::ShowCaret(bool bFlag) {
void IFWL_Caret::DrawCaretBK(CFX_Graphics* pGraphics,
IFWL_ThemeProvider* pTheme,
const CFX_Matrix* pMatrix) {
+ if (!(m_pProperties->m_dwStates & FWL_STATE_CAT_HightLight))
+ return;
+
CFX_RectF rect;
GetWidgetRect(rect);
rect.Set(0, 0, rect.width, rect.height);
+
CFWL_ThemeBackground param;
param.m_pWidget = this;
param.m_pGraphics = pGraphics;
param.m_rtPart = rect;
- if (!(m_pProperties->m_dwStates & FWL_STATE_CAT_HightLight))
- return;
-
param.m_iPart = CFWL_Part::Background;
param.m_dwStates = CFWL_PartState_HightLight;
if (pMatrix)
param.m_matrix.Concat(*pMatrix);
-
pTheme->DrawBackground(&param);
}
@@ -94,8 +94,8 @@ IFWL_Caret::Timer::Timer(IFWL_Caret* pCaret) : IFWL_Timer(pCaret) {}
void IFWL_Caret::Timer::Run(IFWL_TimerInfo* pTimerInfo) {
IFWL_Caret* pCaret = static_cast<IFWL_Caret*>(m_pWidget);
- bool toggle = !(pCaret->GetStates() & FWL_STATE_CAT_HightLight);
- pCaret->SetStates(FWL_STATE_CAT_HightLight, toggle);
+ pCaret->SetStates(FWL_STATE_CAT_HightLight,
+ !(pCaret->GetStates() & FWL_STATE_CAT_HightLight));
CFX_RectF rt;
pCaret->GetWidgetRect(rt);