From dc566b0a76f9d2ad112c8cc35fa6dc8eaf942316 Mon Sep 17 00:00:00 2001 From: Henrique Nakashima Date: Wed, 4 Apr 2018 16:38:40 +0000 Subject: Fix XFA caret blinking only while mouse moves. 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 Reviewed-by: dsinclair --- xfa/fxfa/cxfa_ffwidgethandler.cpp | 9 --------- 1 file changed, 9 deletions(-) (limited to 'xfa/fxfa/cxfa_ffwidgethandler.cpp') diff --git a/xfa/fxfa/cxfa_ffwidgethandler.cpp b/xfa/fxfa/cxfa_ffwidgethandler.cpp index 87d7a14a3e..566923e590 100644 --- a/xfa/fxfa/cxfa_ffwidgethandler.cpp +++ b/xfa/fxfa/cxfa_ffwidgethandler.cpp @@ -72,7 +72,6 @@ bool CXFA_FFWidgetHandler::OnLButtonDblClk(CXFA_FFWidget* hWidget, uint32_t dwFlags, const CFX_PointF& point) { bool bRet = hWidget->OnLButtonDblClk(dwFlags, hWidget->Rotate2Normal(point)); - m_pDocView->RunInvalidate(); return bRet; } @@ -80,7 +79,6 @@ bool CXFA_FFWidgetHandler::OnMouseMove(CXFA_FFWidget* hWidget, uint32_t dwFlags, const CFX_PointF& point) { bool bRet = hWidget->OnMouseMove(dwFlags, hWidget->Rotate2Normal(point)); - m_pDocView->RunInvalidate(); return bRet; } @@ -90,7 +88,6 @@ bool CXFA_FFWidgetHandler::OnMouseWheel(CXFA_FFWidget* hWidget, const CFX_PointF& point) { bool bRet = hWidget->OnMouseWheel(dwFlags, zDelta, hWidget->Rotate2Normal(point)); - m_pDocView->RunInvalidate(); return bRet; } @@ -102,7 +99,6 @@ bool CXFA_FFWidgetHandler::OnRButtonDown(CXFA_FFWidget* hWidget, m_pDocView->GetDoc()->GetDocEnvironment()->SetFocusWidget( m_pDocView->GetDoc(), hWidget); } - m_pDocView->RunInvalidate(); return bRet; } @@ -110,7 +106,6 @@ bool CXFA_FFWidgetHandler::OnRButtonUp(CXFA_FFWidget* hWidget, uint32_t dwFlags, const CFX_PointF& point) { bool bRet = hWidget->OnRButtonUp(dwFlags, hWidget->Rotate2Normal(point)); - m_pDocView->RunInvalidate(); return bRet; } @@ -118,7 +113,6 @@ bool CXFA_FFWidgetHandler::OnRButtonDblClk(CXFA_FFWidget* hWidget, uint32_t dwFlags, const CFX_PointF& point) { bool bRet = hWidget->OnRButtonDblClk(dwFlags, hWidget->Rotate2Normal(point)); - m_pDocView->RunInvalidate(); return bRet; } @@ -126,7 +120,6 @@ bool CXFA_FFWidgetHandler::OnKeyDown(CXFA_FFWidget* hWidget, uint32_t dwKeyCode, uint32_t dwFlags) { bool bRet = hWidget->OnKeyDown(dwKeyCode, dwFlags); - m_pDocView->RunInvalidate(); m_pDocView->UpdateDocView(); return bRet; } @@ -135,7 +128,6 @@ bool CXFA_FFWidgetHandler::OnKeyUp(CXFA_FFWidget* hWidget, uint32_t dwKeyCode, uint32_t dwFlags) { bool bRet = hWidget->OnKeyUp(dwKeyCode, dwFlags); - m_pDocView->RunInvalidate(); return bRet; } @@ -143,7 +135,6 @@ bool CXFA_FFWidgetHandler::OnChar(CXFA_FFWidget* hWidget, uint32_t dwChar, uint32_t dwFlags) { bool bRet = hWidget->OnChar(dwChar, dwFlags); - m_pDocView->RunInvalidate(); return bRet; } -- cgit v1.2.3