diff options
author | Henrique Nakashima <hnakashima@chromium.org> | 2018-04-04 16:38:40 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-04-04 16:38:40 +0000 |
commit | dc566b0a76f9d2ad112c8cc35fa6dc8eaf942316 (patch) | |
tree | 60e72e3b14db2f3cb26fbd595ea84fed58bd9548 /xfa/fxfa/cxfa_ffnotify.cpp | |
parent | 1a2e4945f16f5dff4aba518a36edf938c9234ac3 (diff) | |
download | pdfium-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_ffnotify.cpp')
-rw-r--r-- | xfa/fxfa/cxfa_ffnotify.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xfa/fxfa/cxfa_ffnotify.cpp b/xfa/fxfa/cxfa_ffnotify.cpp index 5ba699b168..5aca631914 100644 --- a/xfa/fxfa/cxfa_ffnotify.cpp +++ b/xfa/fxfa/cxfa_ffnotify.cpp @@ -333,7 +333,7 @@ void CXFA_FFNotify::OnValueChanging(CXFA_Node* pSender, XFA_Attribute eAttr) { CXFA_FFWidget* pWidget = m_pDoc->GetDocView()->GetWidgetForNode(pSender); for (; pWidget; pWidget = pSender->GetNextWidget(pWidget)) { if (pWidget->IsLoaded()) - pWidget->AddInvalidateRect(); + pWidget->InvalidateRect(); } } @@ -397,7 +397,7 @@ void CXFA_FFNotify::OnValueChanged(CXFA_Node* pSender, if (bUpdateProperty) pWidget->UpdateWidgetProperty(); pWidget->PerformLayout(); - pWidget->AddInvalidateRect(); + pWidget->InvalidateRect(); } } @@ -461,7 +461,7 @@ void CXFA_FFNotify::OnLayoutItemAdded(CXFA_LayoutProcessor* pLayout, } else { pWidget->LoadWidget(); } - pWidget->AddInvalidateRect(); + pWidget->InvalidateRect(); } void CXFA_FFNotify::OnLayoutItemRemoving(CXFA_LayoutProcessor* pLayout, @@ -476,5 +476,5 @@ void CXFA_FFNotify::OnLayoutItemRemoving(CXFA_LayoutProcessor* pLayout, pDocView->DeleteLayoutItem(pWidget); m_pDoc->GetDocEnvironment()->WidgetPreRemove(pWidget); - pWidget->AddInvalidateRect(); + pWidget->InvalidateRect(); } |