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

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

Issue 2533623002: Cleanup default FWL params part I (Closed)
Patch Set: Rebase to master Created 4 years 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/cfwl_caret.h ('k') | xfa/fwl/core/cfwl_checkbox.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/core/cfwl_caret.cpp
diff --git a/xfa/fwl/core/cfwl_caret.cpp b/xfa/fwl/core/cfwl_caret.cpp
index b42945c6a87b92bb2b2f7426ff46a1974b3b0ccd..0457347b663f705698a4431074625f4525dc6077 100644
--- a/xfa/fwl/core/cfwl_caret.cpp
+++ b/xfa/fwl/core/cfwl_caret.cpp
@@ -59,7 +59,7 @@ void CFWL_Caret::ShowCaret() {
if (m_pTimerInfo)
m_pTimerInfo->StopTimer();
m_pTimerInfo = m_pTimer->StartTimer(kFrequency, true);
- SetStates(FWL_WGTSTATE_Invisible, false);
+ RemoveStates(FWL_WGTSTATE_Invisible);
}
void CFWL_Caret::HideCaret() {
@@ -67,7 +67,7 @@ void CFWL_Caret::HideCaret() {
m_pTimerInfo->StopTimer();
m_pTimerInfo = nullptr;
}
- SetStates(FWL_WGTSTATE_Invisible, true);
+ SetStates(FWL_WGTSTATE_Invisible);
}
void CFWL_Caret::DrawCaretBK(CFX_Graphics* pGraphics,
@@ -77,7 +77,7 @@ void CFWL_Caret::DrawCaretBK(CFX_Graphics* pGraphics,
return;
CFX_RectF rect;
- GetWidgetRect(rect);
+ GetWidgetRect(rect, false);
rect.Set(0, 0, rect.width, rect.height);
CFWL_ThemeBackground param;
@@ -102,11 +102,13 @@ CFWL_Caret::Timer::Timer(CFWL_Caret* pCaret) : CFWL_Timer(pCaret) {}
void CFWL_Caret::Timer::Run(CFWL_TimerInfo* pTimerInfo) {
CFWL_Caret* pCaret = static_cast<CFWL_Caret*>(m_pWidget);
- pCaret->SetStates(FWL_STATE_CAT_HightLight,
- !(pCaret->GetStates() & FWL_STATE_CAT_HightLight));
+ if (!(pCaret->GetStates() & FWL_STATE_CAT_HightLight))
+ pCaret->SetStates(FWL_STATE_CAT_HightLight);
+ else
+ pCaret->RemoveStates(FWL_STATE_CAT_HightLight);
CFX_RectF rt;
- pCaret->GetWidgetRect(rt);
+ pCaret->GetWidgetRect(rt, false);
rt.Set(0, 0, rt.width + 1, rt.height);
pCaret->Repaint(&rt);
}
« no previous file with comments | « xfa/fwl/core/cfwl_caret.h ('k') | xfa/fwl/core/cfwl_checkbox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698