RESOLVED FIXED 7330
baselinePosition is wrong for new text field when empty
https://bugs.webkit.org/show_bug.cgi?id=7330
Summary baselinePosition is wrong for new text field when empty
Adele Peterson
Reported 2006-02-17 17:17:26 PST
baselinePosition is wrong for new text field when empty
Attachments
test case (136 bytes, text/html)
2006-02-17 17:18 PST, Adele Peterson
no flags
test case for inline-block div (148 bytes, text/html)
2006-02-20 19:02 PST, Adele Peterson
no flags
test case with thick borders (152 bytes, text/html)
2006-02-21 11:32 PST, Adele Peterson
no flags
test case for first-line style (199 bytes, text/html)
2006-02-21 13:31 PST, Adele Peterson
no flags
patch (712 bytes, patch)
2006-02-21 14:24 PST, Adele Peterson
no flags
new patch w/ changelog & tests (9.41 KB, patch)
2006-02-21 15:12 PST, Adele Peterson
hyatt: review+
Adele Peterson
Comment 1 2006-02-17 17:18:39 PST
Created attachment 6582 [details] test case
Adele Peterson
Comment 2 2006-02-20 19:02:38 PST
Created attachment 6633 [details] test case for inline-block div
Adele Peterson
Comment 3 2006-02-20 19:27:58 PST
the problem appears to be that the inner div is looking for the baseline of the lastLineBox in getBaselineOfLastLineBox, but there isn't a lastLineBox.
Adele Peterson
Comment 4 2006-02-20 19:58:12 PST
In RenderBlock::layoutInlineChildren, we increase the height to make room for the caret. At the same time, maybe we should set a flag for this weird case? Or can we actually give it a real last line box?
Dave Hyatt
Comment 5 2006-02-21 01:52:44 PST
We only expand editable divs with no children at all, so you can just use the same check that was originally used to decide to expand in the first place.
Adele Peterson
Comment 6 2006-02-21 11:32:14 PST
Created attachment 6646 [details] test case with thick borders
Adele Peterson
Comment 7 2006-02-21 13:31:39 PST
Created attachment 6649 [details] test case for first-line style
Adele Peterson
Comment 8 2006-02-21 14:24:00 PST
Created attachment 6651 [details] patch This patch matches the empty behavior to the non-empty behavior....but when I looked at WinIE, it looks like the baseline is at the bottom. Beth mentioned that she thought we might have done our baselines differently on purpose... Hyatt, can you comment?
Dave Hyatt
Comment 9 2006-02-21 14:44:44 PST
Yeah, WinIE doesn't baselne-align form controls. Safari and Firefox do because it looks nicer.
Adele Peterson
Comment 10 2006-02-21 15:12:52 PST
Created attachment 6652 [details] new patch w/ changelog & tests
Dave Hyatt
Comment 11 2006-02-21 15:16:15 PST
Comment on attachment 6652 [details] new patch w/ changelog & tests (1) Can remove the elses in the chain of ifs, since they're all just returning anyway. (2) Need to add in paddingTop() as well as borderTop(). (3) Add a testcase that tests padding-top. r=me
Note You need to log in before you can comment on or make changes to this bug.