diff options
author | Tom Sepez <tsepez@chromium.org> | 2017-02-16 09:43:10 -0800 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-02-21 15:38:28 +0000 |
commit | 04557b8a7c2d3dab06fe9eadacc3c7744b3e14e2 (patch) | |
tree | 87226d982038347cb5bfc78966f21be4d9f82669 /fpdfsdk/javascript/color.cpp | |
parent | b1670b5cca9a59dfb612ef9eb891a70dd716bf9c (diff) | |
download | pdfium-04557b8a7c2d3dab06fe9eadacc3c7744b3e14e2.tar.xz |
Remove some JS_Define macroschromium/3020
Attempt at clarity.
Change-Id: Ie37890888e1ec6e07cd10c68066b90f854fe6038
Reviewed-on: https://pdfium-review.googlesource.com/2719
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/javascript/color.cpp')
-rw-r--r-- | fpdfsdk/javascript/color.cpp | 42 |
1 files changed, 20 insertions, 22 deletions
diff --git a/fpdfsdk/javascript/color.cpp b/fpdfsdk/javascript/color.cpp index 90a8495b86..4d8701b9f2 100644 --- a/fpdfsdk/javascript/color.cpp +++ b/fpdfsdk/javascript/color.cpp @@ -15,28 +15,26 @@ #include "fpdfsdk/javascript/cjs_event_context.h" #include "fpdfsdk/javascript/cjs_runtime.h" -BEGIN_JS_STATIC_CONST(CJS_Color) -END_JS_STATIC_CONST() - -BEGIN_JS_STATIC_PROP(CJS_Color) -JS_STATIC_PROP_ENTRY(black) -JS_STATIC_PROP_ENTRY(blue) -JS_STATIC_PROP_ENTRY(cyan) -JS_STATIC_PROP_ENTRY(dkGray) -JS_STATIC_PROP_ENTRY(gray) -JS_STATIC_PROP_ENTRY(green) -JS_STATIC_PROP_ENTRY(ltGray) -JS_STATIC_PROP_ENTRY(magenta) -JS_STATIC_PROP_ENTRY(red) -JS_STATIC_PROP_ENTRY(transparent) -JS_STATIC_PROP_ENTRY(white) -JS_STATIC_PROP_ENTRY(yellow) -END_JS_STATIC_PROP() - -BEGIN_JS_STATIC_METHOD(CJS_Color) -JS_STATIC_METHOD_ENTRY(convert) -JS_STATIC_METHOD_ENTRY(equal) -END_JS_STATIC_METHOD() +JSConstSpec CJS_Color::ConstSpecs[] = {{0, JSConstSpec::Number, 0, 0}}; + +JSPropertySpec CJS_Color::PropertySpecs[] = { + {L"black", get_black_static, set_black_static}, + {L"blue", get_blue_static, set_blue_static}, + {L"cyan", get_cyan_static, set_cyan_static}, + {L"dkGray", get_dkGray_static, set_dkGray_static}, + {L"gray", get_gray_static, set_gray_static}, + {L"green", get_green_static, set_green_static}, + {L"ltGray", get_ltGray_static, set_ltGray_static}, + {L"magenta", get_magenta_static, set_magenta_static}, + {L"red", get_red_static, set_red_static}, + {L"transparent", get_transparent_static, set_transparent_static}, + {L"white", get_white_static, set_white_static}, + {L"yellow", get_yellow_static, set_yellow_static}, + {0, 0, 0}}; + +JSMethodSpec CJS_Color::MethodSpecs[] = {{L"convert", convert_static}, + {L"equal", equal_static}, + {0, 0}}; IMPLEMENT_JS_CLASS(CJS_Color, color) |