RESOLVED INVALID 5160
REGRESSION: text inside inline-block DIV changes the DIV's baseline for vertical-align:baseline
https://bugs.webkit.org/show_bug.cgi?id=5160
Summary REGRESSION: text inside inline-block DIV changes the DIV's baseline for verti...
mitz
Reported 2005-09-27 22:26:19 PDT
Summary: When vertical-align:baseline is used, a DIV with display:inline-block containing text behaves like it has a baseline, which is the baseline of one of its contained inline boxes. It should behave like the DIV's bottom is its baseline. To reproduce: open the testcase. Expected: The red shapes to be identical to the green shape. Actual: In the second case, the first lines of contained text are aligned with each other and with the bottom of the DIVs not containing text. In the third case, the last lines of contained text are aligned with each other and with the bottom of the DIVs not containing text.
Attachments
testcase (1.87 KB, text/html)
2005-09-27 22:26 PDT, mitz
darin: review-
mitz
Comment 1 2005-09-27 22:26:58 PDT
Created attachment 4075 [details] testcase
mitz
Comment 2 2005-09-27 23:04:19 PDT
This is a regression from the last released version.
Dave Hyatt
Comment 3 2005-09-28 11:17:30 PDT
See: http://www.w3.org/TR/CSS21/visudet.html Scroll to the very bottom of that document: "A UA should use the baseline of the last line box in the normal flow in the element as the baseline of an 'inline-block', or the element's bottom margin edge, if there is none." I made this change deliberately to be compliant with this part of the spec (despite the spec being pathetically ambiguous and not addressing what to do if the inline block has overflow or the line is outside its bounds, etc.).
mitz
Comment 4 2005-09-28 11:33:16 PDT
Heh, I spent an hour staring at the part of the spec just above the last 2 paragraphs, wondering if this was a deliberate change or a regression, before opening this bug. I'm not sure why you didn't close it (perhaps because in the middle case it uses the first line rather than the last?).
Dave Hyatt
Comment 5 2005-09-28 14:07:04 PDT
I didn't close it because it's kind of an issue. For example, several Dashboard widgets have been broken by this change, despite being in strict mode. We're going to have to figure something out. Note this change was necessary for the new button controls, which are inline blocks that need to properly support baseline alignment.
Eric Seidel (no email)
Comment 6 2005-12-28 01:44:58 PST
Comment on attachment 4075 [details] testcase I'm marking this test case for review. The bug seems to be already fixed. This test case might still be useful however.
Joost de Valk (AlthA)
Comment 7 2005-12-28 07:11:24 PST
The bug is definitly not fixed for me...
Darin Adler
Comment 8 2005-12-28 10:38:15 PST
Comment on attachment 4075 [details] testcase It's fine to land this test case, but marking it as review+ is going to misleadingly put this bug into the "needs commit" query.
Maciej Stachowiak
Comment 9 2005-12-30 00:25:31 PST
The test case doesn't look the way it is describes itself in TOT. While landing a test that documents our inline block behavior seems good, we should probably have one that describes our current result as the correct one, if we think it is correct.
Alice Liu
Comment 10 2006-01-10 10:35:32 PST
Darin Adler
Comment 11 2006-01-13 08:55:00 PST
Comment on attachment 4075 [details] testcase Given Maciej's comments, I'm setting the patch to review-. We can land a test for this if we revise it to no longer be misleading.
Joost de Valk (AlthA)
Comment 12 2006-01-22 04:35:22 PST
Adding Regression keyword.
Dave Hyatt
Comment 13 2006-12-14 22:45:04 PST
We're keeping this new behavior.
Darin Adler
Comment 14 2006-12-15 11:25:36 PST
Changing resolution from FIXED to more appropriate one.
Note You need to log in before you can comment on or make changes to this bug.