Closed Bug 339232 Opened 15 years ago Closed 15 years ago
Appended can append multiple elements
From reading checkins I recently noticed that ContentAppended can append multiple elements. However nsTreeContentView only assumes one element is appended. This seems to resolve a problem that I have unfortunately since worked around in the caller so that I no longer have a convenient testcase.
OK, I've figured out what the testcase is, although not enough to work out how to write one that works in content. The bug only occurs if all the following conditions are true: a) your RDF is already loaded b) your tree is already visible c) you are not using flags="dont-build-content" d) you have an explicit <treechildren/> element outside the template. Once all these conditions are met, any changes to the datasources or ref of the tree will generate a single content appended notification for multiple elements.
Comment on attachment 223321 [details] [diff] [review] Proposed patch Looks good, but GetChildCount() returns a PRUint32. So please change childCount to that type, and cast in the comparison? sr+a=bzbarsky with that.
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Component: XP Toolkit/Widgets: Trees → XUL
QA Contact: xptoolkit.trees → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.