blob: 41dc41a8d17ebff20fb2b1cacb04962ecc962c9b [file] [log] [blame]
dan sinclair993a1992017-10-25 20:21:09 -04001// Copyright 2017 PDFium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
Dan Sinclaire0345a42017-10-30 20:20:42 +00007#include "fxjs/cjs_scalewhen.h"
dan sinclair993a1992017-10-25 20:21:09 -04008
Dan Sinclairc94a7932017-10-26 16:48:57 -04009const JSConstSpec CJS_ScaleWhen::ConstSpecs[] = {
dan sinclair993a1992017-10-25 20:21:09 -040010 {"always", JSConstSpec::Number, 0, 0},
11 {"never", JSConstSpec::Number, 1, 0},
12 {"tooBig", JSConstSpec::Number, 2, 0},
Dan Sinclair909fa2d2017-12-12 01:53:28 +000013 {"tooSmall", JSConstSpec::Number, 3, 0}};
dan sinclair993a1992017-10-25 20:21:09 -040014
Dan Sinclairef299532017-10-26 16:48:30 -040015int CJS_ScaleWhen::ObjDefnID = -1;
Dan Sinclair89d26c82017-10-26 12:21:28 -040016
Dan Sinclairef299532017-10-26 16:48:30 -040017// static
Dan Sinclairbef4d3e2017-10-26 16:49:38 -040018void CJS_ScaleWhen::DefineJSObjects(CFXJS_Engine* pEngine) {
19 ObjDefnID =
20 pEngine->DefineObj("scaleWhen", FXJSOBJTYPE_STATIC, nullptr, nullptr);
Tom Sepez8b4ddeb2018-06-11 15:55:17 +000021 DefineConsts(pEngine, ObjDefnID, ConstSpecs);
Dan Sinclair89d26c82017-10-26 12:21:28 -040022}
Tom Sepez36aae4f2018-06-04 19:44:37 +000023
24CJS_ScaleWhen::CJS_ScaleWhen(v8::Local<v8::Object> pObject,
25 CJS_Runtime* pRuntime)
26 : CJS_Object(pObject, pRuntime) {}
27
28CJS_ScaleWhen::~CJS_ScaleWhen() = default;