| 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 <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 524 | 524 |
| 525 std::vector<CFX_FloatRect> aRefresh(1, rcAnnot); | 525 std::vector<CFX_FloatRect> aRefresh(1, rcAnnot); |
| 526 UnderlyingPageType* pPage = pWidget->GetUnderlyingPage(); | 526 UnderlyingPageType* pPage = pWidget->GetUnderlyingPage(); |
| 527 ASSERT(pPage); | 527 ASSERT(pPage); |
| 528 | 528 |
| 529 // If there is currently no pageview associated with the page being used | 529 // If there is currently no pageview associated with the page being used |
| 530 // do not create one. We may be in the process of tearing down the document | 530 // do not create one. We may be in the process of tearing down the document |
| 531 // and creating a new pageview at this point will cause bad things. | 531 // and creating a new pageview at this point will cause bad things. |
| 532 CPDFSDK_PageView* pPageView = m_pDocument->GetPageView(pPage, false); | 532 CPDFSDK_PageView* pPageView = m_pDocument->GetPageView(pPage, false); |
| 533 if (pPageView) { | 533 if (pPageView) { |
| 534 #if PDF_ENABLE_XFA |
| 534 pPageView->DeleteAnnot(pWidget); | 535 pPageView->DeleteAnnot(pWidget); |
| 536 #endif // PDF_ENABLE_XFA |
| 535 pPageView->UpdateRects(aRefresh); | 537 pPageView->UpdateRects(aRefresh); |
| 536 } | 538 } |
| 537 } | 539 } |
| 538 m_pDocument->SetChangeMark(); | 540 m_pDocument->SetChangeMark(); |
| 539 | 541 |
| 540 return TRUE; | 542 return TRUE; |
| 541 } | 543 } |
| 542 | 544 |
| 543 // reset filed values within a document. | 545 // reset filed values within a document. |
| 544 // comment: | 546 // comment: |
| (...skipping 1174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1719 } | 1721 } |
| 1720 } | 1722 } |
| 1721 | 1723 |
| 1722 for (const auto& pData : DelayDataForFieldAndControlIndex) | 1724 for (const auto& pData : DelayDataForFieldAndControlIndex) |
| 1723 Field::DoDelay(m_pDocument.Get(), pData.get()); | 1725 Field::DoDelay(m_pDocument.Get(), pData.get()); |
| 1724 } | 1726 } |
| 1725 | 1727 |
| 1726 CJS_Document* Document::GetCJSDoc() const { | 1728 CJS_Document* Document::GetCJSDoc() const { |
| 1727 return static_cast<CJS_Document*>(m_pJSObject); | 1729 return static_cast<CJS_Document*>(m_pJSObject); |
| 1728 } | 1730 } |
| OLD | NEW |