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

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

Issue 2368403002: Watch destruction of widgets around OnAAction() method (Closed)
Patch Set: blown merge Created 4 years, 2 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/ipdfsdk_annothandler.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/Field.h" 7 #include "fpdfsdk/javascript/Field.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 3204 matching lines...) Expand 10 before | Expand all | Expand 10 after
3215 if (pTempWidget->GetPDFPage() == pCurPageView->GetPDFPage()) { 3215 if (pTempWidget->GetPDFPage() == pCurPageView->GetPDFPage()) {
3216 pWidget = pTempWidget; 3216 pWidget = pTempWidget;
3217 break; 3217 break;
3218 } 3218 }
3219 } 3219 }
3220 } 3220 }
3221 } 3221 }
3222 } 3222 }
3223 3223
3224 if (pWidget) { 3224 if (pWidget) {
3225 m_pDocument->SetFocusAnnot(pWidget); 3225 CPDFSDK_Annot::ObservedPtr pObserved(pWidget);
3226 m_pDocument->SetFocusAnnot(&pObserved);
3226 } 3227 }
3227 3228
3228 return TRUE; 3229 return TRUE;
3229 } 3230 }
3230 3231
3231 FX_BOOL Field::setItems(IJS_Context* cc, 3232 FX_BOOL Field::setItems(IJS_Context* cc,
3232 const std::vector<CJS_Value>& params, 3233 const std::vector<CJS_Value>& params,
3233 CJS_Value& vRet, 3234 CJS_Value& vRet,
3234 CFX_WideString& sError) { 3235 CFX_WideString& sError) {
3235 return TRUE; 3236 return TRUE;
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
3491 } 3492 }
3492 } 3493 }
3493 3494
3494 void Field::AddField(CPDFSDK_Document* pDocument, 3495 void Field::AddField(CPDFSDK_Document* pDocument,
3495 int nPageIndex, 3496 int nPageIndex,
3496 int nFieldType, 3497 int nFieldType,
3497 const CFX_WideString& sName, 3498 const CFX_WideString& sName,
3498 const CFX_FloatRect& rcCoords) { 3499 const CFX_FloatRect& rcCoords) {
3499 // Not supported. 3500 // Not supported.
3500 } 3501 }
OLDNEW
« no previous file with comments | « fpdfsdk/include/ipdfsdk_annothandler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698