Title: [89181] trunk/Source/WebCore
Revision
89181
Author
[email protected]
Date
2011-06-17 17:43:15 -0700 (Fri, 17 Jun 2011)

Log Message

2011-06-17  Alexey Proskuryakov  <[email protected]>

        Reviewed by Dan Bernstein.

        https://bugs.webkit.org/show_bug.cgi?id=62913
        Use ICU search collator when available

        <rdar://problem/8830218> Search on a webpage in Safari conflates some Czech characters
        <rdar://problem/8468873> Safari search doesn't strip Hamza

        This changes behaviors that depend on system language, and isn't practically testable.

        * editing/TextIterator.cpp: (WebCore::createSearcher): Ask ICU for search collator, if available.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (89180 => 89181)


--- trunk/Source/WebCore/ChangeLog	2011-06-17 23:26:38 UTC (rev 89180)
+++ trunk/Source/WebCore/ChangeLog	2011-06-18 00:43:15 UTC (rev 89181)
@@ -1,3 +1,17 @@
+2011-06-17  Alexey Proskuryakov  <[email protected]>
+
+        Reviewed by Dan Bernstein.
+
+        https://bugs.webkit.org/show_bug.cgi?id=62913
+        Use ICU search collator when available
+
+        <rdar://problem/8830218> Search on a webpage in Safari conflates some Czech characters
+        <rdar://problem/8468873> Safari search doesn't strip Hamza
+
+        This changes behaviors that depend on system language, and isn't practically testable.
+
+        * editing/TextIterator.cpp: (WebCore::createSearcher): Ask ICU for search collator, if available.
+
 2011-06-17  Sheriff Bot  <[email protected]>
 
         Unreviewed, rolling out r89143.

Modified: trunk/Source/WebCore/editing/TextIterator.cpp (89180 => 89181)


--- trunk/Source/WebCore/editing/TextIterator.cpp	2011-06-17 23:26:38 UTC (rev 89180)
+++ trunk/Source/WebCore/editing/TextIterator.cpp	2011-06-18 00:43:15 UTC (rev 89181)
@@ -1586,7 +1586,8 @@
     // but it doesn't matter exactly what it is, since we don't perform any searches
     // without setting both the pattern and the text.
     UErrorCode status = U_ZERO_ERROR;
-    UStringSearch* searcher = usearch_open(&newlineCharacter, 1, &newlineCharacter, 1, currentSearchLocaleID(), 0, &status);
+    String searchCollatorName = makeString(currentSearchLocaleID(), "@collation=search");
+    UStringSearch* searcher = usearch_open(&newlineCharacter, 1, &newlineCharacter, 1, searchCollatorName.utf8().data(), 0, &status);
     ASSERT(status == U_ZERO_ERROR || status == U_USING_FALLBACK_WARNING || status == U_USING_DEFAULT_WARNING);
     return searcher;
 }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to