2011-06-22 Annie Sullivan <sullivan@chromium.org>
authorcommit-queue <commit-queue@webkit.org>
Wed, 22 Jun 2011 23:18:57 +0000 (23:18 +0000)
committerAdemar de Souza Reis Jr <ademar.reis@openbossa.org>
Mon, 27 Jun 2011 17:00:22 +0000 (14:00 -0300)
commit9734ffa2730a835b5c2fd57341629a3ce217a4f7
tree1cae34745c0cc26e84e83da3a37c8af245d65f88
parent92bc2bc795934416694d54eb957b8b5a969d751d
2011-06-22  Annie Sullivan  <sullivan@chromium.org>

        Reviewed by Ryosuke Niwa.

        REGRESSION: Hitting enter in the middle of this span causes the cursor to go to the end of the span
        https://bugs.webkit.org/show_bug.cgi?id=61594

        Adds two layout tests to verify that hitting enter in the middle of the span splits the span correctly
        and places the cursor in the correct position.

        * editing/inserting/return-key-before-br-in-span-expected.txt: Added.
        * editing/inserting/return-key-before-br-in-span.html: Added.
        * editing/inserting/return-key-middle-of-span-expected.txt: Added.
        * editing/inserting/return-key-middle-of-span.html: Added.
2011-06-22  Annie Sullivan  <sullivan@chromium.org>

        Reviewed by Ryosuke Niwa.

        REGRESSION: Hitting enter in the middle of this span causes the cursor to go to the end of the span
        https://bugs.webkit.org/show_bug.cgi?id=61594

        When the tree is split at the cursor in InsertParagraphSeparatorCommand, it is possible for the position
        split at to be at the end of a text node. The code assumes the position is at the start of the node, so
        pass the correct node into splitTreeToNode() in that case.

        Tests: editing/inserting/return-key-before-br-in-span.html
               editing/inserting/return-key-middle-of-span.html

        * editing/InsertParagraphSeparatorCommand.cpp:
        (WebCore::InsertParagraphSeparatorCommand::doApply):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@89492 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/editing/inserting/return-key-before-br-in-span-expected.txt [new file with mode: 0644]
LayoutTests/editing/inserting/return-key-before-br-in-span.html [new file with mode: 0644]
LayoutTests/editing/inserting/return-key-middle-of-span-expected.txt [new file with mode: 0644]
LayoutTests/editing/inserting/return-key-middle-of-span.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/editing/InsertParagraphSeparatorCommand.cpp