diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2018-05-29 19:42:39 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-05-29 19:42:39 +0000 |
commit | 6af5369477ec05554ef9e73ae6762860095f09e9 (patch) | |
tree | 0a9d28f4e3f89ca5b141954913169fdff63bf59c /fxjs/cfxjse_engine.h | |
parent | 162a31a6af1538acf7ac9835111626161287d742 (diff) | |
download | pdfium-6af5369477ec05554ef9e73ae6762860095f09e9.tar.xz |
[xfa] Propagate the xfa change data for text to JS and back.
This CL adds the necessary plumbing to propagate the change information
for a text widget from FWL out to JS and handle the returned value as
necessary.
Bug: pdfium:1066
Change-Id: I78fd81761b90294f1836e9f09dba12ed238963cc
Reviewed-on: https://pdfium-review.googlesource.com/33070
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fxjs/cfxjse_engine.h')
-rw-r--r-- | fxjs/cfxjse_engine.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fxjs/cfxjse_engine.h b/fxjs/cfxjse_engine.h index ca5f3ee098..33723ad8a9 100644 --- a/fxjs/cfxjse_engine.h +++ b/fxjs/cfxjse_engine.h @@ -11,6 +11,7 @@ #include <memory> #include <vector> +#include "core/fxcrt/unowned_ptr.h" #include "fxjs/cfx_v8.h" #include "fxjs/cfxjse_formcalc_context.h" #include "v8/include/v8.h" @@ -54,8 +55,8 @@ class CFXJSE_Engine : public CFX_V8 { CFXJSE_Engine(CXFA_Document* pDocument, CFXJS_Engine* fxjs_engine); ~CFXJSE_Engine() override; - void SetEventParam(CXFA_EventParam param) { m_eventParam = param; } - CXFA_EventParam* GetEventParam() { return &m_eventParam; } + void SetEventParam(CXFA_EventParam* param) { m_eventParam = param; } + CXFA_EventParam* GetEventParam() { return m_eventParam.Get(); } bool RunScript(CXFA_Script::Type eScriptType, const WideStringView& wsScript, CFXJSE_Value* pRetValue, @@ -113,7 +114,7 @@ class CFXJSE_Engine : public CFX_V8 { std::map<CXFA_Object*, std::unique_ptr<CFXJSE_Value>> m_mapObjectToValue; std::map<CXFA_Object*, std::unique_ptr<CFXJSE_Context>> m_mapVariableToContext; - CXFA_EventParam m_eventParam; + UnownedPtr<CXFA_EventParam> m_eventParam; std::vector<CXFA_Node*> m_upObjectArray; // CacheList holds the List items so we can clean them up when we're done. std::vector<std::unique_ptr<CXFA_List>> m_CacheList; |