WebCore:
authorojan@chromium.org <ojan@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Jul 2009 20:37:16 +0000 (20:37 +0000)
committerojan@chromium.org <ojan@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Jul 2009 20:37:16 +0000 (20:37 +0000)
commitbec5da9e8bcd90c281557b2bee6e9c6ad0cf49cb
tree757ca852fe748394100c530f0b395d9fa61bcb88
parentc68ed9a7d962f37ea24d3c5e8c7357a9036ff63b
WebCore:

2009-07-06  Ojan Vafai  <ojan@chromium.org>

        Reviewed by Eric Seidel.

        Fix crash when indenting in an empty table cell.
        https://bugs.webkit.org/show_bug.cgi?id=26872

        The crash is that we would call splitTreeToNode where the node
        and the nodeToSplitTo were the same node.

        Test: editing/execCommand/indent-empty-table-cell.html

        * editing/CompositeEditCommand.cpp:
        (WebCore::CompositeEditCommand::splitTreeToNode):
        Added an assert in that node and nodeToSplitTo
        are different nodes to make this assumption explicit.

        * editing/IndentOutdentCommand.cpp:
        (WebCore::IndentOutdentCommand::isAtUnsplittableElement):
        (WebCore::IndentOutdentCommand::indentRegion):
        * editing/IndentOutdentCommand.h:

LayoutTests:

2009-07-06  Ojan Vafai  <ojan@chromium.org>

        Reviewed by Eric Seidel.

        Fix crash when indenting in an empty table cell.
        https://bugs.webkit.org/show_bug.cgi?id=26872

        The crash is that we would call splitTreeToNode where the node
        and the nodeToSplitTo were the same node.

        * editing/execCommand/indent-empty-table-cell-expected.txt: Added.
        * editing/execCommand/indent-empty-table-cell.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@45561 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/editing/execCommand/indent-empty-table-cell-expected.txt [new file with mode: 0644]
LayoutTests/editing/execCommand/indent-empty-table-cell.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/editing/CompositeEditCommand.cpp
WebCore/editing/IndentOutdentCommand.cpp
WebCore/editing/IndentOutdentCommand.h