|Summary:||baselinePosition is wrong for new text field when empty|
|Product:||WebKit||Reporter:||Adele Peterson <adele>|
|Component:||HTML Editing||Assignee:||Adele Peterson <adele>|
|OS:||OS X 10.4|
|Bug Depends on:|
Description Adele Peterson 2006-02-17 17:17:26 PST
baselinePosition is wrong for new text field when empty
Comment 2 Adele Peterson 2006-02-20 19:02:38 PST
Created attachment 6633 [details] test case for inline-block div
Comment 3 Adele Peterson 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.
Comment 4 Adele Peterson 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?
Comment 5 Dave Hyatt 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.
Comment 6 Adele Peterson 2006-02-21 11:32:14 PST
Created attachment 6646 [details] test case with thick borders
Comment 7 Adele Peterson 2006-02-21 13:31:39 PST
Created attachment 6649 [details] test case for first-line style
Comment 8 Adele Peterson 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?
Comment 9 Dave Hyatt 2006-02-21 14:44:44 PST
Yeah, WinIE doesn't baselne-align form controls. Safari and Firefox do because it looks nicer.
Comment 10 Adele Peterson 2006-02-21 15:12:52 PST
Created attachment 6652 [details] new patch w/ changelog & tests
Comment 11 Dave Hyatt 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