Index: xfa/fwl/core/ifwl_caret.cpp |
diff --git a/xfa/fwl/core/ifwl_caret.cpp b/xfa/fwl/core/ifwl_caret.cpp |
index f333fdd94cd7c6bea7836b236da9bdf6505238ca..0b84cdf53bc659de7319a9916808229a74f08775 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(¶m); |
} |
@@ -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); |