Closed Bug 483565 Opened 16 years ago Closed 16 years ago

baseline of stack elements depend on bottom margins of children

Categories

(Core :: XUL, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.2a1

People

(Reporter: karlt, Assigned: karlt)

Details

Attachments

(2 files)

Attached file testcase
See the attached test case with 3 <stack>s inside a <hbox align="baseline">. Expected results: all "hij" labels to align vertically. Actual results: <stack>s with children with different bottom margins do not align.
Attached patch patchSplinter Review
Attachment #367549 - Flags: review?(dbaron)
Comment on attachment 367549 [details] [diff] [review] patch Makes sense, although the code to take the largest of the children doesn't, so r+sr=dbaron, although you might want to run this by enndeakin as well.
Attachment #367549 - Flags: superreview+
Attachment #367549 - Flags: review?(dbaron)
Attachment #367549 - Flags: review+
Isn't the code to take the largest of the kids needed to prevent the stack shifting vertically when the kids are switched?
I asked dbaron about comment 2; from irc just now: ----- <dbaron> jag, I don't think ascent makes sense for a deck/stack unless the things in it are baseline-aligned with each other... <jag> dbaron: which more often than not they're not. * jag is thinking of wizards and pref panes <dbaron> jag, although if you take the table-row precedent, it could make sense as long as *some* item in the stack is baseline-aligned <dbaron> jag, I'd sort of think that if nothing in the stack were baseline-aligned, it would just be the top <dbaron> then again, the ascent would sometimes be based on box-align and sometimes based on box-pack, no? <dbaron> depending on whether it's a horizontal or vertical box? ----- Something worth looking at in a new bug? The patch as-is seems to make things better, so I'd say let's take it.
Pushed with a slightly different testcase, where the stacks also have align="baseline". http://hg.mozilla.org/mozilla-central/rev/08e7a9e04e5b http://hg.mozilla.org/mozilla-central/rev/71454f3ed07b
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2a1
Filed Bug 531989 for hboxes with align != baseline.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: