LayoutTests:
authorjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Oct 2006 23:21:35 +0000 (23:21 +0000)
committerjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Oct 2006 23:21:35 +0000 (23:21 +0000)
commit65f0ab89756b5894530312fe75b651259bb6af15
tree801fb9f424ffa8446e0758252500e38cc3bcf219
parent15ef532115734c3b8a93745c269015b7bea2c5f9
LayoutTests:

        Reviewed by levi

        <rdar://problem/4447885>
        API: WebView should have a method something like incrementLeftMarginBy: or indentBy:

        Changed blockquotes in these tests to blockquote class="webkit-indent-blockquote".
        * editing/execCommand/indent-empty-root-expected.txt:
        * editing/execCommand/indent-selection-expected.checksum:
        * editing/execCommand/indent-selection-expected.png:
        * editing/execCommand/indent-selection-expected.txt:
        * editing/execCommand/indent-selection.html:
        * editing/execCommand/nsresponder-indent-expected.txt:
        * editing/execCommand/nsresponder-outdent.html:
        * editing/execCommand/outdent-selection-expected.checksum:
        * editing/execCommand/outdent-selection-expected.png:
        * editing/execCommand/outdent-selection-expected.txt:

        Ditto.  Added a FIXME:
        * editing/execCommand/outdent-selection.html:

WebCore:

        Reviewed by levi

        <rdar://problem/4447885>
        API: WebView should have a method something like incrementLeftMarginBy: or indentBy:

        Fixed indent/outdent to only increment the left margin, to match other browsers.
        Used blockquote class="webkit-indent-blockquote" to do this.  Mail can now
        implement indent/outdent by customizing the appearance of these blockquotes,
        instead of using a new API.

        * css/html4.css: Added margin: 0 0 0 40px for webkit-indent-blockquotes.
        * editing/IndentOutdentCommand.cpp:
        (WebCore::indentBlockquoteString): Added.
        (WebCore::createIndentBlockquoteElement): Added.
        (WebCore::isIndentBlockquote): Added.
        (WebCore::isListOrBlockquote): Added.
        (WebCore::IndentOutdentCommand::IndentOutdentCommand):
        (WebCore::IndentOutdentCommand::prepareBlockquoteLevelForInsertion): Fixed
        a bug in the code that added an extra br if the placeholder collapsed upon insertion.
        Used the new indentBlockquote checks and enclosing element getters.
        (WebCore::IndentOutdentCommand::indentRegion): Ditto.
        (WebCore::IndentOutdentCommand::outdentParagraph): Ditto.  Cleaned up the
        logic to pull the selection out of a list a bit.
        * editing/htmlediting.cpp:
        (WebCore::enclosingNodeOfType): Added this generic enclosing element getter.
        * editing/htmlediting.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@17143 268f45cc-cd09-0410-ab3c-d52691b4dbfc
17 files changed:
LayoutTests/ChangeLog
LayoutTests/editing/execCommand/indent-empty-root-expected.txt
LayoutTests/editing/execCommand/indent-selection-expected.checksum
LayoutTests/editing/execCommand/indent-selection-expected.png
LayoutTests/editing/execCommand/indent-selection-expected.txt
LayoutTests/editing/execCommand/indent-selection.html
LayoutTests/editing/execCommand/nsresponder-indent-expected.txt
LayoutTests/editing/execCommand/nsresponder-outdent.html
LayoutTests/editing/execCommand/outdent-selection-expected.checksum
LayoutTests/editing/execCommand/outdent-selection-expected.png
LayoutTests/editing/execCommand/outdent-selection-expected.txt
LayoutTests/editing/execCommand/outdent-selection.html
WebCore/ChangeLog
WebCore/css/html4.css
WebCore/editing/IndentOutdentCommand.cpp
WebCore/editing/htmlediting.cpp
WebCore/editing/htmlediting.h