2007-07-06 Mitz Pettel <mitz@webkit.org>
authorbdash <bdash@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 7 Jul 2007 02:37:27 +0000 (02:37 +0000)
committerbdash <bdash@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 7 Jul 2007 02:37:27 +0000 (02:37 +0000)
commit20b4b1d56cee242cda63140ee226909a5eb78545
tree1ccc6e0e6063750e9d102efe256471be62f21c44
parentc16bace1e4ed6a27d2656d90488b8a5b614d1db2
2007-07-06  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Darin.

        - fix http://bugs.webkit.org/show_bug.cgi?id=14545
          REGRESSION (r21854-r21869): Repro crash in RenderBlock::updateFirstLetter @ nola.com/rose/

        Test: fast/css/first-letter-capitalized.html

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::updateFirstLetter): Moved the call to setFirstLetter
        further down so that the first letter is not destroyed if a text transform
        is applied to the remaining text fragment when it is add to the render tree.
        * rendering/RenderText.cpp:
        (WebCore::RenderText::previousCharacter): Factored out of setTextInternal.
        (WebCore::RenderText::setTextInternal): Changed to call previousCharacter().
        * rendering/RenderText.h:
        * rendering/RenderTextFragment.cpp:
        (WebCore::RenderTextFragment::previousCharacter): Override to return the
        character in the original string before the start of the fragment.
        * rendering/RenderTextFragment.h:

2007-07-06  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Darin.

        - test for http://bugs.webkit.org/show_bug.cgi?id=14545
          REGRESSION (r21854-r21869): Repro crash in RenderBlock::updateFirstLetter @ nola.com/rose/

        * fast/css/first-letter-capitalized-expected.checksum: Added.
        * fast/css/first-letter-capitalized-expected.png: Added.
        * fast/css/first-letter-capitalized-expected.txt: Added.
        * fast/css/first-letter-capitalized.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@24084 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/css/first-letter-capitalized-expected.checksum [new file with mode: 0644]
LayoutTests/fast/css/first-letter-capitalized-expected.png [new file with mode: 0644]
LayoutTests/fast/css/first-letter-capitalized-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/first-letter-capitalized.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/rendering/RenderBlock.cpp
WebCore/rendering/RenderText.cpp
WebCore/rendering/RenderText.h
WebCore/rendering/RenderTextFragment.cpp
WebCore/rendering/RenderTextFragment.h