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

Unified Diff: xfa/fwl/core/ifwl_caret.cpp

Issue 2501033005: Continue fwl/core nit cleanup. (Closed)
Patch Set: Rebase to master Created 4 years, 1 month 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 | « xfa/fwl/core/ifwl_barcode.cpp ('k') | xfa/fwl/core/ifwl_checkbox.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(&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);
« no previous file with comments | « xfa/fwl/core/ifwl_barcode.cpp ('k') | xfa/fwl/core/ifwl_checkbox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698