2006-12-16 Mitz Pettel <mitz@webkit.org>
authorap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 16 Dec 2006 09:51:22 +0000 (09:51 +0000)
committerap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 16 Dec 2006 09:51:22 +0000 (09:51 +0000)
        Reviewed by Alexey.

        - fix http://bugs.webkit.org/show_bug.cgi?id=11814
          REGRESSION(r18098): Find does not work with capital letters

        Test: editing/execCommand/findString-3.html

        * wtf/unicode/icu/UnicodeIcu.h:
        (WTF::Unicode::foldCase): Changed to not return an error if the result fits
        in the buffer without a null terminator.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@18247 268f45cc-cd09-0410-ab3c-d52691b4dbfc

JavaScriptCore/ChangeLog
JavaScriptCore/wtf/unicode/icu/UnicodeIcu.h
LayoutTests/ChangeLog
LayoutTests/editing/execCommand/findString-3-expected.txt [new file with mode: 0644]
LayoutTests/editing/execCommand/findString-3.html [new file with mode: 0644]

index 95cc96d3b856f95d09e3e59ceb8afe22bccc24e0..b652afb70fd48a37d455d267622954a0b559ecbd 100644 (file)
@@ -1,3 +1,16 @@
+2006-12-16  Mitz Pettel  <mitz@webkit.org>
+
+        Reviewed by Alexey.
+
+        - fix http://bugs.webkit.org/show_bug.cgi?id=11814
+          REGRESSION(r18098): Find does not work with capital letters
+
+        Test: editing/execCommand/findString-3.html
+
+        * wtf/unicode/icu/UnicodeIcu.h:
+        (WTF::Unicode::foldCase): Changed to not return an error if the result fits
+        in the buffer without a null terminator.
+
 2006-12-13  Maciej Stachowiak  <mjs@apple.com>
 
         Reviewed by Anders.
index a3c75103f4efd5c5e6e5518dfe079783678114bc..ac9530fa228c85cb8a9e7e5b1d84325940c38b43 100644 (file)
@@ -126,7 +126,7 @@ namespace WTF {
     {
       UErrorCode status = U_ZERO_ERROR;
       int32_t realLength = u_strFoldCase(result, resultLength, src, srcLength, U_FOLD_CASE_DEFAULT, &status);
-      *error = !(U_SUCCESS(status) && realLength < resultLength);
+      *error = !U_SUCCESS(status);
       return realLength;
     }
 
index 45ace7b7ea986f23ed439463579625d1db590336..d8593a9e3605f77a70eb6736046d62963bfefcde 100644 (file)
@@ -1,3 +1,13 @@
+2006-12-16  Mitz Pettel  <mitz@webkit.org>
+
+        Reviewed by Alexey.
+
+        - test for http://bugs.webkit.org/show_bug.cgi?id=11814
+          REGRESSION(r18098): Find does not work with capital letters
+
+        * editing/execCommand/findString-3-expected.txt: Added.
+        * editing/execCommand/findString-3.html: Added.
+
 2006-12-15  Alexey Proskuryakov  <ap@webkit.org>
 
         Reviewed by Darin.
diff --git a/LayoutTests/editing/execCommand/findString-3-expected.txt b/LayoutTests/editing/execCommand/findString-3-expected.txt
new file mode 100644 (file)
index 0000000..e654519
--- /dev/null
@@ -0,0 +1,7 @@
+Test for http://bugs.webkit.org/show_bug.cgi?id=11814 REGRESSION(r18098): Find does not work with capital letters.
+
+The word “uppercase” should be selected.
+
+PASS
+
+
diff --git a/LayoutTests/editing/execCommand/findString-3.html b/LayoutTests/editing/execCommand/findString-3.html
new file mode 100644 (file)
index 0000000..c0ec888
--- /dev/null
@@ -0,0 +1,17 @@
+<p>
+    Test for <i><a href="http://bugs.webkit.org/show_bug.cgi?id=11814">http://bugs.webkit.org/show_bug.cgi?id=11814</a>
+    REGRESSION(r18098): Find does not work with capital letters</i>.
+</p>
+<p>
+    The word &ldquo;uppercase&rdquo; should be selected.
+</p>
+<hr>
+<p id="result">
+    FAIL
+</p>
+<script>
+    if (window.layoutTestController)
+        layoutTestController.dumpAsText();
+    if (document.execCommand("FindString", false, "UPPERcase"))
+        document.getElementById("result").innerText = "PASS";
+</script>