Steps to reproduce: 1) Open www.google.com 2) Using Hangul input method, type something in the text field 3) Without closing the inline input session, press Return. Results: Assertion fails: ================= ASSERTION FAILED: value == constrainValue(value) || constrainValue(value).isEmpty() (/Users/ap/WebKit/WebCore/html/HTMLInputElement.cpp:1092 void WebCore::HTMLInputElement::setValueFromRenderer(const WebCore::String&)) ================= Please note that this is not just a debug assertion - in release build, pressing return now inserts a carriage return, instead of starting a search.
I have a feeling the fix for bug 9630 will take care of this...
Yes, I think the fix I have in the works will fix this.
Actually, I'm not so sure. This is about inline input.
I don't see the assertion with the Kotoeri input method, for example, but I do see it with Hangul.
radar 4822935
This problem has started with r15429: <rdar://problem/4614054> REGRESSION: Safari submits forms when the Return key is hit to complete inline inputs. WebCore tries to second-guess the input method, which may or may not let the keypress propagate. This particular heuristic happens to match Kotoeri, but not other IMs, so form submission is performed too late, when two(!) linefeeds are already appended to the value. Potentially, similar problems can affect any keys that are custom processed by WebCore, not just Enter. For IMs to do their work properly, events first need to be filtered through -[NSResponder interpretKeyEvents:], with the real work being done from NSTextInput callbacks, rather than from keyUp/keyDown. Of course, this can cause lots of issues with HTML events (e.g. whether onkeydown/onkeypress handlers should be called, or whether they can cancel the event).
As bug 9630 which mitz mentioned is fixed, could someone test this one?
This bug is still present.
I don't see an assertion any more, but submission does still fail with Hangul.
Got a fix.
Created attachment 13122 [details] patch that fixes this and two other P1 international input regressions
Comment on attachment 13122 [details] patch that fixes this and two other P1 international input regressions r=me, if you can explain why m_mouseDownEvent is now an NSEvent... Ideally keeping more as PlatformMouseEvent is better... though i can't recall why m_mouseDownEvent is mac only
(In reply to comment #12) > r=me, if you can explain why m_mouseDownEvent is now an NSEvent... Ideally > keeping more as PlatformMouseEvent is better... though i can't recall why > m_mouseDownEvent is mac only I think I'll change m_mouseDown back before landing.
Committed revision 19579.