Summary: | baselinePosition is wrong for new text field when empty | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Adele Peterson <adele> | ||||||||||||||
Component: | HTML Editing | Assignee: | Adele Peterson <adele> | ||||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||||
Severity: | Normal | CC: | bdakin, hyatt | ||||||||||||||
Priority: | P2 | ||||||||||||||||
Version: | 420+ | ||||||||||||||||
Hardware: | Mac | ||||||||||||||||
OS: | OS X 10.4 | ||||||||||||||||
Bug Depends on: | |||||||||||||||||
Bug Blocks: | 6986 | ||||||||||||||||
Attachments: |
|
Description
Adele Peterson
2006-02-17 17:17:26 PST
Created attachment 6582 [details]
test case
Created attachment 6633 [details]
test case for inline-block div
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. 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? 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. Created attachment 6646 [details]
test case with thick borders
Created attachment 6649 [details]
test case for first-line style
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?
Yeah, WinIE doesn't baselne-align form controls. Safari and Firefox do because it looks nicer. Created attachment 6652 [details]
new patch w/ changelog & tests
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
|