Reviewed by John
authorkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Feb 2005 00:35:01 +0000 (00:35 +0000)
committerkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Feb 2005 00:35:01 +0000 (00:35 +0000)
commit21e31755ee6dacb435a5bd5155bf43be64c672e6
tree6e7d0bbd116aa4b7011d795526c7e79c5ca92b84
parent66999901f2a6b85336a81dc2164a6e769b7d9a28
    Reviewed by John

        Fix for this bug:

        <rdar://problem/3977962> font loses bold style after pasting next to existing text and pressing return

        * khtml/editing/htmlediting.cpp:
        (khtml::InsertParagraphSeparatorCommand::calculateStyleBeforeInsertion): Problem here was
        that we were doing work in cases where we should not, and content whose style would have
        been correct if we had done nothing was getting clobbered. It turns out that extra work
        to apply style to the new paragraph added in this command only needs to be done if we're
        at the boundaries of a paragraph. Otherwise, content that is moved as part of the work
        of the command will lend their styles to the new paragraph without any extra work needed.
        So, make this position check and return unless at a paragraph boundary.

        New test:

        * layout-tests/editing/style/block-styles-007-expected.txt
        * layout-tests/editing/style/block-styles-007.html

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8679 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/editing/style/block-styles-007-expected.txt [new file with mode: 0644]
LayoutTests/editing/style/block-styles-007.html [new file with mode: 0644]
WebCore/ChangeLog-2005-08-23
WebCore/khtml/editing/htmlediting.cpp