Summary: | Respect fixed text-indent on ::-webkit-input-placeholder | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Joseph Pecoraro <joepeck> | ||||||||||||
Component: | Forms | Assignee: | Nobody <webkit-unassigned> | ||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||
Severity: | Normal | CC: | ddkilzer, joepeck, mitz | ||||||||||||
Priority: | P2 | ||||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||||
Hardware: | PC | ||||||||||||||
OS: | OS X 10.5 | ||||||||||||||
Attachments: |
|
Description
Joseph Pecoraro
2011-04-29 13:45:45 PDT
Created attachment 91726 [details]
[PATCH] Handle fixed text-indent for placeholders
I haven't tested the tolerance level of the png. I may need to make the
inputs larger, or add more (for instance test <input type="search">
as well).
This doesn't handle percentages, because I think while we are already
doing limited styling it seems like unnecessary work. But I can attempt
that if desired.
Created attachment 91731 [details]
[PATCH] Handle fixed text-indent for placeholders
Increasing the font-size causes the diff to be 0.65% which
is over the default tolerance. Image diff to follow.
Created attachment 91732 [details]
[IMAGE-DIFF] For the pixel test
Comment on attachment 91731 [details] [PATCH] Handle fixed text-indent for placeholders View in context: https://bugs.webkit.org/attachment.cgi?id=91731&action=review > Source/WebCore/rendering/RenderTextControl.cpp:649 > + textPoint.setX(tx + width() - textBlockInsetRight() - styleTextIdent - style()->font().width(textRun)); Shouldn't you test the RTL code in the layout test too? > Shouldn't you test the RTL code in the layout test too?
Doh, I should. I totally meant to and forgot. Thanks
for pointing it out. I'll be making another patch.
Created attachment 91793 [details]
[PATCH] Handle fixed text-indent for placeholders (tests rtl)
Add in some tests for rtl. Lowered the test to 30px font size
so it would all fit in the image. Diff was 0.76%.
Created attachment 91794 [details]
[IMAGE-DIFF] For the pixel test
Comment on attachment 91793 [details] [PATCH] Handle fixed text-indent for placeholders (tests rtl) View in context: https://bugs.webkit.org/attachment.cgi?id=91793&action=review r=me with the typo fixed. > Source/WebCore/rendering/RenderTextControl.cpp:645 > + int styleTextIdent = placeholderStyle->textIndent().isFixed() ? placeholderStyle->textIndent().calcMinValue(0) : 0; Typo? "Ident" -> "Indent" > > Source/WebCore/rendering/RenderTextControl.cpp:645
> > + int styleTextIdent = placeholderStyle->textIndent().isFixed() ? placeholderStyle->textIndent().calcMinValue(0) : 0;
>
> Typo? "Ident" -> "Indent"
Good catch. Fixed.
Landed in r85560: http://trac.webkit.org/changeset/85560 Windows will need expected results update (since it falls back to mac). I will update them once I can pull results from the bots. |