| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #include "fpdfsdk/javascript/Document.h" | 7 #include "fpdfsdk/javascript/Document.h" |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 487 if (widgets.empty()) | 487 if (widgets.empty()) |
| 488 return TRUE; | 488 return TRUE; |
| 489 | 489 |
| 490 for (CPDFSDK_Widget* pWidget : widgets) { | 490 for (CPDFSDK_Widget* pWidget : widgets) { |
| 491 CFX_FloatRect rcAnnot = pWidget->GetRect(); | 491 CFX_FloatRect rcAnnot = pWidget->GetRect(); |
| 492 --rcAnnot.left; | 492 --rcAnnot.left; |
| 493 --rcAnnot.bottom; | 493 --rcAnnot.bottom; |
| 494 ++rcAnnot.right; | 494 ++rcAnnot.right; |
| 495 ++rcAnnot.top; | 495 ++rcAnnot.top; |
| 496 | 496 |
| 497 CFX_RectArray aRefresh; | 497 std::vector<CFX_FloatRect> aRefresh(1, rcAnnot); |
| 498 aRefresh.Add(rcAnnot); | |
| 499 | |
| 500 UnderlyingPageType* pPage = pWidget->GetUnderlyingPage(); | 498 UnderlyingPageType* pPage = pWidget->GetUnderlyingPage(); |
| 501 ASSERT(pPage); | 499 ASSERT(pPage); |
| 502 | 500 |
| 503 CPDFSDK_PageView* pPageView = m_pDocument->GetPageView(pPage); | 501 CPDFSDK_PageView* pPageView = m_pDocument->GetPageView(pPage); |
| 504 pPageView->DeleteAnnot(pWidget); | 502 pPageView->DeleteAnnot(pWidget); |
| 505 pPageView->UpdateRects(aRefresh); | 503 pPageView->UpdateRects(aRefresh); |
| 506 } | 504 } |
| 507 m_pDocument->SetChangeMark(); | 505 m_pDocument->SetChangeMark(); |
| 508 | 506 |
| 509 return TRUE; | 507 return TRUE; |
| (...skipping 1076 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1586 } | 1584 } |
| 1587 } | 1585 } |
| 1588 | 1586 |
| 1589 for (const auto& pData : DelayDataForFieldAndControlIndex) | 1587 for (const auto& pData : DelayDataForFieldAndControlIndex) |
| 1590 Field::DoDelay(m_pDocument, pData.get()); | 1588 Field::DoDelay(m_pDocument, pData.get()); |
| 1591 } | 1589 } |
| 1592 | 1590 |
| 1593 CJS_Document* Document::GetCJSDoc() const { | 1591 CJS_Document* Document::GetCJSDoc() const { |
| 1594 return static_cast<CJS_Document*>(m_pJSObject); | 1592 return static_cast<CJS_Document*>(m_pJSObject); |
| 1595 } | 1593 } |
| OLD | NEW |