Inform MDG about presence of type attribute, bug 279936, r=doron

This commit is contained in:
allan%beaufour.dk 2005-01-27 14:37:57 +00:00
parent b8a9d300d7
commit ff39d4f7a5
2 changed files with 6 additions and 4 deletions

View File

@ -155,7 +155,6 @@ nsXFormsMDGEngine::AddMIP(ModelItemPropName aType,
PRInt32 aContextSize)
{
NS_ENSURE_ARG(aContextNode);
NS_ENSURE_ARG(aExpression);
#ifdef DEBUG_XF_MDG
nsAutoString nodename;
@ -168,7 +167,7 @@ nsXFormsMDGEngine::AddMIP(ModelItemPropName aType,
aContextPos, aContextSize, gMIPNames[aType], aDynFunc);
#endif
nsXFormsMDGNode* newnode = GetNode(aContextNode,
(ModelItemPropName) aType,
aType,
PR_TRUE);
if (!newnode) {
@ -638,8 +637,6 @@ nsXFormsMDGEngine::SetNodeValue(nsIDOMNode *aContextNode,
case nsIDOMNode::CDATA_SECTION_NODE:
case nsIDOMNode::PROCESSING_INSTRUCTION_NODE:
case nsIDOMNode::COMMENT_NODE:
///
/// @todo Check existing value, and ignore if same?? (XXX)
rv = aContextNode->SetNodeValue(aNodeValue);
NS_ENSURE_SUCCESS(rv, rv);

View File

@ -1001,6 +1001,11 @@ nsXFormsModelElement::ProcessBind(nsIDOMXPathEvaluator *aEvaluator,
rv = nodeElem->SetAttributeNS(NS_LITERAL_STRING(NS_NAMESPACE_XML_SCHEMA_INSTANCE),
NS_LITERAL_STRING("type"),
propStrings[j]);
NS_ENSURE_SUCCESS(rv, rv);
// Inform MDG that it needs to check type. The only arguments
// actually used are |eModel_constraint| and |node|.
rv = mMDG.AddMIP(eModel_constraint, nsnull, nsnull, PR_FALSE, node, 1, 1);
} else {
rv = nodeElem->SetAttributeNS(NS_LITERAL_STRING(NS_NAMESPACE_XFORMS),
NS_LITERAL_STRING("p3ptype"),