Closed
Bug 122794
Opened 24 years ago
Closed 24 years ago
Outliner columns ordered incorrectly
Categories
(Core :: XUL, defect, P3)
Tracking
()
RESOLVED
FIXED
mozilla1.0
People
(Reporter: patty_g, Assigned: janv)
Details
Attachments
(3 files, 1 obsolete file)
|
1.46 KB,
application/vnd.mozilla.xul+xml
|
Details | |
|
950 bytes,
application/vnd.mozilla.xul+xml
|
Details | |
|
1.79 KB,
patch
|
hewitt
:
superreview+
|
Details | Diff | Splinter Review |
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461)
BuildID: 0.9.7 Release
Starting with 0.9.7 release, some of my outliners get their columns swapped.
In the affected outliners, the first and fourth columns get swapped. The
attachment shows an example of this. When I load this XUL file, the columns
show as "ColumnFour", "ColumnTwo", "ColumnThree", "ColumnOne", etc.
Reproducible: Always
Steps to Reproduce:
1. Bring up the attached XUL file in Mozilla 0.9.7.
2. Compare the order of the columns on screen to their order in the XUL file.
Actual Results: Columns 1 and 4 are swapped.
Expected Results: Column order should follow the order in the XUL file.
| Reporter | ||
Comment 1•24 years ago
|
||
Comment 2•24 years ago
|
||
WFM 2002012903 NT4
Comment 3•24 years ago
|
||
WFM 2002-01-30-03 Win98
| Assignee | ||
Updated•24 years ago
|
Component: XP Toolkit/Widgets → XP Toolkit/Widgets: Trees
Priority: -- → P3
Target Milestone: --- → mozilla1.0
| Assignee | ||
Comment 4•24 years ago
|
||
I don't have 0.9.7 by hand, but WFM with tip build.
Comment 5•24 years ago
|
||
There is _something_ odd occurring here, along the lines of what Patty notes.
At first, the first attached example worked for me with a tip build. But I
updated to the current syntax (this is correct, right?), and when there are
six (and only when there are six) columns, the first and fourth columns are
swapped (at least the labels are swapped).
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window id="test_window5"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml"
>
<outliner flex="1">
<outlinercols>
<outlinercol id="c1" label="One" flex="1"/>
<outlinercol id="c2" label="Two" flex="1"/>
<outlinercol id="c3" label="Three" flex="1"/>
<outlinercol id="c4" label="Four" flex="1"/>
<outlinercol id="c5" label="Five" flex="1"/>
<outlinercol id="c6" label="Six" flex="1"/>
<!--
<outlinercol id="c7" label="Seven" flex="1"/>
<outlinercol id="c8" label="Eight" flex="1"/>
<outlinercol id="c9" label="Nine" flex="1"/>
<outlinercol id="c10" label="Ten" flex="1"/>
<outlinercol id="c11" label="Eleven" flex="1"/>
-->
</outlinercols>
<outlinerchildren/>
</outliner>
</window>
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 6•24 years ago
|
||
I should also note that I was testing this file against a fresh default profile
(i.e., no previously persisted information in the localstore)
Weird. They appear in the proper order in the column picker. The columns are
switched, not just the labels. Selecting One from the column picker affects the
"One" column.
Comment 8•24 years ago
|
||
Jan, should you own this bug?
| Assignee | ||
Comment 9•24 years ago
|
||
Dean's comment indicates a problem with ordinal box layout I think
Maybe hewitt should look.
Taking for now.
Assignee: jaggernaut → varga
Comment 10•24 years ago
|
||
DOM Inspector gives the ordinal attributes as follows:
7 One
3 Two
5 Three
1 Four
9 Five
11 Siz
| Assignee | ||
Comment 11•24 years ago
|
||
good catch neil, thanks!
| Assignee | ||
Comment 12•24 years ago
|
||
I blame quick sort, since it is an unstable algorithm.
So when columns didn't get their ordinal attribute yet it might reshuffle
their order.
Status: NEW → ASSIGNED
| Assignee | ||
Comment 13•24 years ago
|
||
Yeah, we need some stable algorithm.
Comment 14•24 years ago
|
||
Which algorithm, exactly?
| Assignee | ||
Comment 15•24 years ago
|
||
I guess, the best of all stable ones :)
I tried bubble sort and it fixed this bug.
Now I'm trying heap sort.
Comment 16•24 years ago
|
||
Sorry, what I meant was were's the code that uses the quick sort? (I don't know
how I expected you to know what I meant!)
| Assignee | ||
Comment 17•24 years ago
|
||
nsContainerBox.cpp
| Assignee | ||
Comment 18•24 years ago
|
||
use selection sort instead of quick sort, sigh
| Assignee | ||
Comment 19•24 years ago
|
||
hewitt, could you r/sr= ?
Comment 20•24 years ago
|
||
Comment on attachment 67577 [details] [diff] [review]
fix
You need to remove the declaration of BoxOrderSortComparison as well.
| Assignee | ||
Comment 21•24 years ago
|
||
Attachment #67577 -
Attachment is obsolete: true
Comment 22•24 years ago
|
||
Comment on attachment 67640 [details] [diff] [review]
revised patch
sr=hewitt
Attachment #67640 -
Flags: superreview+
Comment 23•24 years ago
|
||
For our current uses of box ordinals, speed isn't going to be a problem here
because we are dealing with small numbers of elements. Having the sort be
stable is more important.
r=bryner.
| Assignee | ||
Comment 24•24 years ago
|
||
fixed
Status: ASSIGNED → RESOLVED
Closed: 24 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
•