Bug 406316, clear tree caches when setting attributes on tree or body, r+sr=neil,a=damon
authorenndeakin@sympatico.ca
Thu, 13 Dec 2007 06:18:38 -0800
changeset 9004 980890a3d50d40dfe1baf02a63ffc8c3c700781a
parent 9003 ca614419d1d4da6933ef99c763627948f8043998
child 9005 5015b5da15839d26accee8bdc1fb6c25523ed17b
push idunknown
push userunknown
push dateunknown
reviewersdamon
bugs406316
milestone1.9b3pre
Bug 406316, clear tree caches when setting attributes on tree or body, r+sr=neil,a=damon
layout/xul/base/src/tree/src/nsTreeContentView.cpp
--- a/layout/xul/base/src/tree/src/nsTreeContentView.cpp
+++ b/layout/xul/base/src/tree/src/nsTreeContentView.cpp
@@ -804,16 +804,21 @@ nsTreeContentView::AttributeChanged(nsID
                                     nsIAtom*     aAttribute,
                                     PRInt32      aModType,
                                     PRUint32     aStateMask)
 {
   // Make sure this notification concerns us.
   // First check the tag to see if it's one that we care about.
   nsIAtom *tag = aContent->Tag();
 
+  if (mBoxObject && (aContent == mRoot || aContent == mBody)) {
+    mBoxObject->ClearStyleAndImageCaches();
+    mBoxObject->Invalidate();
+  }
+
   if (aContent->IsNodeOfType(nsINode::eXUL)) {
     if (tag != nsGkAtoms::treecol &&
         tag != nsGkAtoms::treeitem &&
         tag != nsGkAtoms::treeseparator &&
         tag != nsGkAtoms::treerow &&
         tag != nsGkAtoms::treecell)
       return;
   }