Reviewed by John.
authorharrison <harrison@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 May 2005 20:30:12 +0000 (20:30 +0000)
committerharrison <harrison@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 May 2005 20:30:12 +0000 (20:30 +0000)
commit9e7309f40cd72c5790cc7808eee13e8745ebf8d3
tree685c3f8e4f56c5f139b7eeb4e2d40b3767ecf1c5
parent39ffc1bbf3b8b7a5858cc9b10100128d8594587d
    Reviewed by John.

        <rdar://problem/4120518> Mail: control-T in an empty message crashes mail

        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge rangeOfCharactersAroundCaret]):
        Nil-check result of VisiblePosition previous() and next().

        * khtml/editing/visible_position.cpp:
        (khtml::VisiblePosition::previous):
        (khtml::VisiblePosition::previousVisiblePosition):
        Make sure previous() does not return the original position.  Also, simplified.
        Commented odd, but required, behavior in previousVisiblePosition().

        * khtml/editing/visible_units.cpp:
        (khtml::startOfEditableContent):
        (khtml::endOfEditableContent):
        Removed redundant check for isEditableContent().

        * khtml/editing/jsediting.cpp:
        * khtml/khtml_part.cpp:
        (KHTMLPart::transpose):
        * khtml/khtml_part.h:
        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::issueTransposeCommand):
        * layout-tests/editing/editing.js:
        * kwq/WebCoreBridge.h:
        Add support for transpose command in JavaScript and therefore layout tests.

        * layout-tests/editing/deleting/transpose-empty-expected.txt: Added.
        * layout-tests/editing/deleting/transpose-empty.html: Added.
        New test for this bug.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@9217 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
LayoutTests/editing/deleting/transpose-empty-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/transpose-empty.html [new file with mode: 0644]
LayoutTests/editing/editing.js
WebCore/ChangeLog-2005-08-23
WebCore/khtml/editing/jsediting.cpp
WebCore/khtml/editing/visible_position.cpp
WebCore/khtml/editing/visible_units.cpp
WebCore/khtml/khtml_part.cpp
WebCore/kwq/KWQKHTMLPart.h
WebCore/kwq/KWQKHTMLPart.mm
WebCore/kwq/WebCoreBridge.h
WebCore/kwq/WebCoreBridge.mm