summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_fflistbox.cpp
diff options
context:
space:
mode:
authorHenrique Nakashima <hnakashima@chromium.org>2018-04-04 16:38:40 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-04-04 16:38:40 +0000
commitdc566b0a76f9d2ad112c8cc35fa6dc8eaf942316 (patch)
tree60e72e3b14db2f3cb26fbd595ea84fed58bd9548 /xfa/fxfa/cxfa_fflistbox.cpp
parent1a2e4945f16f5dff4aba518a36edf938c9234ac3 (diff)
downloadpdfium-dc566b0a76f9d2ad112c8cc35fa6dc8eaf942316.tar.xz
Fix XFA caret blinking only while mouse moves.chromium/3389
Currently rect invalidations in XFA are only sent to the embedder only when RunInvalidate() is executed. For things which redraw on a timer, such as the caret, there was no user event to call RunInvalidate() so the page would not redraw. This CL changes the XFA code to send the invalidations to the embedder immediately and expects the embedder to combine the invalidations to limit overdraw. Bug: chromium:828561 Change-Id: I298052fd7d0c373b029eec191cc6c74c63978348 Reviewed-on: https://pdfium-review.googlesource.com/29670 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_fflistbox.cpp')
-rw-r--r--xfa/fxfa/cxfa_fflistbox.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/xfa/fxfa/cxfa_fflistbox.cpp b/xfa/fxfa/cxfa_fflistbox.cpp
index 92543e3e6b..50f9d4a772 100644
--- a/xfa/fxfa/cxfa_fflistbox.cpp
+++ b/xfa/fxfa/cxfa_fflistbox.cpp
@@ -167,14 +167,14 @@ void CXFA_FFListBox::SetItemState(int32_t nIndex, bool bSelected) {
auto* pListBox = ToListBox(m_pNormalWidget.get());
pListBox->SetSelItem(pListBox->GetSelItem(nIndex), bSelected);
m_pNormalWidget->Update();
- AddInvalidateRect();
+ InvalidateRect();
}
void CXFA_FFListBox::InsertItem(const WideStringView& wsLabel, int32_t nIndex) {
WideString wsTemp(wsLabel);
ToListBox(m_pNormalWidget.get())->AddString(wsTemp.AsStringView());
m_pNormalWidget->Update();
- AddInvalidateRect();
+ InvalidateRect();
}
void CXFA_FFListBox::DeleteItem(int32_t nIndex) {
@@ -185,7 +185,7 @@ void CXFA_FFListBox::DeleteItem(int32_t nIndex) {
pListBox->DeleteString(pListBox->GetItem(nullptr, nIndex));
pListBox->Update();
- AddInvalidateRect();
+ InvalidateRect();
}
void CXFA_FFListBox::OnProcessMessage(CFWL_Message* pMessage) {