summaryrefslogtreecommitdiff
path: root/fxjs
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-11-02 19:11:57 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-02 19:11:57 +0000
commit23aa2b0f8a3202337a40e8dcf3d8340bfd42e004 (patch)
tree51da1418339b19eb3ba9a175dc10e8ed29dbc3e9 /fxjs
parent3ac07ffafea1ee4d3cf985e32692849dd3fcfdfb (diff)
downloadpdfium-23aa2b0f8a3202337a40e8dcf3d8340bfd42e004.tar.xz
Remove default values from CJX_Node::SetCData
This CL removes the default values from SetCData and inlines at the call sites. Change-Id: I664338a8c7fec2ee9ec0c9ed9f892e57ea1ced43 Reviewed-on: https://pdfium-review.googlesource.com/17534 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fxjs')
-rw-r--r--fxjs/cjx_node.cpp10
-rw-r--r--fxjs/cjx_node.h4
2 files changed, 8 insertions, 6 deletions
diff --git a/fxjs/cjx_node.cpp b/fxjs/cjx_node.cpp
index c6e60933f0..1724881c55 100644
--- a/fxjs/cjx_node.cpp
+++ b/fxjs/cjx_node.cpp
@@ -218,7 +218,7 @@ bool CJX_Node::SetAttribute(XFA_ATTRIBUTE eAttr,
bNotify);
} break;
case XFA_ATTRIBUTETYPE_Cdata:
- return SetCData(pAttr->eName, WideString(wsValue), bNotify);
+ return SetCData(pAttr->eName, WideString(wsValue), bNotify, false);
case XFA_ATTRIBUTETYPE_Boolean:
return SetBoolean(pAttr->eName, wsValue != L"0", bNotify);
case XFA_ATTRIBUTETYPE_Integer:
@@ -752,7 +752,7 @@ void CJX_Node::Script_NodeClass_LoadXML(CFXJSE_Arguments* pArguments) {
WideStringView wsContentType = GetCData(XFA_ATTRIBUTE_ContentType);
if (!wsContentType.IsEmpty()) {
pFakeRoot->JSNode()->SetCData(XFA_ATTRIBUTE_ContentType,
- WideString(wsContentType));
+ WideString(wsContentType), false, false);
}
std::unique_ptr<CFX_XMLNode> pFakeXMLRoot(pFakeRoot->GetXMLMappingNode());
@@ -3333,7 +3333,8 @@ bool CJX_Node::SetScriptContent(const WideString& wsContent,
CXFA_Node* pChildValue = pValue->GetNodeItem(XFA_NODEITEM_FirstChild);
ASSERT(pChildValue);
- pChildValue->JSNode()->SetCData(XFA_ATTRIBUTE_ContentType, L"text/xml");
+ pChildValue->JSNode()->SetCData(XFA_ATTRIBUTE_ContentType, L"text/xml",
+ false, false);
pChildValue->JSNode()->SetScriptContent(wsContent, wsContent, bNotify,
bScriptModify, false);
CXFA_Node* pBind = GetXFANode()->GetBindData();
@@ -3375,7 +3376,8 @@ bool CJX_Node::SetScriptContent(const WideString& wsContent,
while (iAddNodes-- > 0) {
pValueNodes =
pBind->CreateSamePacketNode(XFA_Element::DataValue);
- pValueNodes->JSNode()->SetCData(XFA_ATTRIBUTE_Name, L"value");
+ pValueNodes->JSNode()->SetCData(XFA_ATTRIBUTE_Name, L"value",
+ false, false);
pValueNodes->CreateXMLMappingNode();
pBind->InsertChild(pValueNodes);
}
diff --git a/fxjs/cjx_node.h b/fxjs/cjx_node.h
index df360011a4..7df789df50 100644
--- a/fxjs/cjx_node.h
+++ b/fxjs/cjx_node.h
@@ -88,8 +88,8 @@ class CJX_Node : public CJX_Object {
bool TryCData(XFA_ATTRIBUTE eAttr, WideString& wsValue, bool bUseDefault);
bool SetCData(XFA_ATTRIBUTE eAttr,
const WideString& wsValue,
- bool bNotify = false,
- bool bScriptModify = false);
+ bool bNotify,
+ bool bScriptModify);
WideStringView GetCData(XFA_ATTRIBUTE eAttr);
bool TryContent(WideString& wsContent,