JavaScriptCore:
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 3 Nov 2007 16:40:32 +0000 (16:40 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 3 Nov 2007 16:40:32 +0000 (16:40 +0000)
commitaee8c1191c7907ee287b60cd6cdd86bf1f467baa
tree8cca72959a9097feb5a5ac001e8f507e0d8f2fa4
parente06b241e139aee921ddf4edb536f7ba42ac95e51
JavaScriptCore:

        Reviewed by Maciej.

        - fix http://bugs.webkit.org/show_bug.cgi?id=15814
          <rdar://problem/5536644> fast/js/kde/encode_decode_uri.html fails

        These changes cause us to match the JavaScript specification and pass the
        fast/js/kde/encode_decode_uri.html test.

        * kjs/function.cpp: (KJS::encode): Call the UTF-8 string conversion in its
        new strict mode, throwing an exception if there are malformed UTF-16 surrogate
        pairs in the text.

        * kjs/ustring.h: Added a strict version of the UTF-8 string conversion.
        * kjs/ustring.cpp:
        (KJS::decodeUTF8Sequence): Removed code to disallow U+FFFE and U+FFFF; while
        those might be illegal in some sense, they aren't supposed to get any special
        handling in the place where this function is currently used.
        (KJS::UString::UTF8String): Added the strictness.

LayoutTests:

        Reviewed by Maciej.

        - updates for http://bugs.webkit.org/show_bug.cgi?id=15814
          <rdar://problem/5536644> fast/js/kde/encode_decode_uri.html fails

        * fast/js/kde/resources/encode_decode_uri.js: Rewrote the test to cover edges better,
        and use the should functions in a way that makes failures easier to understand.
        * fast/js/kde/encode_decode_uri-expected.txt: Updated.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@27406 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JavaScriptCore/ChangeLog
JavaScriptCore/kjs/function.cpp
JavaScriptCore/kjs/ustring.cpp
JavaScriptCore/kjs/ustring.h
LayoutTests/ChangeLog
LayoutTests/fast/js/kde/encode_decode_uri-expected.txt
LayoutTests/fast/js/kde/resources/encode_decode_uri.js
LayoutTests/http/tests/navigation/resources/postresult.pl