Bug 345982 Object - DOM Node does not update when changing values of a node's attributes

patch by sylvain.pasche@gmail.com r=timeless sr=neil
This commit is contained in:
timeless%mozdev.org 2006-09-20 15:35:52 +00:00
Родитель bb6551c9b1
Коммит b17f13e009
1 изменённых файлов: 9 добавлений и 8 удалений

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

@ -732,18 +732,19 @@ inDOMView::AttributeChanged(nsIDocument *aDocument, nsIContent* aContent,
inDOMViewNode* contentNode = nsnull;
PRInt32 contentRow;
PRInt32 attrRow;
if (NS_FAILED(NodeToRow(content, &contentRow))) {
return;
}
RowToNode(contentRow, &contentNode);
if (!contentRow || !contentNode->isOpen) {
return;
}
if (mRootNode == content) {
if (mRootNode == content &&
!(mWhatToShow & nsIDOMNodeFilter::SHOW_ELEMENT)) {
// if this view has a root node but is not displaying it,
// it is ok to act as if the changed attribute is on the root.
attrRow = attrCount - 1;
} else {
if (NS_FAILED(NodeToRow(content, &contentRow))) {
return;
}
RowToNode(contentRow, &contentNode);
if (!contentNode->isOpen) {
return;
}
attrRow = contentRow + attrCount;
}