Changeset 85560 in webkit
- Timestamp:
- May 2, 2011 5:20:46 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r85556 r85560 1 2011-05-02 Joseph Pecoraro <joepeck@webkit.org> 2 3 Reviewed by David Kilzer. 4 5 Respect fixed text-indent on ::-webkit-input-placeholder 6 https://bugs.webkit.org/show_bug.cgi?id=59825 7 8 Placeholder text does not appear in the render tree 9 dumps, so this is a pixel test for the position of 10 the placeholder affected by text-indent. 11 12 * fast/forms/input-placeholder-text-indent.html: Added. 13 * platform/mac/fast/forms/input-placeholder-text-indent-expected.png: Added. 14 * platform/mac/fast/forms/input-placeholder-text-indent-expected.txt: Added. 15 1 16 2011-05-02 Eric Uhrhane <ericu@chromium.org> 2 17 -
trunk/Source/WebCore/ChangeLog
r85556 r85560 1 2011-05-02 Joseph Pecoraro <joepeck@webkit.org> 2 3 Reviewed by David Kilzer. 4 5 Respect fixed text-indent on ::-webkit-input-placeholder 6 https://bugs.webkit.org/show_bug.cgi?id=59825 7 8 Test: fast/forms/input-placeholder-text-indent.html 9 10 * rendering/RenderTextControl.cpp: 11 (WebCore::RenderTextControl::paintPlaceholder): indent by 12 a fixed text-indent size specified on the placeholder style. 13 1 14 2011-05-02 Eric Uhrhane <ericu@chromium.org> 2 15 -
trunk/Source/WebCore/rendering/RenderTextControl.cpp
r85143 r85560 643 643 IntPoint textPoint; 644 644 textPoint.setY(ty + textBlockInsetTop() + placeholderStyle->fontMetrics().ascent()); 645 int styleTextIndent = placeholderStyle->textIndent().isFixed() ? placeholderStyle->textIndent().calcMinValue(0) : 0; 645 646 if (placeholderStyle->isLeftToRightDirection()) 646 textPoint.setX(tx + textBlockInsetLeft());647 textPoint.setX(tx + styleTextIndent + textBlockInsetLeft()); 647 648 else 648 textPoint.setX(tx + width() - textBlockInsetRight() - style ()->font().width(textRun));649 textPoint.setX(tx + width() - textBlockInsetRight() - styleTextIndent - style()->font().width(textRun)); 649 650 650 651 paintInfo.context->drawBidiText(placeholderStyle->font(), textRun, textPoint);
Note: See TracChangeset
for help on using the changeset viewer.