diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-12-12 18:54:48 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-12-12 18:54:48 +0000 |
commit | ebcbb85ea364605baf8e382ad66793bf1b4db029 (patch) | |
tree | 2c546368c63f65d7786a1ab9c818cb07b80d599c /fxjs/xfa/cjx_object.h | |
parent | 4b004930490e416a2a404deee5de4b97e649a1c1 (diff) | |
download | pdfium-ebcbb85ea364605baf8e382ad66793bf1b4db029.tar.xz |
Move Script_Som_Border{Width|Color} to CJX_Object
The CJX_Node isn't the root of the CJX hierarchy. This causes issues
now that CJX_Object has child objects which don't inherit from CJX_Node.
This CL moves Script_Som_Border{Width|Color} from CJX_Node to CJX_Object.
Change-Id: I07ba9ef2af675993c9f4d14cb74f48252a907569
Reviewed-on: https://pdfium-review.googlesource.com/20990
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fxjs/xfa/cjx_object.h')
-rw-r--r-- | fxjs/xfa/cjx_object.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/fxjs/xfa/cjx_object.h b/fxjs/xfa/cjx_object.h index c191dcfd43..dfd2bbc929 100644 --- a/fxjs/xfa/cjx_object.h +++ b/fxjs/xfa/cjx_object.h @@ -9,6 +9,7 @@ #include <map> #include <memory> +#include <utility> #include <vector> #include "core/fxcrt/unowned_ptr.h" @@ -16,6 +17,7 @@ #include "core/fxcrt/xml/cfx_xmlelement.h" #include "third_party/base/optional.h" #include "xfa/fxfa/fxfa_basic.h" +#include "xfa/fxfa/parser/cxfa_widgetdata.h" class CFXJSE_Value; class CJS_V8; @@ -51,6 +53,11 @@ class CJX_Object { CXFA_Document* GetDocument() const; + void SetWidgetData(std::unique_ptr<CXFA_WidgetData> data) { + widget_data_ = std::move(data); + } + CXFA_WidgetData* GetWidgetData() const { return widget_data_.get(); } + bool HasMethod(const WideString& func) const; CJS_Return RunMethod(const WideString& func, const std::vector<v8::Local<v8::Value>>& params); @@ -85,6 +92,13 @@ class CJX_Object { bool bSetting, XFA_Attribute eAttribute); + void Script_Som_BorderColor(CFXJSE_Value* pValue, + bool bSetting, + XFA_Attribute eAttribute); + void Script_Som_BorderWidth(CFXJSE_Value* pValue, + bool bSetting, + XFA_Attribute eAttribute); + pdfium::Optional<int32_t> TryInteger(XFA_Attribute eAttr, bool bUseDefault); bool SetInteger(XFA_Attribute eAttr, int32_t iValue, bool bNotify); int32_t GetInteger(XFA_Attribute eAttr); @@ -164,6 +178,7 @@ class CJX_Object { void RemoveMapModuleKey(void* pKey); void MoveBufferMapData(CXFA_Object* pDstModule); + std::unique_ptr<CXFA_WidgetData> widget_data_; UnownedPtr<CXFA_Object> object_; std::unique_ptr<XFA_MAPMODULEDATA> map_module_data_; std::unique_ptr<CXFA_CalcData> calc_data_; |