summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_ffcombobox.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_ffcombobox.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_ffcombobox.cpp')
-rw-r--r--xfa/fxfa/cxfa_ffcombobox.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/xfa/fxfa/cxfa_ffcombobox.cpp b/xfa/fxfa/cxfa_ffcombobox.cpp
index f3d4d22f50..268d1da2b4 100644
--- a/xfa/fxfa/cxfa_ffcombobox.cpp
+++ b/xfa/fxfa/cxfa_ffcombobox.cpp
@@ -266,14 +266,14 @@ FormFieldType CXFA_FFComboBox::GetFormFieldType() {
void CXFA_FFComboBox::SetItemState(int32_t nIndex, bool bSelected) {
ToComboBox(m_pNormalWidget.get())->SetCurSel(bSelected ? nIndex : -1);
m_pNormalWidget->Update();
- AddInvalidateRect();
+ InvalidateRect();
}
void CXFA_FFComboBox::InsertItem(const WideStringView& wsLabel,
int32_t nIndex) {
ToComboBox(m_pNormalWidget.get())->AddString(wsLabel);
m_pNormalWidget->Update();
- AddInvalidateRect();
+ InvalidateRect();
}
void CXFA_FFComboBox::DeleteItem(int32_t nIndex) {
@@ -283,7 +283,7 @@ void CXFA_FFComboBox::DeleteItem(int32_t nIndex) {
ToComboBox(m_pNormalWidget.get())->RemoveAt(nIndex);
m_pNormalWidget->Update();
- AddInvalidateRect();
+ InvalidateRect();
}
void CXFA_FFComboBox::OnTextChanged(CFWL_Widget* pWidget,