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

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

Issue 2227673005: Remove backpointer to CJS_Runtime from CJS_Value (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Const member Created 4 years, 4 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/javascript/color.cpp ('k') | fpdfsdk/javascript/global.cpp » ('j') | 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/event.h" 7 #include "fpdfsdk/javascript/event.h"
8 8
9 #include "fpdfsdk/javascript/Field.h" 9 #include "fpdfsdk/javascript/Field.h"
10 #include "fpdfsdk/javascript/JS_Define.h" 10 #include "fpdfsdk/javascript/JS_Define.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 event::~event() {} 49 event::~event() {}
50 50
51 FX_BOOL event::change(IJS_Context* cc, 51 FX_BOOL event::change(IJS_Context* cc,
52 CJS_PropValue& vp, 52 CJS_PropValue& vp,
53 CFX_WideString& sError) { 53 CFX_WideString& sError) {
54 CJS_Context* pContext = (CJS_Context*)cc; 54 CJS_Context* pContext = (CJS_Context*)cc;
55 CJS_EventHandler* pEvent = pContext->GetEventHandler(); 55 CJS_EventHandler* pEvent = pContext->GetEventHandler();
56 CFX_WideString& wChange = pEvent->Change(); 56 CFX_WideString& wChange = pEvent->Change();
57 if (vp.IsSetting()) { 57 if (vp.IsSetting()) {
58 if (vp.GetType() == CJS_Value::VT_string) 58 if (vp.GetJSValue()->GetType() == CJS_Value::VT_string)
59 vp >> wChange; 59 vp >> wChange;
60 } else { 60 } else {
61 vp << wChange; 61 vp << wChange;
62 } 62 }
63 return TRUE; 63 return TRUE;
64 } 64 }
65 65
66 FX_BOOL event::changeEx(IJS_Context* cc, 66 FX_BOOL event::changeEx(IJS_Context* cc,
67 CJS_PropValue& vp, 67 CJS_PropValue& vp,
68 CFX_WideString& sError) { 68 CFX_WideString& sError) {
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 314
315 CJS_Context* pContext = (CJS_Context*)cc; 315 CJS_Context* pContext = (CJS_Context*)cc;
316 CJS_EventHandler* pEvent = pContext->GetEventHandler(); 316 CJS_EventHandler* pEvent = pContext->GetEventHandler();
317 317
318 if (pEvent->WillCommit()) 318 if (pEvent->WillCommit())
319 vp << TRUE; 319 vp << TRUE;
320 else 320 else
321 vp << FALSE; 321 vp << FALSE;
322 return TRUE; 322 return TRUE;
323 } 323 }
OLDNEW
« no previous file with comments | « fpdfsdk/javascript/color.cpp ('k') | fpdfsdk/javascript/global.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698