From b17f13e00941576e5f93ea8627b2dfca45c7439f Mon Sep 17 00:00:00 2001 From: "timeless%mozdev.org" Date: Wed, 20 Sep 2006 15:35:52 +0000 Subject: [PATCH] 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 --- layout/inspector/src/inDOMView.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/layout/inspector/src/inDOMView.cpp b/layout/inspector/src/inDOMView.cpp index ee7d78437ecc..5341c05b6118 100644 --- a/layout/inspector/src/inDOMView.cpp +++ b/layout/inspector/src/inDOMView.cpp @@ -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; }