Closed
Bug 34546
Opened 26 years ago
Closed 26 years ago
XUL-specified <treeitem> cannot have <treechildren>
Categories
(Core :: XUL, defect, P3)
Core
XUL
Tracking
()
RESOLVED
FIXED
M17
People
(Reporter: waterson, Assigned: hyatt)
References
Details
Attachments
(2 files)
|
1.53 KB,
text/xul
|
Details | |
|
2.44 KB,
patch
|
Details | Diff | Splinter Review |
I think that I opened a bug on this a long time ago, but it was either never
fixed or has regressed.
This XUL does not work:
<tree>
<treecol />
<treechildren>
<treeitem id="container">
<treerow>
<treecell indent="true" value="I have kids!"/>
</treerow>
<treechildren>
<treeitem>
<treerow>
<treecell indent="true" value="Test #1.1" />
</treerow></treeitem>
<treeitem>
<treerow>
<treecell indent="true" value="Test #1.2" />
</treerow></treeitem></treechildren></treeitem>
<treeitem>
<treerow>
<treecell indent="true" value="Test #2" />
</treerow></treeitem>
<treeitem>
<treerow>
<treecell indent="true" value="Test #3" />
</treerow></treeitem></treechildren></tree>
Specifically, the "I have children!" row cannot be opened via double-click.
Even more interesting, specifying "open='true'" on the <treeitem> with the
id="container" causes the item to be displayed as open (the children 1.1 and
1.2 are displayed), and the container can be opened and closed with double
click.
This should work, right? I'm attaching a test case: the left tree has an
"open='true'" attribute set on the treeitem, the right case does not. Since
there is no RDF involved here, I presume there must be a bug with the tree
frame construction code.
| Reporter | ||
Comment 1•26 years ago
|
||
| Reporter | ||
Comment 2•26 years ago
|
||
I'm pretty sure that if *this* doesn't work, getting a <template> onto a
<treeitem> will never work.
Blocks: 33781
| Reporter | ||
Comment 3•26 years ago
|
||
Ok, so I followed the code through to nsTreeRowGroupFrame::AttributeChanged(),
and it looks like the tree widget just ignores changes to the "open" attribute.
This seems wrong.
| Reporter | ||
Comment 4•26 years ago
|
||
Ignore previous comment. I don't know what I'm talking about. I did A-B
comparison between the two trees and determined that in the "initially closed"
treeitem, nsCSSFrameConstructor::ProcessRestyledFrames() isn't getting
NS_STYLE_HINT_FRAMECHANGE.
| Reporter | ||
Comment 5•26 years ago
|
||
...because FrameManager::ReResolveStyleContext() has no elements in the
mUndisplayedMap.
| Reporter | ||
Comment 6•26 years ago
|
||
FWIW, I can get this to work by returning NS_STYLE_HINT_FRAMECHANGE from
nsXULElement::GetMappedAttributeImpact() for <treeitem open="...">. There don't
seem to be any evil side effects from this.
| Reporter | ||
Comment 7•26 years ago
|
||
| Assignee | ||
Comment 8•26 years ago
|
||
Yeah, somehow the tree widget doesn't get undisplayed elements into that map.
Knew about it, but don't know why or how to fix it.
Only bad part about doing a framechange is that you'll rebuild the row's
contents in addition to the kid's, so open/close will get slightly more
expensive. Probably as good a workaround as any though.
| Assignee | ||
Comment 9•26 years ago
|
||
The fix is fine. Check it in.
| Reporter | ||
Comment 10•26 years ago
|
||
actually, it's not. it causes bugs like 34408: "double newsgroup".
| Assignee | ||
Comment 11•26 years ago
|
||
Great. Then I guess we'll find out why things aren't going into the undisplayed
map.... accepting for M17.
Status: NEW → ASSIGNED
Target Milestone: --- → M17
Comment 12•26 years ago
|
||
if you're talking about bug 34726, that's happening anyway, on the nightly
builds (i.e. without your patch)
| Reporter | ||
Comment 13•26 years ago
|
||
Ok, I think I was wrong. This doesn't cause the doubling-up problems, something
else does.
So, hyatt: if you've got better things to do, I'll just check in the reframe for
now. I'll open another bug about the map getting horked.
| Reporter | ||
Comment 14•26 years ago
|
||
fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Component: XP Toolkit/Widgets: Trees → XUL
QA Contact: jrgmorrison → xptoolkit.widgets
You need to log in
before you can comment on or make changes to this bug.
Description
•