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

Side by Side Diff: fpdfsdk/src/javascript/app.cpp

Issue 809513002: XFA: merge patch from issue 801913002 and 804463003 (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 6 years 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/src/javascript/JS_Runtime.cpp ('k') | fpdfsdk/src/jsapi/fxjs_v8.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 "../../include/javascript/JavaScript.h" 7 #include "../../include/javascript/JavaScript.h"
8 #include "../../include/javascript/IJavaScript.h" 8 #include "../../include/javascript/IJavaScript.h"
9 #include "../../include/javascript/JS_Define.h" 9 #include "../../include/javascript/JS_Define.h"
10 #include "../../include/javascript/JS_Object.h" 10 #include "../../include/javascript/JS_Object.h"
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 return TRUE; 486 return TRUE;
487 } 487 }
488 488
489 FX_BOOL app::popUpMenuEx(OBJ_METHOD_PARAMS) 489 FX_BOOL app::popUpMenuEx(OBJ_METHOD_PARAMS)
490 { 490 {
491 return FALSE; 491 return FALSE;
492 } 492 }
493 493
494 FX_BOOL app::fs(OBJ_PROP_PARAMS) 494 FX_BOOL app::fs(OBJ_PROP_PARAMS)
495 { 495 {
496 #ifdef FOXIT_CHROME_BUILD
497 return FALSE; 496 return FALSE;
498 #else
499 CJS_Context* pContext = (CJS_Context*)cc;
500 ASSERT(pContext != NULL);
501 CJS_Runtime* pRuntime = pContext->GetJSRuntime();
502 ASSERT(pRuntime != NULL);
503
504 if (vp.IsGetting())
505 {
506 return TRUE;
507 }
508 else
509 {
510 return TRUE;
511 }
512 #endif
513 } 497 }
514 498
515 FX_BOOL app::setInterval(OBJ_METHOD_PARAMS) 499 FX_BOOL app::setInterval(OBJ_METHOD_PARAMS)
516 { 500 {
517 if (params.size() > 2 || params.size() == 0) 501 if (params.size() > 2 || params.size() == 0)
518 { 502 {
519 sError = JSGetStringFromID((CJS_Context*)cc, IDS_STRING_JSPARAME RROR); 503 sError = JSGetStringFromID((CJS_Context*)cc, IDS_STRING_JSPARAME RROR);
520 return FALSE; 504 return FALSE;
521 } 505 }
522 506
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
1036 1020
1037 FX_BOOL app::openDoc(OBJ_METHOD_PARAMS) 1021 FX_BOOL app::openDoc(OBJ_METHOD_PARAMS)
1038 { 1022 {
1039 return FALSE; 1023 return FALSE;
1040 } 1024 }
1041 1025
1042 FX_BOOL app::response(OBJ_METHOD_PARAMS) 1026 FX_BOOL app::response(OBJ_METHOD_PARAMS)
1043 { 1027 {
1044 CFX_WideString swQuestion = L""; 1028 CFX_WideString swQuestion = L"";
1045 CFX_WideString swLabel = L""; 1029 CFX_WideString swLabel = L"";
1046 #ifndef FOXIT_CHROME_BUILD
1047 CFX_WideString swTitle = L"Foxit";
1048 #else
1049 CFX_WideString swTitle = L"PDF"; 1030 CFX_WideString swTitle = L"PDF";
1050 #endif
1051 CFX_WideString swDefault = L""; 1031 CFX_WideString swDefault = L"";
1052 bool bPassWord = false; 1032 bool bPassWord = false;
1053 1033
1054 v8::Isolate* isolate = GetIsolate(cc); 1034 v8::Isolate* isolate = GetIsolate(cc);
1055 1035
1056 int iLength = params.size(); 1036 int iLength = params.size();
1057 if (iLength > 0 && params[0].GetType() == VT_object) 1037 if (iLength > 0 && params[0].GetType() == VT_object)
1058 { 1038 {
1059 JSObject pObj = (JSObject )params[0]; 1039 JSObject pObj = (JSObject )params[0];
1060 v8::Handle<v8::Value> pValue = JS_GetObjectElement(isolate,pObj, L"cQuestion"); 1040 v8::Handle<v8::Value> pValue = JS_GetObjectElement(isolate,pObj, L"cQuestion");
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
1126 FX_BOOL app::media(OBJ_PROP_PARAMS) 1106 FX_BOOL app::media(OBJ_PROP_PARAMS)
1127 { 1107 {
1128 return FALSE; 1108 return FALSE;
1129 } 1109 }
1130 1110
1131 FX_BOOL app::execDialog(OBJ_METHOD_PARAMS) 1111 FX_BOOL app::execDialog(OBJ_METHOD_PARAMS)
1132 { 1112 {
1133 return TRUE; 1113 return TRUE;
1134 } 1114 }
1135 1115
OLDNEW
« no previous file with comments | « fpdfsdk/src/javascript/JS_Runtime.cpp ('k') | fpdfsdk/src/jsapi/fxjs_v8.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698