[XForms] MozType not dynamically updated. Bug 313315, r=smaug+doronr

This commit is contained in:
allan%beaufour.dk 2006-05-30 13:41:14 +00:00
Родитель 8aa85fd447
Коммит 87a7af55d1
1 изменённых файлов: 13 добавлений и 0 удалений

Просмотреть файл

@ -54,6 +54,7 @@
#include "nsIEventStateManager.h"
#include "nsIContent.h"
#include "nsIDOM3Node.h"
#include "nsIDOMAttr.h"
/** This class is used to generate xforms-hint and xforms-help events.*/
class nsXFormsHintHelpListener : public nsIDOMEventListener {
@ -196,6 +197,18 @@ nsXFormsControlStubBase::ResetBoundNode(const nsString &aBindAttribute,
return wrapper->SetIntrinsicState(iState);
}
// Check for presence of @xsi:type on bound node and add as a dependency
nsCOMPtr<nsIDOMElement> boundEl(do_QueryInterface(mBoundNode));
if (boundEl) {
nsCOMPtr<nsIDOMAttr> attrNode;
rv = boundEl->GetAttributeNodeNS(NS_LITERAL_STRING(NS_NAMESPACE_XML_SCHEMA_INSTANCE),
NS_LITERAL_STRING("type"),
getter_AddRefs(attrNode));
if (NS_SUCCEEDED(rv) && attrNode) {
mDependencies.AppendObject(attrNode);
}
}
return NS_OK;
}