WebCore:
authorbfulgham@webkit.org <bfulgham@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 28 Jun 2009 03:13:52 +0000 (03:13 +0000)
committerbfulgham@webkit.org <bfulgham@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 28 Jun 2009 03:13:52 +0000 (03:13 +0000)
commit48e16a80eee2aeb89052d66421ae5792c0a30233
tree7fd6abd7c9e2a69e7e1d051c99330b671f0d6001
parent4080ec96aa2744200f42d796bb5ff7bf7c5781dd
WebCore:

2009-06-27  Ryosuke Niwa  <rniwa@google.com>

        Reviewed by Eric Seidel.

        https://bugs.webkit.org/show_bug.cgi?id=26762

        Clean up for IndentOutdentCommand::indentRegion, and solved most of problems related to the bug 21712.
        https://bugs.webkit.org/show_bug.cgi?id=21712

        Added few utility functions to htmlediting.h/cpp

        isVisibilyAdjacent checks whether the first position is visibly next to the second position.
        i.e. there is no visible node between the first and second positions

        canMergeLists checks whether two lists can be merged.
        It checks the type of list, the editing boundary, and adjacency of the lists.

        Tests: editing/execCommand/indent-nested-lists-1.html
               editing/execCommand/indent-nested-lists-2.html
               editing/execCommand/indent-nested-lists-3.html
               editing/execCommand/indent-nested-lists-4.html
               editing/execCommand/indent-nested-lists-5.html
               editing/execCommand/indent-nested-lists-6.html
               editing/execCommand/indent-nested-lists-7.html
               editing/execCommand/outdent-nested-lists-1.html
               editing/execCommand/outdent-nested-lists-2.html
               editing/execCommand/outdent-nested-lists-3.html
               editing/execCommand/outdent-nested-lists-4.html

        * editing/IndentOutdentCommand.cpp:
        (WebCore::IndentOutdentCommand::prepareBlockquoteLevelForInsertion):
        (WebCore::IndentOutdentCommand::tryIndentingAsListItem):
        (WebCore::IndentOutdentCommand::indentIntoBlockquote):
        (WebCore::IndentOutdentCommand::indentRegion):
        * editing/IndentOutdentCommand.h:
        * editing/htmlediting.cpp:
        (WebCore::enclosingListChild):
        (WebCore::canMergeLists):
        (WebCore::isVisibilyAdjacent):
        * editing/htmlediting.h:

LayoutTests:

2009-06-27  Ryosuke Niwa  <set EMAIL_ADDRESS environment variable>

        Reviewed by Eric Seidel.

        https://bugs.webkit.org/show_bug.cgi?id=26762

        Clean up for IndentOutdentCommand::indentRegion, and solved most of problems related to the bug 21712.
        https://bugs.webkit.org/show_bug.cgi?id=21712

        The following test cases are intended for 21712, but included here
        since this patch already solved a lot of problems.

        * editing/execCommand/indent-nested-lists-1-expected.txt: Added.
        * editing/execCommand/indent-nested-lists-1.html: Added.
        * editing/execCommand/indent-nested-lists-2-expected.txt: Added.
        * editing/execCommand/indent-nested-lists-2.html: Added.
        * editing/execCommand/indent-nested-lists-3-expected.txt: Added.
        * editing/execCommand/indent-nested-lists-3.html: Added.
        * editing/execCommand/indent-nested-lists-4-expected.txt: Added.
        * editing/execCommand/indent-nested-lists-4.html: Added.
        * editing/execCommand/indent-nested-lists-5-expected.txt: Added.
        * editing/execCommand/indent-nested-lists-5.html: Added.
        * editing/execCommand/indent-nested-lists-6-expected.txt: Added.
        * editing/execCommand/indent-nested-lists-6.html: Added.
        * editing/execCommand/indent-nested-lists-7-expected.txt: Added.
        * editing/execCommand/indent-nested-lists-7.html: Added.
        * editing/execCommand/outdent-nested-lists-1-expected.txt: Added.
        * editing/execCommand/outdent-nested-lists-1.html: Added.
        * editing/execCommand/outdent-nested-lists-2-expected.txt: Added.
        * editing/execCommand/outdent-nested-lists-2.html: Added.
        * editing/execCommand/outdent-nested-lists-3-expected.txt: Added.
        * editing/execCommand/outdent-nested-lists-3.html: Added.
        * editing/execCommand/outdent-nested-lists-4-expected.txt: Added.
        * editing/execCommand/outdent-nested-lists-4.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@45316 268f45cc-cd09-0410-ab3c-d52691b4dbfc
28 files changed:
LayoutTests/ChangeLog
LayoutTests/editing/execCommand/indent-nested-lists-1-expected.txt [new file with mode: 0644]
LayoutTests/editing/execCommand/indent-nested-lists-1.html [new file with mode: 0644]
LayoutTests/editing/execCommand/indent-nested-lists-2-expected.txt [new file with mode: 0644]
LayoutTests/editing/execCommand/indent-nested-lists-2.html [new file with mode: 0644]
LayoutTests/editing/execCommand/indent-nested-lists-3-expected.txt [new file with mode: 0644]
LayoutTests/editing/execCommand/indent-nested-lists-3.html [new file with mode: 0644]
LayoutTests/editing/execCommand/indent-nested-lists-4-expected.txt [new file with mode: 0644]
LayoutTests/editing/execCommand/indent-nested-lists-4.html [new file with mode: 0644]
LayoutTests/editing/execCommand/indent-nested-lists-5-expected.txt [new file with mode: 0644]
LayoutTests/editing/execCommand/indent-nested-lists-5.html [new file with mode: 0644]
LayoutTests/editing/execCommand/indent-nested-lists-6-expected.txt [new file with mode: 0644]
LayoutTests/editing/execCommand/indent-nested-lists-6.html [new file with mode: 0644]
LayoutTests/editing/execCommand/indent-nested-lists-7-expected.txt [new file with mode: 0644]
LayoutTests/editing/execCommand/indent-nested-lists-7.html [new file with mode: 0644]
LayoutTests/editing/execCommand/outdent-nested-lists-1-expected.txt [new file with mode: 0644]
LayoutTests/editing/execCommand/outdent-nested-lists-1.html [new file with mode: 0644]
LayoutTests/editing/execCommand/outdent-nested-lists-2-expected.txt [new file with mode: 0644]
LayoutTests/editing/execCommand/outdent-nested-lists-2.html [new file with mode: 0644]
LayoutTests/editing/execCommand/outdent-nested-lists-3-expected.txt [new file with mode: 0644]
LayoutTests/editing/execCommand/outdent-nested-lists-3.html [new file with mode: 0644]
LayoutTests/editing/execCommand/outdent-nested-lists-4-expected.txt [new file with mode: 0644]
LayoutTests/editing/execCommand/outdent-nested-lists-4.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/editing/IndentOutdentCommand.cpp
WebCore/editing/IndentOutdentCommand.h
WebCore/editing/htmlediting.cpp
WebCore/editing/htmlediting.h