[webkit-reviews] review granted: [Bug 82688] Caret is not rendered properly inside an input element with text-indent : [Attachment 137597] updated patch based on Levi's review
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Apr 17 13:50:53 PDT 2012
Ryosuke Niwa <rniwa at webkit.org> has granted yi shen <yi.4.shen at nokia.com>'s
request for review:
Bug 82688: Caret is not rendered properly inside an input element with
text-indent
https://bugs.webkit.org/show_bug.cgi?id=82688
Attachment 137597: updated patch based on Levi's review
https://bugs.webkit.org/attachment.cgi?id=137597&action=review
------- Additional Comments from Ryosuke Niwa <rniwa at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=137597&action=review
> Source/WebCore/rendering/RenderBlock.cpp:6501
> switch (alignment) {
> case alignLeft:
> + if (currentStyle->isLeftToRightDirection())
> + x += textIndentOffset();
> break;
> case alignCenter:
> x = (x + w - (borderRight() + paddingRight())) / 2;
> + if (currentStyle->isLeftToRightDirection())
> + x += textIndentOffset() / 2;
> + else
> + x -= textIndentOffset() / 2;
> break;
> case alignRight:
> x = w - (borderRight() + paddingRight()) - caretWidth;
> + if (!currentStyle->isLeftToRightDirection())
> + x -= textIndentOffset();
> break;
> }
> + x = min(x, w - borderRight() - paddingRight() - caretWidth);
We need to fix this code for vertical writing mode but that's probably a
separate bug.
More information about the webkit-reviews
mailing list