[webkit-reviews] review granted: [Bug 81660] line break inserted into input field : [Attachment 134764] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Mar 30 11:05:09 PDT 2012
Ryosuke Niwa <rniwa at webkit.org> has granted jochen at chromium.org's request for
review:
Bug 81660: line break inserted into input field
https://bugs.webkit.org/show_bug.cgi?id=81660
Attachment 134764: Patch
https://bugs.webkit.org/attachment.cgi?id=134764&action=review
------- Additional Comments from Ryosuke Niwa <rniwa at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=134764&action=review
> Source/WebCore/editing/TypingCommand.cpp:60
> RefPtr<BeforeTextInsertedEvent> event =
BeforeTextInsertedEvent::create(String("\n"));
> ExceptionCode ec = 0;
> node->dispatchEvent(event, ec);
> - return event->text().length();
> + return event->text() == "\n";
Please allocate "\n" once (e.g. local variable lineFeed) and share it.
> LayoutTests/fast/forms/textfield-no-linebreak-expected.html:6
> +<input id="tf" type="text"></input>
Why don't you just add autofocus?
More information about the webkit-reviews
mailing list