The spec says that newlines should be stripped, not replaced with spaces. <rdar://problem/9553273>
HTML5 parser relies on value sanitization for correct behavior in this case: <input type="text" placeholder="foo" value=" "> In Safari 5, the placeholder is displayed, and that's correct per HTML5. But it doesn't work in ToT - and besides, the linefeed appears as whitespace in initial value, which users are unlikely to notice when typing.
Created attachment 95998 [details] proposed fix
Comment on attachment 95998 [details] proposed fix View in context: https://bugs.webkit.org/attachment.cgi?id=95998&action=review > Source/WebCore/html/TextFieldInputType.cpp:189 > +static bool asciiLineBreakCharacters(UChar c) The name should be something more like: isASCIILineBreak
I didn't really expect that would you fly, but I liked how removeCharacters(asciiLineBreakCharacters) looked. Thanks for the review!
Created attachment 96006 [details] patch for landing
_ that_it_would_fly_ :-/
Comment on attachment 96006 [details] patch for landing Clearing flags on attachment: 96006 Committed r88110: <http://trac.webkit.org/changeset/88110>
All reviewed patches have been landed. Closing bug.