Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(981)

Side by Side Diff: fpdfsdk/javascript/Document.cpp

Issue 1906903002: Replace CFX_RectArray with std::vector<CFX_FloatRect> (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Remove unused method Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fpdfsdk/include/fsdk_mgr.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « fpdfsdk/include/fsdk_mgr.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698