[Webkit-unassigned] [Bug 82688] Caret is not rendered properly inside an input element with text-indent

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 16 16:09:01 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=82688





--- Comment #9 from yi shen <yi.4.shen at nokia.com>  2012-04-16 16:09:01 PST ---
Sorry for the confusion. WebKit does provide the right caret position for the input element When it has text content -- so, at the moment when the first character entered, I checked the insertion position calculated in RenderText::localCaretRect and found it never beyond right edge. 

In other words, if we don't check the x value, you will see the caret 'jumps' after inserting first character in following case, "<input id='textIndentTest' type='text' style='text-indent:30px;text-align:right'>".

(In reply to comment #8)
> (From update of attachment 137347 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=137347&action=review
> 
> >>> Source/WebCore/rendering/RenderBlock.cpp:6495
> >>> +    x = min(x, w - (borderRight() + paddingRight()) - caretWidth);
> >> 
> >> This is needed to prevent x from being beyond the edge? Why isn't this needed for the left side as well?
> >> 
> >> Also, why not w - borderRight() - paddingRight() - caretWidth? Same with above. Seems less confusing.
> > 
> > I checked firefox & safari and found both webkit & firefox prevent x from being beyond the right edge only.
> 
> I'm confused what you mean about WebKit, since this appears to be adding this specifically for WebKit now :p

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list