summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/javascript')
-rw-r--r--fpdfsdk/javascript/Document.cpp6
-rw-r--r--fpdfsdk/javascript/Document.h2
-rw-r--r--fpdfsdk/javascript/Field.cpp7
-rw-r--r--fpdfsdk/javascript/Field.h1
-rw-r--r--fpdfsdk/javascript/Icon.cpp6
-rw-r--r--fpdfsdk/javascript/Icon.h1
-rw-r--r--fpdfsdk/javascript/app.cpp9
-rw-r--r--fpdfsdk/javascript/app.h2
-rw-r--r--fpdfsdk/javascript/cjs_annot.cpp7
-rw-r--r--fpdfsdk/javascript/cjs_annot.h1
-rw-r--r--fpdfsdk/javascript/cjs_border.cpp4
-rw-r--r--fpdfsdk/javascript/cjs_border.h1
-rw-r--r--fpdfsdk/javascript/cjs_display.cpp4
-rw-r--r--fpdfsdk/javascript/cjs_display.h1
-rw-r--r--fpdfsdk/javascript/cjs_font.cpp4
-rw-r--r--fpdfsdk/javascript/cjs_font.h1
-rw-r--r--fpdfsdk/javascript/cjs_global.cpp5
-rw-r--r--fpdfsdk/javascript/cjs_global.h1
-rw-r--r--fpdfsdk/javascript/cjs_highlight.cpp4
-rw-r--r--fpdfsdk/javascript/cjs_highlight.h1
-rw-r--r--fpdfsdk/javascript/cjs_position.cpp4
-rw-r--r--fpdfsdk/javascript/cjs_position.h1
-rw-r--r--fpdfsdk/javascript/cjs_scalehow.cpp4
-rw-r--r--fpdfsdk/javascript/cjs_scalehow.h1
-rw-r--r--fpdfsdk/javascript/cjs_scalewhen.cpp4
-rw-r--r--fpdfsdk/javascript/cjs_scalewhen.h1
-rw-r--r--fpdfsdk/javascript/cjs_style.cpp4
-rw-r--r--fpdfsdk/javascript/cjs_style.h1
-rw-r--r--fpdfsdk/javascript/cjs_zoomtype.cpp4
-rw-r--r--fpdfsdk/javascript/cjs_zoomtype.h1
-rw-r--r--fpdfsdk/javascript/color.cpp7
-rw-r--r--fpdfsdk/javascript/color.h1
-rw-r--r--fpdfsdk/javascript/console.cpp3
-rw-r--r--fpdfsdk/javascript/console.h1
-rw-r--r--fpdfsdk/javascript/event.cpp7
-rw-r--r--fpdfsdk/javascript/event.h1
-rw-r--r--fpdfsdk/javascript/report.cpp7
-rw-r--r--fpdfsdk/javascript/report.h1
-rw-r--r--fpdfsdk/javascript/util.cpp6
-rw-r--r--fpdfsdk/javascript/util.h1
40 files changed, 36 insertions, 92 deletions
diff --git a/fpdfsdk/javascript/Document.cpp b/fpdfsdk/javascript/Document.cpp
index 8175b0d246..232f6dd380 100644
--- a/fpdfsdk/javascript/Document.cpp
+++ b/fpdfsdk/javascript/Document.cpp
@@ -38,13 +38,12 @@
#include "third_party/base/numerics/safe_math.h"
#include "third_party/base/ptr_util.h"
-const char* CJS_PrintParamsObj::g_pClassName = "PrintParamsObj";
int CJS_PrintParamsObj::g_nObjDefnID = -1;
void CJS_PrintParamsObj::DefineJSObjects(CFXJS_Engine* pEngine,
FXJSOBJTYPE eObjType) {
g_nObjDefnID =
- pEngine->DefineObj(CJS_PrintParamsObj::g_pClassName, eObjType,
+ pEngine->DefineObj("PrintParamsObj", eObjType,
JSConstructor<CJS_PrintParamsObj, PrintParamsObj>,
JSDestructor<CJS_PrintParamsObj>);
}
@@ -146,12 +145,11 @@ JSMethodSpec CJS_Document::MethodSpecs[] = {
{"mailDoc", mailDoc_static},
{0, 0}};
-const char* CJS_Document::g_pClassName = "Document";
int CJS_Document::g_nObjDefnID = -1;
void CJS_Document::DefineJSObjects(CFXJS_Engine* pEngine,
FXJSOBJTYPE eObjType) {
- g_nObjDefnID = pEngine->DefineObj(CJS_Document::g_pClassName, eObjType,
+ g_nObjDefnID = pEngine->DefineObj("Document", eObjType,
JSConstructor<CJS_Document, Document>,
JSDestructor<CJS_Document>);
DefineProps(pEngine, g_nObjDefnID, PropertySpecs);
diff --git a/fpdfsdk/javascript/Document.h b/fpdfsdk/javascript/Document.h
index 308678f6b3..0073042f25 100644
--- a/fpdfsdk/javascript/Document.h
+++ b/fpdfsdk/javascript/Document.h
@@ -38,7 +38,6 @@ class CJS_PrintParamsObj : public CJS_Object {
: CJS_Object(pObject) {}
~CJS_PrintParamsObj() override {}
- static const char* g_pClassName;
static int g_nObjDefnID;
static void DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType);
@@ -272,7 +271,6 @@ class CJS_Document : public CJS_Object {
// CJS_Object
void InitInstance(IJS_Runtime* pIRuntime) override;
- static const char* g_pClassName;
static int g_nObjDefnID;
static JSPropertySpec PropertySpecs[];
static JSMethodSpec MethodSpecs[];
diff --git a/fpdfsdk/javascript/Field.cpp b/fpdfsdk/javascript/Field.cpp
index 288a24d084..0a35bf5dd4 100644
--- a/fpdfsdk/javascript/Field.cpp
+++ b/fpdfsdk/javascript/Field.cpp
@@ -165,13 +165,12 @@ JSMethodSpec CJS_Field::MethodSpecs[] = {
{"signatureValidate", signatureValidate_static},
{0, 0}};
-const char* CJS_Field::g_pClassName = "Field";
int CJS_Field::g_nObjDefnID = -1;
void CJS_Field::DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType) {
- g_nObjDefnID = pEngine->DefineObj(CJS_Field::g_pClassName, eObjType,
- JSConstructor<CJS_Field, Field>,
- JSDestructor<CJS_Field>);
+ g_nObjDefnID =
+ pEngine->DefineObj("Field", eObjType, JSConstructor<CJS_Field, Field>,
+ JSDestructor<CJS_Field>);
DefineProps(pEngine, g_nObjDefnID, PropertySpecs);
DefineMethods(pEngine, g_nObjDefnID, MethodSpecs);
}
diff --git a/fpdfsdk/javascript/Field.h b/fpdfsdk/javascript/Field.h
index 5427a69130..11b6e7e9fe 100644
--- a/fpdfsdk/javascript/Field.h
+++ b/fpdfsdk/javascript/Field.h
@@ -364,7 +364,6 @@ class CJS_Field : public CJS_Object {
void InitInstance(IJS_Runtime* pIRuntime) override;
- static const char* g_pClassName;
static int g_nObjDefnID;
static JSPropertySpec PropertySpecs[];
static JSMethodSpec MethodSpecs[];
diff --git a/fpdfsdk/javascript/Icon.cpp b/fpdfsdk/javascript/Icon.cpp
index ab37e13198..7a0c758d15 100644
--- a/fpdfsdk/javascript/Icon.cpp
+++ b/fpdfsdk/javascript/Icon.cpp
@@ -14,13 +14,11 @@ JSPropertySpec CJS_Icon::PropertySpecs[] = {
{"name", get_name_static, set_name_static},
{0, 0, 0}};
-const char* CJS_Icon::g_pClassName = "Icon";
int CJS_Icon::g_nObjDefnID = -1;
void CJS_Icon::DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType) {
- g_nObjDefnID =
- pEngine->DefineObj(CJS_Icon::g_pClassName, eObjType,
- JSConstructor<CJS_Icon, Icon>, JSDestructor<CJS_Icon>);
+ g_nObjDefnID = pEngine->DefineObj(
+ "Icon", eObjType, JSConstructor<CJS_Icon, Icon>, JSDestructor<CJS_Icon>);
DefineProps(pEngine, g_nObjDefnID, PropertySpecs);
}
diff --git a/fpdfsdk/javascript/Icon.h b/fpdfsdk/javascript/Icon.h
index 2d5ad8c7a0..3580183347 100644
--- a/fpdfsdk/javascript/Icon.h
+++ b/fpdfsdk/javascript/Icon.h
@@ -31,7 +31,6 @@ class CJS_Icon : public CJS_Object {
explicit CJS_Icon(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {}
~CJS_Icon() override {}
- static const char* g_pClassName;
static int g_nObjDefnID;
static JSPropertySpec PropertySpecs[];
diff --git a/fpdfsdk/javascript/app.cpp b/fpdfsdk/javascript/app.cpp
index 0b331a8b1b..ceafb8fdd8 100644
--- a/fpdfsdk/javascript/app.cpp
+++ b/fpdfsdk/javascript/app.cpp
@@ -142,12 +142,11 @@ GlobalTimer::TimerMap* GlobalTimer::GetGlobalTimerMap() {
return s_TimerMap;
}
-const char* CJS_TimerObj::g_pClassName = "TimerObj";
int CJS_TimerObj::g_nObjDefnID = -1;
void CJS_TimerObj::DefineJSObjects(CFXJS_Engine* pEngine,
FXJSOBJTYPE eObjType) {
- g_nObjDefnID = pEngine->DefineObj(CJS_TimerObj::g_pClassName, eObjType,
+ g_nObjDefnID = pEngine->DefineObj("TimerObj", eObjType,
JSConstructor<CJS_TimerObj, TimerObj>,
JSDestructor<CJS_TimerObj>);
}
@@ -211,13 +210,11 @@ JSMethodSpec CJS_App::MethodSpecs[] = {{"alert", alert_static},
{"setTimeOut", setTimeOut_static},
{0, 0}};
-const char* CJS_App::g_pClassName = "app";
int CJS_App::g_nObjDefnID = -1;
void CJS_App::DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType) {
- g_nObjDefnID =
- pEngine->DefineObj(CJS_App::g_pClassName, eObjType,
- JSConstructor<CJS_App, app>, JSDestructor<CJS_App>);
+ g_nObjDefnID = pEngine->DefineObj(
+ "app", eObjType, JSConstructor<CJS_App, app>, JSDestructor<CJS_App>);
DefineProps(pEngine, g_nObjDefnID, PropertySpecs);
DefineMethods(pEngine, g_nObjDefnID, MethodSpecs);
}
diff --git a/fpdfsdk/javascript/app.h b/fpdfsdk/javascript/app.h
index 454bb42500..a0344306d9 100644
--- a/fpdfsdk/javascript/app.h
+++ b/fpdfsdk/javascript/app.h
@@ -33,7 +33,6 @@ class CJS_TimerObj : public CJS_Object {
explicit CJS_TimerObj(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {}
~CJS_TimerObj() override {}
- static const char* g_pClassName;
static int g_nObjDefnID;
static void DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType);
@@ -146,7 +145,6 @@ class CJS_App : public CJS_Object {
explicit CJS_App(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {}
~CJS_App() override {}
- static const char* g_pClassName;
static int g_nObjDefnID;
static JSPropertySpec PropertySpecs[];
static JSMethodSpec MethodSpecs[];
diff --git a/fpdfsdk/javascript/cjs_annot.cpp b/fpdfsdk/javascript/cjs_annot.cpp
index 9f528a3839..af0d208a1e 100644
--- a/fpdfsdk/javascript/cjs_annot.cpp
+++ b/fpdfsdk/javascript/cjs_annot.cpp
@@ -25,13 +25,12 @@ JSPropertySpec CJS_Annot::PropertySpecs[] = {
{"type", get_type_static, set_type_static},
{0, 0, 0}};
-const char* CJS_Annot::g_pClassName = "Annot";
int CJS_Annot::g_nObjDefnID = -1;
void CJS_Annot::DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType) {
- g_nObjDefnID = pEngine->DefineObj(CJS_Annot::g_pClassName, eObjType,
- JSConstructor<CJS_Annot, Annot>,
- JSDestructor<CJS_Annot>);
+ g_nObjDefnID =
+ pEngine->DefineObj("Annot", eObjType, JSConstructor<CJS_Annot, Annot>,
+ JSDestructor<CJS_Annot>);
DefineProps(pEngine, g_nObjDefnID, PropertySpecs);
}
diff --git a/fpdfsdk/javascript/cjs_annot.h b/fpdfsdk/javascript/cjs_annot.h
index a16e510205..147642f3c9 100644
--- a/fpdfsdk/javascript/cjs_annot.h
+++ b/fpdfsdk/javascript/cjs_annot.h
@@ -35,7 +35,6 @@ class CJS_Annot : public CJS_Object {
explicit CJS_Annot(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {}
~CJS_Annot() override {}
- static const char* g_pClassName;
static int g_nObjDefnID;
static JSPropertySpec PropertySpecs[];
diff --git a/fpdfsdk/javascript/cjs_border.cpp b/fpdfsdk/javascript/cjs_border.cpp
index 6bb2e09cdd..038606fff6 100644
--- a/fpdfsdk/javascript/cjs_border.cpp
+++ b/fpdfsdk/javascript/cjs_border.cpp
@@ -14,11 +14,9 @@ JSConstSpec CJS_Border::ConstSpecs[] = {
{"u", JSConstSpec::String, 0, "underline"},
{0, JSConstSpec::Number, 0, 0}};
-const char* CJS_Border::g_pClassName = "border";
int CJS_Border::g_nObjDefnID = -1;
void CJS_Border::DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType) {
- g_nObjDefnID =
- pEngine->DefineObj(CJS_Border::g_pClassName, eObjType, nullptr, nullptr);
+ g_nObjDefnID = pEngine->DefineObj("border", eObjType, nullptr, nullptr);
DefineConsts(pEngine, g_nObjDefnID, ConstSpecs);
}
diff --git a/fpdfsdk/javascript/cjs_border.h b/fpdfsdk/javascript/cjs_border.h
index 26a710a625..733fbc0ded 100644
--- a/fpdfsdk/javascript/cjs_border.h
+++ b/fpdfsdk/javascript/cjs_border.h
@@ -14,7 +14,6 @@ class CJS_Border : public CJS_Object {
explicit CJS_Border(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {}
~CJS_Border() override {}
- static const char* g_pClassName;
static int g_nObjDefnID;
static JSConstSpec ConstSpecs[];
diff --git a/fpdfsdk/javascript/cjs_display.cpp b/fpdfsdk/javascript/cjs_display.cpp
index 5d604b55e1..afb060b2dd 100644
--- a/fpdfsdk/javascript/cjs_display.cpp
+++ b/fpdfsdk/javascript/cjs_display.cpp
@@ -12,11 +12,9 @@ JSConstSpec CJS_Display::ConstSpecs[] = {{"visible", JSConstSpec::Number, 0, 0},
{"noView", JSConstSpec::Number, 3, 0},
{0, JSConstSpec::Number, 0, 0}};
-const char* CJS_Display::g_pClassName = "display";
int CJS_Display::g_nObjDefnID = -1;
void CJS_Display::DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType) {
- g_nObjDefnID =
- pEngine->DefineObj(CJS_Display::g_pClassName, eObjType, nullptr, nullptr);
+ g_nObjDefnID = pEngine->DefineObj("display", eObjType, nullptr, nullptr);
DefineConsts(pEngine, g_nObjDefnID, ConstSpecs);
}
diff --git a/fpdfsdk/javascript/cjs_display.h b/fpdfsdk/javascript/cjs_display.h
index 61e741dba2..439525fd85 100644
--- a/fpdfsdk/javascript/cjs_display.h
+++ b/fpdfsdk/javascript/cjs_display.h
@@ -14,7 +14,6 @@ class CJS_Display : public CJS_Object {
explicit CJS_Display(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {}
~CJS_Display() override {}
- static const char* g_pClassName;
static int g_nObjDefnID;
static JSConstSpec ConstSpecs[];
diff --git a/fpdfsdk/javascript/cjs_font.cpp b/fpdfsdk/javascript/cjs_font.cpp
index 0a9f02f2f1..889c0bb8d2 100644
--- a/fpdfsdk/javascript/cjs_font.cpp
+++ b/fpdfsdk/javascript/cjs_font.cpp
@@ -23,11 +23,9 @@ JSConstSpec CJS_Font::ConstSpecs[] = {
{"ZapfD", JSConstSpec::String, 0, "ZapfDingbats"},
{0, JSConstSpec::Number, 0, 0}};
-const char* CJS_Font::g_pClassName = "font";
int CJS_Font::g_nObjDefnID = -1;
void CJS_Font::DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType) {
- g_nObjDefnID =
- pEngine->DefineObj(CJS_Font::g_pClassName, eObjType, nullptr, nullptr);
+ g_nObjDefnID = pEngine->DefineObj("font", eObjType, nullptr, nullptr);
DefineConsts(pEngine, g_nObjDefnID, ConstSpecs);
}
diff --git a/fpdfsdk/javascript/cjs_font.h b/fpdfsdk/javascript/cjs_font.h
index 7881cdf2e6..569e4f10dd 100644
--- a/fpdfsdk/javascript/cjs_font.h
+++ b/fpdfsdk/javascript/cjs_font.h
@@ -14,7 +14,6 @@ class CJS_Font : public CJS_Object {
explicit CJS_Font(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {}
~CJS_Font() override {}
- static const char* g_pClassName;
static int g_nObjDefnID;
static JSConstSpec ConstSpecs[];
diff --git a/fpdfsdk/javascript/cjs_global.cpp b/fpdfsdk/javascript/cjs_global.cpp
index 1ec9bbf9ea..95782acccf 100644
--- a/fpdfsdk/javascript/cjs_global.cpp
+++ b/fpdfsdk/javascript/cjs_global.cpp
@@ -182,7 +182,6 @@ JSMethodSpec CJS_Global::MethodSpecs[] = {
{"setPersistent", setPersistent_static},
{0, 0}};
-const char* CJS_Global::g_pClassName = "global";
int CJS_Global::g_nObjDefnID = -1;
// static
@@ -232,8 +231,8 @@ void CJS_Global::DefineAllProperties(CFXJS_Engine* pEngine) {
void CJS_Global::DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType) {
g_nObjDefnID = pEngine->DefineObj(
- CJS_Global::g_pClassName, eObjType,
- JSConstructor<CJS_Global, JSGlobalAlternate>, JSDestructor<CJS_Global>);
+ "global", eObjType, JSConstructor<CJS_Global, JSGlobalAlternate>,
+ JSDestructor<CJS_Global>);
DefineConsts(pEngine, g_nObjDefnID, ConstSpecs);
DefineProps(pEngine, g_nObjDefnID, PropertySpecs);
DefineMethods(pEngine, g_nObjDefnID, MethodSpecs);
diff --git a/fpdfsdk/javascript/cjs_global.h b/fpdfsdk/javascript/cjs_global.h
index 8174418eea..e5eb3aab4b 100644
--- a/fpdfsdk/javascript/cjs_global.h
+++ b/fpdfsdk/javascript/cjs_global.h
@@ -17,7 +17,6 @@ class CJS_Global : public CJS_Object {
// CJS_Object
void InitInstance(IJS_Runtime* pIRuntime) override;
- static const char* g_pClassName;
static int g_nObjDefnID;
static JSConstSpec ConstSpecs[];
static JSPropertySpec PropertySpecs[];
diff --git a/fpdfsdk/javascript/cjs_highlight.cpp b/fpdfsdk/javascript/cjs_highlight.cpp
index 5a5f7bfad7..edee548a67 100644
--- a/fpdfsdk/javascript/cjs_highlight.cpp
+++ b/fpdfsdk/javascript/cjs_highlight.cpp
@@ -13,12 +13,10 @@ JSConstSpec CJS_Highlight::ConstSpecs[] = {
{"o", JSConstSpec::String, 0, "outline"},
{0, JSConstSpec::Number, 0, 0}};
-const char* CJS_Highlight::g_pClassName = "highlight";
int CJS_Highlight::g_nObjDefnID = -1;
void CJS_Highlight::DefineJSObjects(CFXJS_Engine* pEngine,
FXJSOBJTYPE eObjType) {
- g_nObjDefnID = pEngine->DefineObj(CJS_Highlight::g_pClassName, eObjType,
- nullptr, nullptr);
+ g_nObjDefnID = pEngine->DefineObj("highlight", eObjType, nullptr, nullptr);
DefineConsts(pEngine, g_nObjDefnID, ConstSpecs);
}
diff --git a/fpdfsdk/javascript/cjs_highlight.h b/fpdfsdk/javascript/cjs_highlight.h
index dd16e0cb60..cc77660052 100644
--- a/fpdfsdk/javascript/cjs_highlight.h
+++ b/fpdfsdk/javascript/cjs_highlight.h
@@ -14,7 +14,6 @@ class CJS_Highlight : public CJS_Object {
explicit CJS_Highlight(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {}
~CJS_Highlight() override {}
- static const char* g_pClassName;
static int g_nObjDefnID;
static JSConstSpec ConstSpecs[];
diff --git a/fpdfsdk/javascript/cjs_position.cpp b/fpdfsdk/javascript/cjs_position.cpp
index 46b908b589..f24c2d95de 100644
--- a/fpdfsdk/javascript/cjs_position.cpp
+++ b/fpdfsdk/javascript/cjs_position.cpp
@@ -16,12 +16,10 @@ JSConstSpec CJS_Position::ConstSpecs[] = {
{"overlay", JSConstSpec::Number, 6, 0},
{0, JSConstSpec::Number, 0, 0}};
-const char* CJS_Position::g_pClassName = "position";
int CJS_Position::g_nObjDefnID = -1;
void CJS_Position::DefineJSObjects(CFXJS_Engine* pEngine,
FXJSOBJTYPE eObjType) {
- g_nObjDefnID = pEngine->DefineObj(CJS_Position::g_pClassName, eObjType,
- nullptr, nullptr);
+ g_nObjDefnID = pEngine->DefineObj("position", eObjType, nullptr, nullptr);
DefineConsts(pEngine, g_nObjDefnID, ConstSpecs);
}
diff --git a/fpdfsdk/javascript/cjs_position.h b/fpdfsdk/javascript/cjs_position.h
index f180af480d..a1850ece7a 100644
--- a/fpdfsdk/javascript/cjs_position.h
+++ b/fpdfsdk/javascript/cjs_position.h
@@ -14,7 +14,6 @@ class CJS_Position : public CJS_Object {
explicit CJS_Position(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {}
~CJS_Position() override {}
- static const char* g_pClassName;
static int g_nObjDefnID;
static JSConstSpec ConstSpecs[];
diff --git a/fpdfsdk/javascript/cjs_scalehow.cpp b/fpdfsdk/javascript/cjs_scalehow.cpp
index d593d83434..8fafdd473c 100644
--- a/fpdfsdk/javascript/cjs_scalehow.cpp
+++ b/fpdfsdk/javascript/cjs_scalehow.cpp
@@ -11,12 +11,10 @@ JSConstSpec CJS_ScaleHow::ConstSpecs[] = {
{"anamorphic", JSConstSpec::Number, 1, 0},
{0, JSConstSpec::Number, 0, 0}};
-const char* CJS_ScaleHow::g_pClassName = "scaleHow";
int CJS_ScaleHow::g_nObjDefnID = -1;
void CJS_ScaleHow::DefineJSObjects(CFXJS_Engine* pEngine,
FXJSOBJTYPE eObjType) {
- g_nObjDefnID = pEngine->DefineObj(CJS_ScaleHow::g_pClassName, eObjType,
- nullptr, nullptr);
+ g_nObjDefnID = pEngine->DefineObj("scaleHow", eObjType, nullptr, nullptr);
DefineConsts(pEngine, g_nObjDefnID, ConstSpecs);
}
diff --git a/fpdfsdk/javascript/cjs_scalehow.h b/fpdfsdk/javascript/cjs_scalehow.h
index 2d3906eced..36c5fb3ce1 100644
--- a/fpdfsdk/javascript/cjs_scalehow.h
+++ b/fpdfsdk/javascript/cjs_scalehow.h
@@ -14,7 +14,6 @@ class CJS_ScaleHow : public CJS_Object {
explicit CJS_ScaleHow(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {}
~CJS_ScaleHow() override {}
- static const char* g_pClassName;
static int g_nObjDefnID;
static JSConstSpec ConstSpecs[];
diff --git a/fpdfsdk/javascript/cjs_scalewhen.cpp b/fpdfsdk/javascript/cjs_scalewhen.cpp
index 129a150a3a..82a4541855 100644
--- a/fpdfsdk/javascript/cjs_scalewhen.cpp
+++ b/fpdfsdk/javascript/cjs_scalewhen.cpp
@@ -13,12 +13,10 @@ JSConstSpec CJS_ScaleWhen::ConstSpecs[] = {
{"tooSmall", JSConstSpec::Number, 3, 0},
{0, JSConstSpec::Number, 0, 0}};
-const char* CJS_ScaleWhen::g_pClassName = "scaleWhen";
int CJS_ScaleWhen::g_nObjDefnID = -1;
void CJS_ScaleWhen::DefineJSObjects(CFXJS_Engine* pEngine,
FXJSOBJTYPE eObjType) {
- g_nObjDefnID = pEngine->DefineObj(CJS_ScaleWhen::g_pClassName, eObjType,
- nullptr, nullptr);
+ g_nObjDefnID = pEngine->DefineObj("scaleWhen", eObjType, nullptr, nullptr);
DefineConsts(pEngine, g_nObjDefnID, ConstSpecs);
}
diff --git a/fpdfsdk/javascript/cjs_scalewhen.h b/fpdfsdk/javascript/cjs_scalewhen.h
index 72e8de1cb9..1b64c0fea9 100644
--- a/fpdfsdk/javascript/cjs_scalewhen.h
+++ b/fpdfsdk/javascript/cjs_scalewhen.h
@@ -14,7 +14,6 @@ class CJS_ScaleWhen : public CJS_Object {
explicit CJS_ScaleWhen(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {}
~CJS_ScaleWhen() override {}
- static const char* g_pClassName;
static int g_nObjDefnID;
static JSConstSpec ConstSpecs[];
diff --git a/fpdfsdk/javascript/cjs_style.cpp b/fpdfsdk/javascript/cjs_style.cpp
index 57064133a5..66342f5649 100644
--- a/fpdfsdk/javascript/cjs_style.cpp
+++ b/fpdfsdk/javascript/cjs_style.cpp
@@ -15,11 +15,9 @@ JSConstSpec CJS_Style::ConstSpecs[] = {
{"sq", JSConstSpec::String, 0, "square"},
{0, JSConstSpec::Number, 0, 0}};
-const char* CJS_Style::g_pClassName = "style";
int CJS_Style::g_nObjDefnID = -1;
void CJS_Style::DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType) {
- g_nObjDefnID =
- pEngine->DefineObj(CJS_Style::g_pClassName, eObjType, nullptr, nullptr);
+ g_nObjDefnID = pEngine->DefineObj("style", eObjType, nullptr, nullptr);
DefineConsts(pEngine, g_nObjDefnID, ConstSpecs);
}
diff --git a/fpdfsdk/javascript/cjs_style.h b/fpdfsdk/javascript/cjs_style.h
index 2609f3e5a8..0269bfeb9d 100644
--- a/fpdfsdk/javascript/cjs_style.h
+++ b/fpdfsdk/javascript/cjs_style.h
@@ -14,7 +14,6 @@ class CJS_Style : public CJS_Object {
explicit CJS_Style(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {}
~CJS_Style() override {}
- static const char* g_pClassName;
static int g_nObjDefnID;
static JSConstSpec ConstSpecs[];
diff --git a/fpdfsdk/javascript/cjs_zoomtype.cpp b/fpdfsdk/javascript/cjs_zoomtype.cpp
index 88707765eb..d138381a2e 100644
--- a/fpdfsdk/javascript/cjs_zoomtype.cpp
+++ b/fpdfsdk/javascript/cjs_zoomtype.cpp
@@ -16,12 +16,10 @@ JSConstSpec CJS_Zoomtype::ConstSpecs[] = {
{"refW", JSConstSpec::String, 0, "ReflowWidth"},
{0, JSConstSpec::Number, 0, 0}};
-const char* CJS_Zoomtype::g_pClassName = "zoomtype";
int CJS_Zoomtype::g_nObjDefnID = -1;
void CJS_Zoomtype::DefineJSObjects(CFXJS_Engine* pEngine,
FXJSOBJTYPE eObjType) {
- g_nObjDefnID = pEngine->DefineObj(CJS_Zoomtype::g_pClassName, eObjType,
- nullptr, nullptr);
+ g_nObjDefnID = pEngine->DefineObj("zoomtype", eObjType, nullptr, nullptr);
DefineConsts(pEngine, g_nObjDefnID, ConstSpecs);
}
diff --git a/fpdfsdk/javascript/cjs_zoomtype.h b/fpdfsdk/javascript/cjs_zoomtype.h
index e7dd7da53a..e7ba68930e 100644
--- a/fpdfsdk/javascript/cjs_zoomtype.h
+++ b/fpdfsdk/javascript/cjs_zoomtype.h
@@ -14,7 +14,6 @@ class CJS_Zoomtype : public CJS_Object {
explicit CJS_Zoomtype(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {}
~CJS_Zoomtype() override {}
- static const char* g_pClassName;
static int g_nObjDefnID;
static JSConstSpec ConstSpecs[];
diff --git a/fpdfsdk/javascript/color.cpp b/fpdfsdk/javascript/color.cpp
index 0e05ddff2d..adc56d98ce 100644
--- a/fpdfsdk/javascript/color.cpp
+++ b/fpdfsdk/javascript/color.cpp
@@ -34,13 +34,12 @@ JSMethodSpec CJS_Color::MethodSpecs[] = {{"convert", convert_static},
{"equal", equal_static},
{0, 0}};
-const char* CJS_Color::g_pClassName = "color";
int CJS_Color::g_nObjDefnID = -1;
void CJS_Color::DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType) {
- g_nObjDefnID = pEngine->DefineObj(CJS_Color::g_pClassName, eObjType,
- JSConstructor<CJS_Color, color>,
- JSDestructor<CJS_Color>);
+ g_nObjDefnID =
+ pEngine->DefineObj("color", eObjType, JSConstructor<CJS_Color, color>,
+ JSDestructor<CJS_Color>);
DefineProps(pEngine, g_nObjDefnID, PropertySpecs);
DefineMethods(pEngine, g_nObjDefnID, MethodSpecs);
}
diff --git a/fpdfsdk/javascript/color.h b/fpdfsdk/javascript/color.h
index 5705787d43..0a97de0621 100644
--- a/fpdfsdk/javascript/color.h
+++ b/fpdfsdk/javascript/color.h
@@ -88,7 +88,6 @@ class CJS_Color : public CJS_Object {
explicit CJS_Color(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {}
~CJS_Color() override {}
- static const char* g_pClassName;
static int g_nObjDefnID;
static JSPropertySpec PropertySpecs[];
static JSMethodSpec MethodSpecs[];
diff --git a/fpdfsdk/javascript/console.cpp b/fpdfsdk/javascript/console.cpp
index dbe8e328d1..0f5ca4ea1c 100644
--- a/fpdfsdk/javascript/console.cpp
+++ b/fpdfsdk/javascript/console.cpp
@@ -20,11 +20,10 @@ JSMethodSpec CJS_Console::MethodSpecs[] = {{"clear", clear_static},
{"show", show_static},
{0, 0}};
-const char* CJS_Console::g_pClassName = "console";
int CJS_Console::g_nObjDefnID = -1;
void CJS_Console::DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType) {
- g_nObjDefnID = pEngine->DefineObj(CJS_Console::g_pClassName, eObjType,
+ g_nObjDefnID = pEngine->DefineObj("console", eObjType,
JSConstructor<CJS_Console, console>,
JSDestructor<CJS_Console>);
DefineMethods(pEngine, g_nObjDefnID, MethodSpecs);
diff --git a/fpdfsdk/javascript/console.h b/fpdfsdk/javascript/console.h
index ca0c144f76..de1a40a30e 100644
--- a/fpdfsdk/javascript/console.h
+++ b/fpdfsdk/javascript/console.h
@@ -32,7 +32,6 @@ class CJS_Console : public CJS_Object {
explicit CJS_Console(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {}
~CJS_Console() override {}
- static const char* g_pClassName;
static int g_nObjDefnID;
static JSMethodSpec MethodSpecs[];
diff --git a/fpdfsdk/javascript/event.cpp b/fpdfsdk/javascript/event.cpp
index 61aa546195..9102bb61cc 100644
--- a/fpdfsdk/javascript/event.cpp
+++ b/fpdfsdk/javascript/event.cpp
@@ -36,13 +36,12 @@ JSPropertySpec CJS_Event::PropertySpecs[] = {
{"willCommit", get_will_commit_static, set_will_commit_static},
{0, 0, 0}};
-const char* CJS_Event::g_pClassName = "event";
int CJS_Event::g_nObjDefnID = -1;
void CJS_Event::DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType) {
- g_nObjDefnID = pEngine->DefineObj(CJS_Event::g_pClassName, eObjType,
- JSConstructor<CJS_Event, event>,
- JSDestructor<CJS_Event>);
+ g_nObjDefnID =
+ pEngine->DefineObj("event", eObjType, JSConstructor<CJS_Event, event>,
+ JSDestructor<CJS_Event>);
DefineProps(pEngine, g_nObjDefnID, PropertySpecs);
}
diff --git a/fpdfsdk/javascript/event.h b/fpdfsdk/javascript/event.h
index 69745633f1..2a3ee3def4 100644
--- a/fpdfsdk/javascript/event.h
+++ b/fpdfsdk/javascript/event.h
@@ -80,7 +80,6 @@ class CJS_Event : public CJS_Object {
explicit CJS_Event(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {}
~CJS_Event() override {}
- static const char* g_pClassName;
static int g_nObjDefnID;
static JSPropertySpec PropertySpecs[];
diff --git a/fpdfsdk/javascript/report.cpp b/fpdfsdk/javascript/report.cpp
index eec611896d..b702864a22 100644
--- a/fpdfsdk/javascript/report.cpp
+++ b/fpdfsdk/javascript/report.cpp
@@ -16,13 +16,12 @@ JSMethodSpec CJS_Report::MethodSpecs[] = {{"save", save_static},
{"writeText", writeText_static},
{0, 0}};
-const char* CJS_Report::g_pClassName = "Report";
int CJS_Report::g_nObjDefnID = -1;
void CJS_Report::DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType) {
- g_nObjDefnID = pEngine->DefineObj(CJS_Report::g_pClassName, eObjType,
- JSConstructor<CJS_Report, Report>,
- JSDestructor<CJS_Report>);
+ g_nObjDefnID =
+ pEngine->DefineObj("Report", eObjType, JSConstructor<CJS_Report, Report>,
+ JSDestructor<CJS_Report>);
DefineMethods(pEngine, g_nObjDefnID, MethodSpecs);
}
diff --git a/fpdfsdk/javascript/report.h b/fpdfsdk/javascript/report.h
index 13a6718297..51798e6bcb 100644
--- a/fpdfsdk/javascript/report.h
+++ b/fpdfsdk/javascript/report.h
@@ -28,7 +28,6 @@ class CJS_Report : public CJS_Object {
explicit CJS_Report(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {}
~CJS_Report() override {}
- static const char* g_pClassName;
static int g_nObjDefnID;
static JSMethodSpec MethodSpecs[];
diff --git a/fpdfsdk/javascript/util.cpp b/fpdfsdk/javascript/util.cpp
index 75b0db3141..00d7841022 100644
--- a/fpdfsdk/javascript/util.cpp
+++ b/fpdfsdk/javascript/util.cpp
@@ -33,13 +33,11 @@ JSMethodSpec CJS_Util::MethodSpecs[] = {
{"printx", printx_static}, {"scand", scand_static},
{"byteToChar", byteToChar_static}, {0, 0}};
-const char* CJS_Util::g_pClassName = "util";
int CJS_Util::g_nObjDefnID = -1;
void CJS_Util::DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType) {
- g_nObjDefnID =
- pEngine->DefineObj(CJS_Util::g_pClassName, eObjType,
- JSConstructor<CJS_Util, util>, JSDestructor<CJS_Util>);
+ g_nObjDefnID = pEngine->DefineObj(
+ "util", eObjType, JSConstructor<CJS_Util, util>, JSDestructor<CJS_Util>);
DefineMethods(pEngine, g_nObjDefnID, MethodSpecs);
}
diff --git a/fpdfsdk/javascript/util.h b/fpdfsdk/javascript/util.h
index c3ede9a8ac..cf54b159f9 100644
--- a/fpdfsdk/javascript/util.h
+++ b/fpdfsdk/javascript/util.h
@@ -47,7 +47,6 @@ class CJS_Util : public CJS_Object {
explicit CJS_Util(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {}
~CJS_Util() override {}
- static const char* g_pClassName;
static int g_nObjDefnID;
static JSMethodSpec MethodSpecs[];