summaryrefslogtreecommitdiff
path: root/fxjs/js_define.h
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/js_define.h
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/js_define.h')
-rw-r--r--fxjs/js_define.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/fxjs/js_define.h b/fxjs/js_define.h
index bf7aa35504..0705dfea6b 100644
--- a/fxjs/js_define.h
+++ b/fxjs/js_define.h
@@ -35,14 +35,16 @@ double JS_MakeDate(double day, double time);
// with a single argument which is an object containing the actual arguments
// as its properties. The varying arguments to this method are the property
// names as wchar_t string literals corresponding to each positional argument.
-// The result will always contain |nKeywords| value, with unspecified ones
-// being set to type VT_unknown.
+// The result will always contain |nKeywords| value, check for the unspecified
+// ones in the result using IsExpandedParamKnown() below.
std::vector<v8::Local<v8::Value>> ExpandKeywordParams(
CJS_Runtime* pRuntime,
const std::vector<v8::Local<v8::Value>>& originals,
size_t nKeywords,
...);
+bool IsExpandedParamKnown(v8::Local<v8::Value> value);
+
// All JS classes have a name, an object defintion ID, and the ability to
// register themselves with FXJS_V8. We never make a BASE class on its own
// because it can't really do anything.