JavaScriptCore:
authorharrison <harrison@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 May 2007 13:11:05 +0000 (13:11 +0000)
committerharrison <harrison@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 May 2007 13:11:05 +0000 (13:11 +0000)
commit07fd0cd13f20cd0f18ce6eabecf5e25b0104ee6c
tree911281e64f021fb0c7da01f127a191c65adcfd32
parent445c7095ea5fb205554345f2b1e063f964b47035
JavaScriptCore:

        Reviewed by Antti.

        <rdar://problem/5174862> Crash resulting from DeprecatedString::insert()

        Added insertion support for more than one value.

        * wtf/Vector.h:
        (WTF::::insert):
        Added support for inserting multiple values.

        (WTF::::prepend):
        New. Insert at the start of vectors. Convenient for vectors used as strings.

LayoutTests:

        Reviewed by Antti.

        - test for <rdar://problem/5174862> Crash resulting from DeprecatedString::insert()

        * editing/selection/move-by-sentence-001-expected.checksum: Added.
        * editing/selection/move-by-sentence-001-expected.png: Added.
        * editing/selection/move-by-sentence-001-expected.txt: Added.
        * editing/selection/move-by-sentence-001.html: Added.

WebCore:

        Reviewed by Antti.

        <rdar://problem/5174862> Crash resulting from DeprecatedString::insert()

        Test added: editing/selection/move-by-sentence-001.html

        * editing/visible_units.cpp:
        (WebCore::previousBoundary):
        (WebCore::nextBoundary):
        Use a UChar Vector instead of DeprecatedString.
        Avoid creating an extra string for secure bullet replacement unless it is actually needed.

        * platform/DeprecatedString.cpp:
        (WebCore::DeprecatedString::insert):
        Call forceUnicode() before setLength(), so that only the unicode buffer is resized.

       (WebCore::DeprecatedString::setLength):
        Adjust the unicode buffer even if the ascii buffer is valid.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@21221 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JavaScriptCore/ChangeLog
JavaScriptCore/wtf/Vector.h
LayoutTests/ChangeLog
LayoutTests/editing/selection/move-by-sentence-001-expected.checksum [new file with mode: 0644]
LayoutTests/editing/selection/move-by-sentence-001-expected.png [new file with mode: 0644]
LayoutTests/editing/selection/move-by-sentence-001-expected.txt [new file with mode: 0644]
LayoutTests/editing/selection/move-by-sentence-001.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/editing/visible_units.cpp
WebCore/platform/DeprecatedString.cpp