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

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

Issue 2501033005: Continue fwl/core nit cleanup. (Closed)
Patch Set: 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
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..264fe00b6f567b0f674a59a794f87bfd4f609246 100644
--- a/xfa/fwl/core/ifwl_caret.cpp
+++ b/xfa/fwl/core/ifwl_caret.cpp
@@ -68,18 +68,18 @@ void IFWL_Caret::DrawCaretBK(CFX_Graphics* pGraphics,
CFX_RectF rect;
GetWidgetRect(rect);
rect.Set(0, 0, rect.width, rect.height);
+
+ if (!(m_pProperties->m_dwStates & FWL_STATE_CAT_HightLight))
Tom Sepez 2016/11/15 22:49:32 can this move to line 68?
dsinclair 2016/11/16 15:18:33 Done.
+ return;
+
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);

Powered by Google App Engine
This is Rietveld 408576698