LayoutTests:
authorjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 23 Oct 2006 21:29:49 +0000 (21:29 +0000)
committerjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 23 Oct 2006 21:29:49 +0000 (21:29 +0000)
commit7069f537968595a84fc27448066d29ec072ebdcf
tree6dea9ec4b4b27899fb717ea734ff56b951024f80
parent282b3baa9e5a8db97d86b5d861f9d1215bdc0332
LayoutTests:

        Reviewed by john

        <http://bugs.webkit.org/show_bug.cgi?id=11333>
        Writely Editor: After inserting a HR element, pressing return key creates a copy of this HR element in the document

        * editing/inserting/insert-br-009-expected.checksum: Added.
        * editing/inserting/insert-br-009-expected.png: Added.
        * editing/inserting/insert-br-009-expected.txt: Added.
        * editing/inserting/insert-br-009.html: Added.
        * editing/inserting/insert-paragraph-01-expected.checksum: Added.
        * editing/inserting/insert-paragraph-01-expected.png: Added.
        * editing/inserting/insert-paragraph-01-expected.txt: Added.
        * editing/inserting/insert-paragraph-01.html: Added.
        * editing/inserting/insert-paragraph-02-expected.checksum: Added.
        * editing/inserting/insert-paragraph-02-expected.png: Added.
        * editing/inserting/insert-paragraph-02-expected.txt: Added.
        * editing/inserting/insert-paragraph-02.html: Added.
        * editing/inserting/insert-paragraph-03-expected.checksum: Added.
        * editing/inserting/insert-paragraph-03-expected.png: Added.
        * editing/inserting/insert-paragraph-03-expected.txt: Added.
        * editing/inserting/insert-paragraph-03.html: Added.
        * editing/inserting/insert-paragraph-04-expected.checksum: Added.
        * editing/inserting/insert-paragraph-04-expected.png: Added.
        * editing/inserting/insert-paragraph-04-expected.txt: Added.
        * editing/inserting/insert-paragraph-04.html: Added.

WebCore:

        Reviewed by john

        <http://bugs.webkit.org/show_bug.cgi?id=11333>
        Writely Editor: After inserting a HR element, pressing return key creates a copy of this HR element in the document

        Added special cases in InsertLineBreakCommand for inserting before
        and after tables and horizontal rules.  Also, perform InsertLineBreak
        instead of InsertParagraphSeparator at these positions.

        * editing/InsertLineBreakCommand.cpp:
        (WebCore::InsertLineBreakCommand::doApply):  Use the canonical form
        of the caret position when we check for the new special cases because
        we know that we canonicalize VisiblePositions to those positions.
        Added code to handle inserting before/after tables and horizontal rules.
        Fixed a bug when inserting at the end of a block (it checked for a collapse
        of the inserted br by looking for the absence of a br, but the line break
        might have been a '\n' in white-space:pre text).  Removed unused LOGs.
        * editing/InsertParagraphSeparatorCommand.cpp:
        (WebCore::InsertParagraphSeparatorCommand::doApply): Perform an
        InsertLineBreakCommand when before/after a table or a horizontal rule
        so that we don't have to maintain two pieces of special case code.
        Migrated to enclosingBlock.
        * editing/htmlediting.cpp: Added a FIXME.
        * editing/visible_units.cpp:
        (WebCore::startOfParagraph): Added a workaround for 8622.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@17223 268f45cc-cd09-0410-ab3c-d52691b4dbfc
27 files changed:
LayoutTests/ChangeLog
LayoutTests/editing/inserting/insert-br-009-expected.checksum [new file with mode: 0644]
LayoutTests/editing/inserting/insert-br-009-expected.png [new file with mode: 0644]
LayoutTests/editing/inserting/insert-br-009-expected.txt [new file with mode: 0644]
LayoutTests/editing/inserting/insert-br-009.html [new file with mode: 0644]
LayoutTests/editing/inserting/insert-paragraph-01-expected.checksum [new file with mode: 0644]
LayoutTests/editing/inserting/insert-paragraph-01-expected.png [new file with mode: 0644]
LayoutTests/editing/inserting/insert-paragraph-01-expected.txt [new file with mode: 0644]
LayoutTests/editing/inserting/insert-paragraph-01.html [new file with mode: 0644]
LayoutTests/editing/inserting/insert-paragraph-02-expected.checksum [new file with mode: 0644]
LayoutTests/editing/inserting/insert-paragraph-02-expected.png [new file with mode: 0644]
LayoutTests/editing/inserting/insert-paragraph-02-expected.txt [new file with mode: 0644]
LayoutTests/editing/inserting/insert-paragraph-02.html [new file with mode: 0644]
LayoutTests/editing/inserting/insert-paragraph-03-expected.checksum [new file with mode: 0644]
LayoutTests/editing/inserting/insert-paragraph-03-expected.png [new file with mode: 0644]
LayoutTests/editing/inserting/insert-paragraph-03-expected.txt [new file with mode: 0644]
LayoutTests/editing/inserting/insert-paragraph-03.html [new file with mode: 0644]
LayoutTests/editing/inserting/insert-paragraph-04-expected.checksum [new file with mode: 0644]
LayoutTests/editing/inserting/insert-paragraph-04-expected.png [new file with mode: 0644]
LayoutTests/editing/inserting/insert-paragraph-04-expected.txt [new file with mode: 0644]
LayoutTests/editing/inserting/insert-paragraph-04.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/editing/InsertLineBreakCommand.cpp
WebCore/editing/InsertParagraphSeparatorCommand.cpp
WebCore/editing/ReplaceSelectionCommand.cpp
WebCore/editing/htmlediting.cpp
WebCore/editing/visible_units.cpp