Closed Bug 377035 Opened 13 years ago Closed 13 years ago

Want to be able to build trees in a mix of anonymous content

Categories

(Core :: XUL, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: neil, Assigned: neil)

References

Details

Attachments

(3 files, 1 obsolete file)

In particular, I want to be able to write a binding that includes the <tree> element but not the <treechildren> element. Test case coming up.
Attached file Test case
(In reply to comment #1)
>Created an attachment (id=261142)
>Test case
jar:https://bugzilla.mozilla.org/attachment.cgi?id=261142!/377035.xul
Attached patch Proposed patchSplinter Review
Assignee: Jan.Varga → neil
Status: NEW → ASSIGNED
Attachment #261144 - Flags: superreview?(roc)
Attachment #261144 - Flags: review?(enndeakin)
Attachment #261144 - Flags: review?(enndeakin) → review+
Attachment #261144 - Flags: superreview?(roc) → superreview+
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Neil, does this affect bug 228831?
Or bug 235901 (which may be a dupe of something else)?
(In reply to comment #5)
>Neil, does this affect bug 228831?
Only in the case of moving the treechildren out of the binding and using <xbl:children includes="treechildren"/> instead. Note: some CSS required
Attached patch Fix notifications (obsolete) — Splinter Review
Otherwise you can't e.g. toggle twisties
(see the demo at http://neil.rashbrook.org/377035.xul)
Attachment #263464 - Flags: review?(enndeakin)
Attachment #263464 - Flags: review?(enndeakin) → review+
Attachment #263464 - Flags: superreview?(roc)
Attachment #263464 - Flags: superreview?(roc) → superreview+
Notification fix checked in.
Blocks: 380184
So this latest patch totally broke ChatZilla's userlist. Backed out locally,
that fixed it. The rowCount on the view of the rdf tree we use is 0 even if the
channel  is full of users. I don't really know how or why yet, so if anyone
else does, now would be a good time to say.

Filed bug 380184.
Notification fix backed out.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
It turns out that the existing code relies on a document notification for the top-level treechildren to notice when the tree has gone away, and this was the one notification that my change didn't handle. We don't need this notification because removing the top-level treechildren causes the frame to be destroyed which calls mView->SetTree(nsnull) (thus mBoxObject is always null for that particular notification) so I just unconditionally clear the row cache instead.
Attachment #263464 - Attachment is obsolete: true
Attachment #264354 - Flags: superreview?(roc)
Attachment #264354 - Flags: review?(enndeakin)
Flags: in-testsuite?
Attachment #264354 - Flags: superreview?(roc) → superreview+
Depends on: 380217
Attachment #264354 - Flags: review?(enndeakin) → review+
Fixed notification fix checked in.
Status: REOPENED → RESOLVED
Closed: 13 years ago13 years ago
Resolution: --- → FIXED
No longer blocks: 380184
Depends on: 380184
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.