Summary: | REGRESSION: Caret position is off in native text field with text-align:right | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | mitz | ||||
Component: | Forms | Assignee: | Darin Adler <darin> | ||||
Status: | VERIFIED FIXED | ||||||
Severity: | Normal | Keywords: | Regression | ||||
Priority: | P1 | ||||||
Version: | 420+ | ||||||
Hardware: | Mac | ||||||
OS: | OS X 10.4 | ||||||
URL: | data:text/html,<input%20style="text-align:%20right;"> | ||||||
Attachments: |
|
Description
mitz
2006-03-30 12:52:39 PST
Looking at the behavior it seems that it's correct when there is text. I looked at it side by side with an LTR field and it seems to be fine. So I'll try to fix the bug about where it is without the text. I assume the relevant function is RenderBox::caretRect. No, turns out it's RenderFlow::caretRect. The code wasn't taking into account the width of the caret itself. But once I added code to do that, we end up with what Mitz called the right result, which unfortunately is one pixel to the right of what we get once we start typing. Working on it. 1px was the width of the caret, 1px was the padding. Created attachment 7449 [details]
patch with detailed change log
Comment on attachment 7449 [details]
patch with detailed change log
r=me
|