diff options
author | Tom Sepez <tsepez@chromium.org> | 2017-02-16 11:49:55 -0800 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-02-16 20:23:48 +0000 |
commit | d6ae2afa821c87e84790d5c04bbc172a7b12f08f (patch) | |
tree | 10beb72deaffca61ccc54a3fb49ea0d9636579bb /fpdfsdk/javascript/color.cpp | |
parent | 49f7deb494064351c72ef4d31577e04f634e63f3 (diff) | |
download | pdfium-d6ae2afa821c87e84790d5c04bbc172a7b12f08f.tar.xz |
Rename IJS_Context to IJS_EventContext.
Prevents confusion with v8::Context, which is wrapped by a
different IJS_ class.
Change-Id: Iff75809e65015c0f810294de1f0d8ecf963150a3
Reviewed-on: https://pdfium-review.googlesource.com/2751
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/javascript/color.cpp')
-rw-r--r-- | fpdfsdk/javascript/color.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/fpdfsdk/javascript/color.cpp b/fpdfsdk/javascript/color.cpp index 882a9035e8..be26987ff7 100644 --- a/fpdfsdk/javascript/color.cpp +++ b/fpdfsdk/javascript/color.cpp @@ -12,7 +12,7 @@ #include "fpdfsdk/javascript/JS_EventHandler.h" #include "fpdfsdk/javascript/JS_Object.h" #include "fpdfsdk/javascript/JS_Value.h" -#include "fpdfsdk/javascript/cjs_context.h" +#include "fpdfsdk/javascript/cjs_event_context.h" #include "fpdfsdk/javascript/cjs_runtime.h" BEGIN_JS_STATIC_CONST(CJS_Color) @@ -133,20 +133,20 @@ void color::ConvertArrayToPWLColor(CJS_Runtime* pRuntime, } } -#define JS_IMPLEMENT_COLORPROP(prop, var) \ - bool color::prop(IJS_Context* cc, CJS_PropValue& vp, \ - CFX_WideString& sError) { \ - CJS_Runtime* pRuntime = CJS_Runtime::FromContext(cc); \ - CJS_Array array; \ - if (vp.IsGetting()) { \ - ConvertPWLColorToArray(pRuntime, var, &array); \ - vp << array; \ - } else { \ - if (!vp.GetJSValue()->ConvertToArray(pRuntime, array)) \ - return false; \ - ConvertArrayToPWLColor(pRuntime, array, &var); \ - } \ - return true; \ +#define JS_IMPLEMENT_COLORPROP(prop, var) \ + bool color::prop(IJS_EventContext* cc, CJS_PropValue& vp, \ + CFX_WideString& sError) { \ + CJS_Runtime* pRuntime = CJS_Runtime::FromEventContext(cc); \ + CJS_Array array; \ + if (vp.IsGetting()) { \ + ConvertPWLColorToArray(pRuntime, var, &array); \ + vp << array; \ + } else { \ + if (!vp.GetJSValue()->ConvertToArray(pRuntime, array)) \ + return false; \ + ConvertArrayToPWLColor(pRuntime, array, &var); \ + } \ + return true; \ } JS_IMPLEMENT_COLORPROP(transparent, m_crTransparent) @@ -162,7 +162,7 @@ JS_IMPLEMENT_COLORPROP(dkGray, m_crDKGray) JS_IMPLEMENT_COLORPROP(gray, m_crGray) JS_IMPLEMENT_COLORPROP(ltGray, m_crLTGray) -bool color::convert(IJS_Context* cc, +bool color::convert(IJS_EventContext* cc, const std::vector<CJS_Value>& params, CJS_Value& vRet, CFX_WideString& sError) { @@ -170,7 +170,7 @@ bool color::convert(IJS_Context* cc, if (iSize < 2) return false; - CJS_Runtime* pRuntime = CJS_Runtime::FromContext(cc); + CJS_Runtime* pRuntime = CJS_Runtime::FromEventContext(cc); CJS_Array aSource; if (!params[0].ConvertToArray(pRuntime, aSource)) return false; @@ -200,14 +200,14 @@ bool color::convert(IJS_Context* cc, return true; } -bool color::equal(IJS_Context* cc, +bool color::equal(IJS_EventContext* cc, const std::vector<CJS_Value>& params, CJS_Value& vRet, CFX_WideString& sError) { if (params.size() < 2) return false; - CJS_Runtime* pRuntime = CJS_Runtime::FromContext(cc); + CJS_Runtime* pRuntime = CJS_Runtime::FromEventContext(cc); CJS_Array array1; CJS_Array array2; if (!params[0].ConvertToArray(pRuntime, array1)) |