diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-12-13 18:29:02 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-12-13 18:29:02 +0000 |
commit | 2614250d4f11ed02033a7da095a1694ece12ab78 (patch) | |
tree | cc41c5770c17ea47537856991fa44cd1e2acfeb8 /xfa/fxfa/parser/cxfa_imagedata.cpp | |
parent | 14768f3264a4cff8ca0096a27e41f1861b2c422b (diff) | |
download | pdfium-2614250d4f11ed02033a7da095a1694ece12ab78.tar.xz |
Methods are on CJX_Object not CJX_Node now
This CL converts all of the JSNode() to JSObject() calls as all of the
original CJX_Node methods have been moved to CJX_Object. This fixes
potential bad casts from things like CJX_Content which do not inhert
from CJX_Node.
Bug: pdfium:793372
Change-Id: I6c7f63a78f3d47bb6bad74faed3fd8c535bf095e
Reviewed-on: https://pdfium-review.googlesource.com/21090
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_imagedata.cpp')
-rw-r--r-- | xfa/fxfa/parser/cxfa_imagedata.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/xfa/fxfa/parser/cxfa_imagedata.cpp b/xfa/fxfa/parser/cxfa_imagedata.cpp index ebd4a8adf5..cacbf9558d 100644 --- a/xfa/fxfa/parser/cxfa_imagedata.cpp +++ b/xfa/fxfa/parser/cxfa_imagedata.cpp @@ -11,38 +11,38 @@ CXFA_ImageData::CXFA_ImageData(CXFA_Node* pNode) : CXFA_DataData(pNode) {} XFA_AttributeEnum CXFA_ImageData::GetAspect() const { - return m_pNode->JSNode()->GetEnum(XFA_Attribute::Aspect); + return m_pNode->JSObject()->GetEnum(XFA_Attribute::Aspect); } WideString CXFA_ImageData::GetContentType() const { - return m_pNode->JSNode() + return m_pNode->JSObject() ->TryCData(XFA_Attribute::ContentType, true) .value_or(L""); } WideString CXFA_ImageData::GetHref() const { - return m_pNode->JSNode()->TryCData(XFA_Attribute::Href, true).value_or(L""); + return m_pNode->JSObject()->TryCData(XFA_Attribute::Href, true).value_or(L""); } XFA_AttributeEnum CXFA_ImageData::GetTransferEncoding() const { return static_cast<XFA_AttributeEnum>( - m_pNode->JSNode()->GetEnum(XFA_Attribute::TransferEncoding)); + m_pNode->JSObject()->GetEnum(XFA_Attribute::TransferEncoding)); } WideString CXFA_ImageData::GetContent() const { - return m_pNode->JSNode()->TryContent(false, true).value_or(L""); + return m_pNode->JSObject()->TryContent(false, true).value_or(L""); } void CXFA_ImageData::SetContentType(const WideString& wsContentType) { - m_pNode->JSNode()->SetCData(XFA_Attribute::ContentType, wsContentType, false, - false); + m_pNode->JSObject()->SetCData(XFA_Attribute::ContentType, wsContentType, + false, false); } void CXFA_ImageData::SetHref(const WideString& wsHref) { - m_pNode->JSNode()->SetCData(XFA_Attribute::Href, wsHref, false, false); + m_pNode->JSObject()->SetCData(XFA_Attribute::Href, wsHref, false, false); } void CXFA_ImageData::SetTransferEncoding(XFA_AttributeEnum iTransferEncoding) { - m_pNode->JSNode()->SetEnum(XFA_Attribute::TransferEncoding, iTransferEncoding, - false); + m_pNode->JSObject()->SetEnum(XFA_Attribute::TransferEncoding, + iTransferEncoding, false); } |