LayoutTests:
authordarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 15 Jul 2006 15:21:28 +0000 (15:21 +0000)
committerdarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 15 Jul 2006 15:21:28 +0000 (15:21 +0000)
commit29a3d0825bae768749bca777606d0d244c7c2239
treecdfd794f6a60d5a213dc750d2fbcf113713b8dce
parent462d182752ad235a03610b91802989fec6b21119
LayoutTests:

        Reviewed by Adele.

        - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=8871
          <rdar://problem/4575417>
          REGRESSION: Pressing Enter/Return in a text input removes the selected text
          and http://bugzilla.opendarwin.org/show_bug.cgi?id=9743
          <rdar://problem/4614228>
          REGRESSION: crash dispatching JavaScript-created keyboard event to input element

        * fast/forms/input-text-enter-expected.txt: Added.
        * fast/forms/input-text-enter.html: Added.

WebCore:

        Reviewed by Adele.

        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8871
          <rdar://problem/4575417>
          REGRESSION: Pressing Enter/Return in a text input removes the selected text

        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9743
          <rdar://problem/4614228>
          REGRESSION: crash dispatching JavaScript-created keyboard event to input element

        * bridge/mac/FrameMac.mm: (WebCore::FrameMac::doTextFieldCommandFromEvent):
        Add a null check to fix the crash, and a FIXME explaining why this is not necessarily
        enough for the future.

        * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::defaultEventHandler):
        Consume Enter key keypress events even if the element is not in a form.

        * platform/mac/KeyEventMac.mm: (WebCore::keyIdentifierForKeyEvent): Added \n to the
        characters that turn into "Enter". Actual keyboard events always are \r or \003 on
        the Macintosh, but in layout tests we can use \n, and everything other than the
        code path here works, so worth fixing.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15454 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/forms/input-text-enter-expected.txt [new file with mode: 0644]
LayoutTests/fast/forms/input-text-enter.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/bridge/mac/FrameMac.mm
WebCore/html/HTMLInputElement.cpp
WebCore/platform/mac/KeyEventMac.mm