WebCore:
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Jan 2009 19:50:37 +0000 (19:50 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Jan 2009 19:50:37 +0000 (19:50 +0000)
commit00a6cae6657fbc0d024292a882e36988b347170e
treea2d191e6603cbd6cb62ca9d541dbf4e32b5f6cae
parentef6cd20429d485e38047a9103ca619417c89a987
WebCore:

2009-01-05  Darin Adler  <darin@apple.com>

        Reviewed by Dan Bernstein.

        Bug 23109: REGRESSION: Backwards search in a long document matches incorrectly
        https://bugs.webkit.org/show_bug.cgi?id=23109

        Test: fast/text/find-backwards.html

        * editing/TextIterator.cpp:
        (WebCore::SearchBuffer::append): Fix incorrect size passed to memcpy.
        (WebCore::SearchBuffer::search): Handle case where we have an empty buffer but
        we're at a break; must not try to search because ICU will give us an error.
        Fix incorrect size passed to memcpy and memmove.
        (WebCore::findPlainText): Fix case where we found a match and need to search
        again because we want to find the last match. We need to try again without
        adding any more text or handling the break before moving on.

LayoutTests:

2009-01-05  Darin Adler  <darin@apple.com>

        Reviewed by Dan Bernstein.

        Bug 23109: REGRESSION: Backwards search in a long document matches incorrectly
        https://bugs.webkit.org/show_bug.cgi?id=23109

        * fast/text/find-backwards-expected.txt: Added.
        * fast/text/find-backwards.html: Added.
        * fast/text/resources/TEMPLATE.html: Copied from fast/js/resources/TEMPLATE.html.
        * fast/text/resources/find-backwards.js: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/text/find-backwards-expected.txt [new file with mode: 0644]
LayoutTests/fast/text/find-backwards.html [new file with mode: 0644]
LayoutTests/fast/text/resources/TEMPLATE.html [new file with mode: 0644]
LayoutTests/fast/text/resources/find-backwards.js [new file with mode: 0644]
WebCore/ChangeLog
WebCore/editing/TextIterator.cpp