summaryrefslogtreecommitdiff
path: root/xfa/fwl/core/cfwl_caret.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-12-07 17:23:28 -0800
committerCommit bot <commit-bot@chromium.org>2016-12-07 17:23:28 -0800
commit7fa190dbda7b3a5f46b8108aa7984b2fcc23d45c (patch)
tree334c92bc076724892ca6cfe96767f0e5ed841ca1 /xfa/fwl/core/cfwl_caret.cpp
parent919c0842b74d382e7ae60c85ff16642b646afbb9 (diff)
downloadpdfium-7fa190dbda7b3a5f46b8108aa7984b2fcc23d45c.tar.xz
Cleanup default FWL params part I
This Cl removes some of the default FWL parameters. Review-Url: https://codereview.chromium.org/2533623002
Diffstat (limited to 'xfa/fwl/core/cfwl_caret.cpp')
-rw-r--r--xfa/fwl/core/cfwl_caret.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/xfa/fwl/core/cfwl_caret.cpp b/xfa/fwl/core/cfwl_caret.cpp
index b42945c6a8..0457347b66 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);
}