summaryrefslogtreecommitdiff
path: root/xfa/fwl/cfwl_timer.cpp
diff options
context:
space:
mode:
authorHenrique Nakashima <hnakashima@chromium.org>2018-02-06 21:36:45 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-02-06 21:36:45 +0000
commitbfeab62b37a701dc82f180e49d26c602f96f96f9 (patch)
tree114a99e1d3c0ea26f7dc15727dae0214125b4c89 /xfa/fwl/cfwl_timer.cpp
parentf3f1869409a59adbfde4b2b546f30c81051aad14 (diff)
downloadpdfium-bfeab62b37a701dc82f180e49d26c602f96f96f9.tar.xz
Fix caret not appearing in XFA Edits.
This makes the caret appear (again?), blink, and fixes its positioning to be a little spaced from the last character. Known issue: when the edit is empty, the caret is not necessarily aligned with where the text will be. Bug: chromium:592750 Change-Id: I950b0ea236db8855c6ed50f48ec1935d97e6ccf8 Reviewed-on: https://pdfium-review.googlesource.com/25451 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'xfa/fwl/cfwl_timer.cpp')
-rw-r--r--xfa/fwl/cfwl_timer.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/xfa/fwl/cfwl_timer.cpp b/xfa/fwl/cfwl_timer.cpp
index 2734e49d78..597f928ba0 100644
--- a/xfa/fwl/cfwl_timer.cpp
+++ b/xfa/fwl/cfwl_timer.cpp
@@ -25,11 +25,13 @@ CFWL_TimerInfo* CFWL_Timer::StartTimer(uint32_t dwElapse, bool bImmediately) {
if (!pAdapterNative)
return nullptr;
- IFWL_AdapterTimerMgr* pAdapterTimerMgr = pAdapterNative->GetTimerMgr();
- if (!pAdapterTimerMgr)
+ if (!m_pTimeMgrAdapter)
+ m_pTimeMgrAdapter.reset(pAdapterNative->GetTimerMgr());
+
+ if (!m_pTimeMgrAdapter)
return nullptr;
CFWL_TimerInfo* pTimerInfo = nullptr;
- pAdapterTimerMgr->Start(this, dwElapse, bImmediately, &pTimerInfo);
+ m_pTimeMgrAdapter->Start(this, dwElapse, bImmediately, &pTimerInfo);
return pTimerInfo;
}