Changeset 114461 in webkit
- Timestamp:
- Apr 17, 2012, 4:10:21 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r114449 r114461 1 2012-04-17 Yi Shen <yi.4.shen@nokia.com> 2 3 Caret is not rendered properly inside an input element with text-indent 4 https://bugs.webkit.org/show_bug.cgi?id=82688 5 6 Reviewed by Ryosuke Niwa. 7 8 For an empty input element, there is no RenderText. Instead, RenderBlock::localCaretRect provides 9 the caret position for rendering the caret in the empty input element. To get correct caret rect, 10 textIndentOffset() should be used to adjust the caret's position. 11 12 * editing/style/text-indent-expected.txt: Added. 13 * editing/style/text-indent.html: Added. 14 1 15 2012-04-17 Vincent Scheib <scheib@chromium.org> 2 16 -
trunk/Source/WebCore/ChangeLog
r114457 r114461 1 2012-04-17 Yi Shen <yi.4.shen@nokia.com> 2 3 Caret is not rendered properly inside an input element with text-indent 4 https://bugs.webkit.org/show_bug.cgi?id=82688 5 6 Reviewed by Ryosuke Niwa. 7 8 For an empty input element, there is no RenderText. Instead, RenderBlock::localCaretRect provides 9 the caret position for rendering the caret in the empty input element. To get correct caret rect, 10 textIndentOffset() should be used to adjust the caret's position. 11 12 Test: editing/style/text-indent.html 13 14 * rendering/RenderBlock.cpp: 15 (WebCore::RenderBlock::localCaretRect): 16 1 17 2012-04-17 Filip Pizlo <fpizlo@apple.com> 2 18 -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r114315 r114461 6483 6483 switch (alignment) { 6484 6484 case alignLeft: 6485 if (currentStyle->isLeftToRightDirection()) 6486 x += textIndentOffset(); 6485 6487 break; 6486 6488 case alignCenter: 6487 6489 x = (x + w - (borderRight() + paddingRight())) / 2; 6490 if (currentStyle->isLeftToRightDirection()) 6491 x += textIndentOffset() / 2; 6492 else 6493 x -= textIndentOffset() / 2; 6488 6494 break; 6489 6495 case alignRight: 6490 6496 x = w - (borderRight() + paddingRight()) - caretWidth; 6497 if (!currentStyle->isLeftToRightDirection()) 6498 x -= textIndentOffset(); 6491 6499 break; 6492 6500 } 6501 x = min(x, w - borderRight() - paddingRight() - caretWidth); 6493 6502 6494 6503 if (extraWidthToEndOfLine) {
Note:
See TracChangeset
for help on using the changeset viewer.