2011-06-02 Ryosuke Niwa <rniwa@webkit.org>
authorAdemar de Souza Reis Jr <ademar.reis@openbossa.org>
Fri, 3 Jun 2011 15:51:57 +0000 (12:51 -0300)
committerAdemar de Souza Reis Jr <ademar.reis@openbossa.org>
Fri, 3 Jun 2011 15:51:57 +0000 (12:51 -0300)
commitdbda3e9596b836ab6eb88c500766dba6745759be
treed00ba8934413651c9d5690ca323c34c72e1525e4
parent3104ebfae1418e8bc426bd3a8c8909728fb0faaf
2011-06-02  Ryosuke Niwa  <rniwa@webkit.org>

        Reviewed by Eric Seidel.

        REGRESSION: inline style is lost when deleting line break between paragraphs with same style
        https://bugs.webkit.org/show_bug.cgi?id=61899

        Added a regression test to ensure WebKit preserves font family for a paragraph being merged
        to the previous paragraph when deleting a line break between two paragraphs with the same style.

        * editing/deleting/delete-line-break-between-paragraphs-with-same-style-expected.txt: Added.
        * editing/deleting/delete-line-break-between-paragraphs-with-same-style.html: Added.
2011-06-02  Ryosuke Niwa  <rniwa@webkit.org>

        Reviewed by Eric Seidel.

        REGRESSION: inline style is lost when deleting line break between paragraphs with same style
        https://bugs.webkit.org/show_bug.cgi?id=61899

        The bug was caused by ReplaceSelectionCommand::doApply's calling handleStyleSpansBeforeInsertion
        before insertionPos is adjusted by positionAvoidingPrecedingNodes and positionOutsideTabSpan.

        Fixed the bug by calling handleStyleSpansBeforeInsertion after the calls to these two functions.

        Test: editing/deleting/delete-line-break-between-paragraphs-with-same-style.html

        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplaceSelectionCommand::doApply):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@87937 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Conflicts:

Source/WebCore/editing/ReplaceSelectionCommand.cpp
LayoutTests/ChangeLog
LayoutTests/editing/deleting/delete-line-break-between-paragraphs-with-same-style-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/delete-line-break-between-paragraphs-with-same-style.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/editing/ReplaceSelectionCommand.cpp