WebCore:
authorjustin.garcia@apple.com <justin.garcia@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Apr 2008 17:41:11 +0000 (17:41 +0000)
committerjustin.garcia@apple.com <justin.garcia@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Apr 2008 17:41:11 +0000 (17:41 +0000)
commit960e1114e98653c2aa31b2b5fc41a3bfc0279df7
treeed271fe93d69fb0ca2c565967a598aefb5c5718b
parent5bf9b526552ce1b6fe69c95c01b6540e94a6d6a7
WebCore:

2008-04-24  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by Darin Adler.

        <rdar://problem/5604313> FormatBlock to apply an h1 also inserts a style span around the first letter (16004)

        * editing/TextIterator.cpp:
        (WebCore::TextIterator::advance): We emit an extra newline when leaving a
        block element that has atypical margin/padding. When we emit the extra newline,
        it needs to be positioned after that block's contents, not after the block.
        This is how we position the first newline, too, since the range for emitted newlines
        should start where the line break begins visually.

LayoutTests:

2008-04-24  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by Darin Adler.

        <rdar://problem/5604313> FormatBlock leaves first letter incorrectly styled (16004)

        * editing/execCommand/5604313-expected.txt: Added.
        * editing/execCommand/5604313.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@32497 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/editing/execCommand/5604313-expected.txt [new file with mode: 0644]
LayoutTests/editing/execCommand/5604313.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/editing/TextIterator.cpp