diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-10-23 12:08:34 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-10-23 18:03:39 +0000 |
commit | 0e187d80179fe63c11cfb710ecd18b95b39dfa10 (patch) | |
tree | 29d9a0f91ab44c4d6bca5e9c900c01e7bf2d380d /fpdfsdk/javascript/color.h | |
parent | 4b172c4934ddda46e06b1c4dc7554e96e1a2f54a (diff) | |
download | pdfium-0e187d80179fe63c11cfb710ecd18b95b39dfa10.tar.xz |
Cleanup some javascript color code
This CL changes the color conversion methods to return their result
instead of taking an out param.
Change-Id: I19ca2b395145866533c7f93cbad80cdf4d7df05d
Reviewed-on: https://pdfium-review.googlesource.com/16530
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/javascript/color.h')
-rw-r--r-- | fpdfsdk/javascript/color.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/fpdfsdk/javascript/color.h b/fpdfsdk/javascript/color.h index 08da346377..851f05b124 100644 --- a/fpdfsdk/javascript/color.h +++ b/fpdfsdk/javascript/color.h @@ -14,6 +14,11 @@ class color : public CJS_EmbedObj { public: + static CJS_Array ConvertPWLColorToArray(CJS_Runtime* pRuntime, + const CFX_Color& color); + static CFX_Color ConvertArrayToPWLColor(CJS_Runtime* pRuntime, + const CJS_Array& array); + explicit color(CJS_Object* pJSObject); ~color() override; @@ -80,13 +85,6 @@ class color : public CJS_EmbedObj { CJS_Value& vRet, WideString& sError); - static void ConvertPWLColorToArray(CJS_Runtime* pRuntime, - const CFX_Color& color, - CJS_Array* array); - static void ConvertArrayToPWLColor(CJS_Runtime* pRuntime, - const CJS_Array& array, - CFX_Color* color); - private: bool GetPropertyHelper(CJS_Runtime* pRuntime, CJS_Value* vp, CFX_Color* val); bool SetPropertyHelper(CJS_Runtime* pRuntime, |