summaryrefslogtreecommitdiff
path: root/fxjs/cjs_runtime.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-10-18 21:39:40 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-10-18 21:39:40 +0000
commit0e5bab1b8402b65fa09a36a2b141bbf22291f822 (patch)
treee6d714f10fc9c552ea043073d17047f969f28f13 /fxjs/cjs_runtime.cpp
parentae2aec8712aa4c52454737467869b9d256baa05f (diff)
downloadpdfium-0e5bab1b8402b65fa09a36a2b141bbf22291f822.tar.xz
Remove PrintParams object.
The only way to theoretically get one is via doc.getPrintParams(), and it always returns in error. Even if one were returend to JS, there aren't any methods/callbacks to change its properties. Even if there were methods to change its properties, the information it stores doesn't align with what is in the JS spec for this object. Even if it were aligned with the JS spec, the way we check for its presence as the ninth parameter in CJS_Document::print() doesn't match the way its use is documented in the spec as the sole first parameter. Instead implement the older, simpler behaviour as spec'd prior to 6.0, and toss this enhancement altogether. Move function to check the result of ExpandKeywordParams() to js_define.h so other files can use it. Update comment in that file to remove reference to deprecated enum. Expand test for API and introduce callback to log parameters. Change-Id: I047e2be0d2afbad91d6b58c6c74bbea083fed330 Reviewed-on: https://pdfium-review.googlesource.com/c/44271 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fxjs/cjs_runtime.cpp')
-rw-r--r--fxjs/cjs_runtime.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/fxjs/cjs_runtime.cpp b/fxjs/cjs_runtime.cpp
index 3bc8448435..3914b36715 100644
--- a/fxjs/cjs_runtime.cpp
+++ b/fxjs/cjs_runtime.cpp
@@ -29,7 +29,6 @@
#include "fxjs/cjs_icon.h"
#include "fxjs/cjs_object.h"
#include "fxjs/cjs_position.h"
-#include "fxjs/cjs_printparamsobj.h"
#include "fxjs/cjs_publicmethods.h"
#include "fxjs/cjs_report.h"
#include "fxjs/cjs_scalehow.h"
@@ -124,9 +123,8 @@ void CJS_Runtime::DefineJSObjects() {
CJS_GlobalConsts::DefineJSObjects(this);
CJS_GlobalArrays::DefineJSObjects(this);
- // ObjDefIDs 21 - 23.
+ // ObjDefIDs 21 - 22.
CJS_TimerObj::DefineJSObjects(this);
- CJS_PrintParamsObj::DefineJSObjects(this);
CJS_Annot::DefineJSObjects(this);
}