Closed Bug 212839 Opened 21 years ago Closed 21 years ago

Tree control used in preferences dialog does not handle collapsing properly

Categories

(Core :: XUL, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: janusfury, Assigned: janv)

References

Details

(Keywords: regression)

Attachments

(3 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5b) Gecko/20030715
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5b) Gecko/20030715

If you open multiple leaves in a tree control (like the one in Preferences), and
scroll down, and then collapse a large leaf, the tree control does not scroll
back up properly, and it displays phantom items (ones that can be selected). The
scrollbar is also gone, so the only way to get rid of them is to expand/collapse
another leaf.

Reproducible: Always

Steps to Reproduce:
1. Open preferences dialog.
2. Open two or three leaves.
3. Scroll down.
4. Collapse a leaf.
Actual Results:  
The tree control scrolled up beyond the top of its items, and displayed phantom
items.

Expected Results:  
Scrolled to the correct location.
Attached image After collapsing a leaf
I've got a fix for this in my tree. Unfortunately I don't have my tree...
Status: UNCONFIRMED → NEW
Ever confirmed: true
*** Bug 213460 has been marked as a duplicate of this bug. ***
this regressed between trunk 2003062005 and 2003062105.

debug build asserts a lot:
###!!! ASSERTION: bad row: 'aRowIndex >= 0 && aRowIndex < mRows.Count()', file
nsXULTreeBuilder.cpp, line 697
###!!! ASSERTION: bad row: 'aIndex >= 0 && aIndex < mRows.Count()', file
nsXULTreeBuilder.cpp, line 573
###!!! ASSERTION: bad row: 'aRow >= 0 && aRow < mRows.Count()', file
nsXULTreeBuilder.cpp, line 540
Keywords: regression
OS: Windows XP → All
*** Bug 215799 has been marked as a duplicate of this bug. ***
FYI Mozilla 1.4 initially mispaints the tree, although you need a slow enough
computer to notice before it correctly repains it :-)
Comment on attachment 129726 [details] [diff] [review]
Proposed patch

Fix stops us from invalidating an invisible scrollbar, which sets the maximum
position to negative, thus setting the first visible row negative.
Attachment #129726 - Flags: superreview?(rbs)
Attachment #129726 - Flags: review?(varga)
Comment on attachment 129726 [details] [diff] [review]
Proposed patch

I just reviewed other patch which contains the same change.
anyway, r=varga
Attachment #129726 - Flags: review?(varga) → review+
You mean bug 216030? The difference is, this is probably a 1.5 blocker.
yep
Comment on attachment 129726 [details] [diff] [review]
Proposed patch

sr=rbs

Does this fix bug 125687 too?
Attachment #129726 - Flags: superreview?(rbs) → superreview+
It should fix one cause of those assertions.
Comment on attachment 129726 [details] [diff] [review]
Proposed patch

Requesting 1.5 approval for this fix to a pretty visible bug.
Attachment #129726 - Flags: approval1.5b?
*** Bug 214603 has been marked as a duplicate of this bug. ***
Comment on attachment 129726 [details] [diff] [review]
Proposed patch

a=asa (on behalf of drivers) for checkin to Mozilla 1.5beta.
Attachment #129726 - Flags: approval1.5b? → approval1.5b+
Fix checked in.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
*** Bug 169196 has been marked as a duplicate of this bug. ***
Component: XP Toolkit/Widgets: Trees → XUL
QA Contact: shrir → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: