XForms bug 314158 - itemset/repeat can't bind against non-dom elements. r=smaug,aaronr

This commit is contained in:
doronr%us.ibm.com 2005-11-01 22:47:22 +00:00
Родитель 7962a513cf
Коммит dac3fb8c60
2 изменённых файлов: 9 добавлений и 13 удалений

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

@ -292,8 +292,7 @@ nsXFormsItemSetElement::Refresh()
nsCOMPtr<nsIXFormsContextControl> ctx(do_QueryInterface(contextContainer)); nsCOMPtr<nsIXFormsContextControl> ctx(do_QueryInterface(contextContainer));
if (ctx) { if (ctx) {
ctx->SetContext(nsCOMPtr<nsIDOMElement>(do_QueryInterface(node)), ctx->SetContext(node, i + 1, nodeCount);
i + 1, nodeCount);
} }
// Clone the template content under the item // Clone the template content under the item
for (PRUint32 j = 0; j < templateNodeCount; ++j) { for (PRUint32 j = 0; j < templateNodeCount; ++j) {

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

@ -769,11 +769,8 @@ nsXFormsRepeatElement::Refresh()
rv = result->SnapshotItem(i - 1, getter_AddRefs(contextNode)); rv = result->SnapshotItem(i - 1, getter_AddRefs(contextNode));
NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIDOMElement> contextElement = do_QueryInterface(contextNode);
NS_ENSURE_TRUE(contextElement, NS_ERROR_FAILURE);
// Set context node, position, and size // Set context node, position, and size
rv = riContext->SetContext(contextElement, i, contextSize); rv = riContext->SetContext(contextNode, i, contextSize);
NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_SUCCESS(rv, rv);
// Iterate over template children, clone them, and append them to <contextcontainer> // Iterate over template children, clone them, and append them to <contextcontainer>