2011-06-27 Ryosuke Niwa <rniwa@webkit.org>
authorRyosuke Niwa <rniwa@webkit.org>
Mon, 27 Jun 2011 17:21:39 +0000 (17:21 +0000)
committerAdemar de Souza Reis Jr <ademar.reis@openbossa.org>
Mon, 27 Jun 2011 19:24:35 +0000 (16:24 -0300)
commit53b25a9ccf9998b92d1d17f4921523628f06de62
treee4e00fb5e9b5867b3a97478e77bd6506536e68ba
parent426401ea2a38a484aa59e885e46403c3f791b3cc
2011-06-27  Ryosuke Niwa  <rniwa@webkit.org>

        Reviewed by Kent Tamura.

        Crash in TextIterator
        https://bugs.webkit.org/show_bug.cgi?id=63334

        Fix a crash in TextIterator. Keep m_sortedTextBoxes and renderer consistent
        and check !m_offset when handling first letter.

        Also add more assertions to help detecting similar bugs.

        Test: editing/text-iterator/first-letter-rtl-crash.html

        * editing/TextIterator.cpp:
        (WebCore::TextIterator::handleTextNode):
        (WebCore::TextIterator::emitText):
2011-06-27  Ryosuke Niwa  <rniwa@webkit.org>

        Reviewed by Kent Tamura.

        Crash in TextIterator
        https://bugs.webkit.org/show_bug.cgi?id=63334

        Added a test to ensure WebKit does not crash when iterating through letters in a RTL block
        with first-letter rule applied where letters are not contiguous.

        * editing/text-iterator/first-letter-rtl-crash-expected.txt: Added.
        * editing/text-iterator/first-letter-rtl-crash.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@89831 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/editing/text-iterator/first-letter-rtl-crash-expected.txt [new file with mode: 0644]
LayoutTests/editing/text-iterator/first-letter-rtl-crash.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/editing/TextIterator.cpp