WebCore:
authorjustin.garcia@apple.com <justin.garcia@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 May 2008 18:59:37 +0000 (18:59 +0000)
committerjustin.garcia@apple.com <justin.garcia@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 May 2008 18:59:37 +0000 (18:59 +0000)
commit72ac9e3b932a003a2289329556fa9b86bbeeeab2
treee13ba07b4e16eae4df13137d94188f25cd0a036d
parentf4ff49d93fdef5c9b323586b3bad72c9dfcebcb8
WebCore:

2008-05-07  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by John Sullivan.

        <rdar://problem/5666354> Crashes in Mail at WebCore::RemoveNodeCommand::doApply

        When a single tab or series of tabs was copied, we weren't putting them into a
        tab span.  On Paste, we would be given a text node with a single tab or series
        of tabs in it, and we would crash when inserting it at the start of a block
        (where that kind of text becomes completely unrendered).

        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds): Clean
        up correctly and early return if we removed everything that was inserted.
        * editing/markup.cpp:
        (WebCore::createMarkup):  Include the tab span when the only thing copied
        was a tab or a series of tabs.

LayoutTests:

2008-05-07  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by John Sullivan.

        <rdar://problem/5666354> Crashes in Mail at WebCore::RemoveNodeCommand::doApply

        * editing/pasteboard/5761530-1-expected.txt: Added.
        * editing/pasteboard/5761530-1.html: Added.
        * editing/pasteboard/5761530-2-expected.txt: Added.
        * editing/pasteboard/5761530-2.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@32963 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/editing/pasteboard/5761530-1-expected.txt [new file with mode: 0644]
LayoutTests/editing/pasteboard/5761530-1.html [new file with mode: 0644]
LayoutTests/editing/pasteboard/5761530-2-expected.txt [new file with mode: 0644]
LayoutTests/editing/pasteboard/5761530-2.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/editing/ReplaceSelectionCommand.cpp
WebCore/editing/markup.cpp