Open Bug 531989 Opened 15 years ago Updated 2 years ago

hbox baselines with align != baseline

Categories

(Core :: XUL, defect)

x86
All
defect

Tracking

()

People

(Reporter: karlt, Unassigned)

Details

Attachments

(1 file)

1.02 KB, application/vnd.mozilla.xul+xml
Details
Attached file testcase
Currently the baseline of an hbox (calculated in nsSprocketLayout::GetAscent()) is the top of the client rect plus the greatest child offset from its top to its baseline.

This works well for align="baseline" (and perhaps "start" and maybe
"stretch"), but is quite meaningless for "center" and "end" when the
client-height of the hbox is not the height of the children.

I'm not clear on what the "right" behavior would be for "center" and "end".

Some options are:

1) Lowest child baseline (with consideration of child placement)
2) First child baseline (with consideration of child placement)
3) Bottom of the hbox

Perhaps 1 or 2 make some sense when there is only a single child.  It also
might be reasonable to expect that the baseline of the hbox does not depend on
the align attribute when the align attribute has no affect on child positions.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: