listheader in richlistbox appears to right/at bottom of richlistitems

VERIFIED FIXED in mozilla1.9beta1

Status

()

Toolkit
XUL Widgets
VERIFIED FIXED
10 years ago
8 years ago

People

(Reporter: myk, Assigned: Philip Chee)

Tracking

Trunk
mozilla1.9beta1
Points:
---
Dependency tree / graph
Bug Flags:
blocking1.9 +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(5 attachments, 1 obsolete attachment)

(Reporter)

Description

10 years ago
Created attachment 276173 [details]
test case that demonstrates the problem

In bug 376815, mano added support for using listheader in richlistboxes.  But when I try it, listheader appears to the right of the richlistitems in the richlistbox, not on top, as I would expect.

And orienting the richlistbox vertically also doesn't fix the problem.  It causes the listheader to appear at the bottom, not at the top.

Here's a testcase that demonstrates the problem.  Might this be fixed by bug 367843?
(Reporter)

Updated

10 years ago
Blocks: 377784

Updated

10 years ago
No longer blocks: 377784
Flags: blocking1.9?

Updated

10 years ago
Duplicate of this bug: 395180

Comment 2

10 years ago
Created attachment 280161 [details] [diff] [review]
Patch

Found the cause.
Assignee: nobody → ventnor.bugzilla
Status: NEW → ASSIGNED
Attachment #280161 - Flags: review?(mano)

Comment 3

10 years ago
(In reply to comment #2)
> Created an attachment (id=280161) [details]
> Patch
> 
> Found the cause.
 
I tried this patch.
It looks good.
Comment on attachment 280161 [details] [diff] [review]
Patch

r=mano
Attachment #280161 - Flags: review?(mano) → review+

Comment 5

10 years ago
Comment on attachment 280161 [details] [diff] [review]
Patch

Let's try for M8 approval. My reasoning is that this will at least prevent the inevitable bug reports from M8 users about this issue, and the fix is one line long.
Attachment #280161 - Flags: approval1.9?

Updated

10 years ago
Target Milestone: --- → mozilla1.9 M8

Comment 6

10 years ago
I found there were two more problems.
1. Scroll with column header. 
   Column header should stay the position.
2. The height of the last row is too narrow.

Should I open new bug?

Comment 7

10 years ago
Created attachment 280452 [details]
screenshot

with below tip in userChrome.css

#handlersView {
-moz-box-direction: reverse;
}

no problem with scroll, header stays at the top.
but last line is cut off.

Comment 8

10 years ago
Created attachment 280582 [details]
screenshot

another tip,

#handlersView > listheader {
-moz-box-ordinal-group: 1;
}
Comment on attachment 280161 [details] [diff] [review]
Patch

a=bzbarsky
Attachment #280161 - Flags: approval1.9? → approval1.9+

Updated

10 years ago
Keywords: checkin-needed
(Reporter)

Comment 10

10 years ago
Thanks for the patch!  I have checked it in.

Checking in toolkit/content/widgets/richlistbox.xml;
/cvsroot/mozilla/toolkit/content/widgets/richlistbox.xml,v  <--  richlistbox.xml
new revision: 1.44; previous revision: 1.43
done


(In reply to comment #6)
> I found there were two more problems.
> 1. Scroll with column header. 
>    Column header should stay the position.
> 2. The height of the last row is too narrow.
> 
> Should I open new bug?

Yes, please do open new bugs for these issues.
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Keywords: checkin-needed
OS: Linux → All
Hardware: PC → All
Resolution: --- → FIXED

Comment 11

10 years ago
Created attachment 281272 [details]
screen shot

> 2. The height of the last row is too narrow.

no problem with Win XP default theme.

Comment 12

10 years ago
(In reply to comment #11)
> Created an attachment (id=281272) [details]
> screen shot
> 
> > 2. The height of the last row is too narrow.
> 
> no problem with Win XP default theme.
 
Worksforme too with today's build.
Sorry I don't know why.

Anyway I opened bug 396545 for first problem.
Note: Some people are reporting that the headers are still appearing at the bottom of the list. Littlemutt has discovered that this happens if you have Console² extension installed. Just a headsup.
(Assignee)

Comment 14

10 years ago
I plan to update Console² in the next few days.
I don't think this patch really fixed this problem. Adding xul:listheader to the includes statement just makes it NOT match the listheaders (I don't think xbl bindings are that smart about namespaces... or anything really except nodeNames), so they're pushed into the box and Bug 396545 happens.

The reason they're being put at the bottom of the box is because the single listheader element being used here contains some treecols, which get displayed strangely because of the way the tree box model fits things.

An easier fix than that is to just make the richlistbox take a listhead element instead of a listheader element, and then put two listheaders inside of it. Doing so here seemed to make everything work and look fine (minus some theme problems), but I don't have the means to write a diff, and I'm not sure if the listheader/treecol decisions were made for some better reason.
(Reporter)

Comment 16

10 years ago
Sounds like this needs a better fix.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---

Updated

10 years ago
Attachment #280161 - Attachment is obsolete: true
In fact, the fix should be backed out.
(Assignee)

Comment 18

10 years ago
http://lxr.mozilla.org/seamonkey/source/toolkit/content/xul.css#445
listheader {
  -moz-binding: url("chrome://global/content/bindings/listbox.xml#listheader");
  -moz-box-ordinal-group: 2147483646;
}
This was introduced in Bug 178604 which is why the listheader appear at the bottom.
(Assignee)

Comment 19

10 years ago
Created attachment 281843 [details] [diff] [review]
Proposed patch

This patch fixes the test case in this bug and it doesn't cause the listheader in a richlistbox to scroll, but it might affect consumers of <richlistbox> that assume that the default orientation is horizontal.
(Assignee)

Comment 20

10 years ago
Comment on attachment 281843 [details] [diff] [review]
Proposed patch

> but it might affect consumers of <richlistbox> that
> assume that the default orientation is horizontal.

Actually prior to the listheader support, all children ended up in a vertical scrollbox anyway so I don't think that there are any usages that depend on a richlistbox being horizontally inclined.
Attachment #281843 - Flags: review?(mano)
(Assignee)

Comment 21

10 years ago
Um I forgot to mention that the first patch has to be backed out first.

Updated

10 years ago
Assignee: ventnor.bugzilla → philip.chee
Status: REOPENED → NEW

Updated

10 years ago
Blocks: 396545

Updated

10 years ago
Blocks: 377784
Flags: blocking1.9? → blocking1.9+
Comment on attachment 281843 [details] [diff] [review]
Proposed patch

r=mano, many thanks.
Attachment #281843 - Flags: review?(mano) → review+

Updated

10 years ago
Keywords: checkin-needed
Whiteboard: old patch needs to be backed out
Target Milestone: mozilla1.9 M8 → mozilla1.9 M9
Version: unspecified → Trunk
(Reporter)

Comment 23

10 years ago
Comment on attachment 281843 [details] [diff] [review]
Proposed patch

Requesting approval to revert the previous patch and check in this one.  This patch is the correct fix for the problem.  It's a polish fix for the Applications prefpane, and it shouldn't cause problems for other richlistboxes, as they too are vertically oriented, and none of them use listheaders.
Attachment #281843 - Flags: approval1.9?
This bug has been marked as blocking.
(Reporter)

Comment 25

10 years ago
Comment on attachment 281843 [details] [diff] [review]
Proposed patch

(In reply to comment #24)
> This bug has been marked as blocking.

Ah, indeed.  In that case canceling approval request.  I'll check this in.
Attachment #281843 - Flags: approval1.9?
(Reporter)

Comment 26

10 years ago
I have reverted the original patch:

Checking in toolkit/content/widgets/richlistbox.xml;
/cvsroot/mozilla/toolkit/content/widgets/richlistbox.xml,v  <--  richlistbox.xml
new revision: 1.45; previous revision: 1.44
done

I haven't yet checked in the new patch, however, because of the following message at the top of toolkit/content/xul.css:

   THIS FILE IS LOCKED DOWN.  YOU ARE NOT ALLOWED TO MODIFY IT WITHOUT FIRST 
   HAVING YOUR CHANGES REVIEWED BY mconnor@steelgryphon.com
Whiteboard: old patch needs to be backed out
(Reporter)

Updated

10 years ago
Attachment #281843 - Flags: review?(mconnor)

Updated

10 years ago
Keywords: checkin-needed

Updated

10 years ago
Duplicate of this bug: 399012
Comment on attachment 281843 [details] [diff] [review]
Proposed patch

mconnor gave this r+ over IRC. I'll land it now.
Attachment #281843 - Flags: review?(mconnor)
Checking in toolkit/content/xul.css;
/cvsroot/mozilla/toolkit/content/xul.css,v  <--  xul.css
new revision: 1.104; previous revision: 1.103
done
Status: NEW → RESOLVED
Last Resolved: 10 years ago10 years ago
Resolution: --- → FIXED

Comment 30

10 years ago
Verified fixed in Minefield/3.0a9pre ID:2007101214
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.