From 0e5bab1b8402b65fa09a36a2b141bbf22291f822 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Thu, 18 Oct 2018 21:39:40 +0000 Subject: 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 Reviewed-by: Lei Zhang --- fxjs/cjs_printparamsobj.cpp | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 fxjs/cjs_printparamsobj.cpp (limited to 'fxjs/cjs_printparamsobj.cpp') diff --git a/fxjs/cjs_printparamsobj.cpp b/fxjs/cjs_printparamsobj.cpp deleted file mode 100644 index 37ff956f74..0000000000 --- a/fxjs/cjs_printparamsobj.cpp +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2017 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#include "fxjs/cjs_printparamsobj.h" - -#include "fxjs/js_define.h" - -int CJS_PrintParamsObj::ObjDefnID = -1; - -// static -int CJS_PrintParamsObj::GetObjDefnID() { - return ObjDefnID; -} - -// static -void CJS_PrintParamsObj::DefineJSObjects(CFXJS_Engine* pEngine) { - ObjDefnID = - pEngine->DefineObj("PrintParamsObj", FXJSOBJTYPE_DYNAMIC, - JSConstructor, JSDestructor); -} - -CJS_PrintParamsObj::CJS_PrintParamsObj(v8::Local pObject, - CJS_Runtime* pRuntime) - : CJS_Object(pObject, pRuntime) {} - -CJS_PrintParamsObj::~CJS_PrintParamsObj() = default; -- cgit v1.2.3