[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

rjw rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:27:50 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit d82dcac1e82cac01f1c6b8425ed662f00e66eb66
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Jul 29 18:55:04 2002 +0000

            Fixed 3009067.  We were not correctly testing the first character of the node string.  Fixed in KWQString.
            This highlighted another problem.  KWQ does not support unichar * string find w/ case sensitive argument.
            KWQString implements QString::find(const char *chs, int index, bool caseSensitive), so  QStrings passed
            will be auto-cast to char *.  Filed 3010875 to track that issue.
    
            * kwq/KWQString.mm:
            (compareToLatinCharacter):
            (QString::find):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1688 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index be958a7..5ecd744 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,14 @@
+2002-07-29  Richard Williamson  <rjw at apple.com>
+
+        Fixed 3009067.  We were not correctly testing the first character of the node string.  Fixed in KWQString.
+        This highlighted another problem.  KWQ does not support unichar * string find w/ case sensitive argument.
+        KWQString implements QString::find(const char *chs, int index, bool caseSensitive), so  QStrings passed 
+        will be auto-cast to char *.  Filed 3010875 to track that issue.
+
+        * kwq/KWQString.mm:
+        (compareToLatinCharacter):
+        (QString::find):
+
 2002-07-26  David Hyatt  <hyatt at apple.com>
 
 	Changing the default user agent to be Gecko.  This fixes
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index be958a7..5ecd744 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,14 @@
+2002-07-29  Richard Williamson  <rjw at apple.com>
+
+        Fixed 3009067.  We were not correctly testing the first character of the node string.  Fixed in KWQString.
+        This highlighted another problem.  KWQ does not support unichar * string find w/ case sensitive argument.
+        KWQString implements QString::find(const char *chs, int index, bool caseSensitive), so  QStrings passed 
+        will be auto-cast to char *.  Filed 3010875 to track that issue.
+
+        * kwq/KWQString.mm:
+        (compareToLatinCharacter):
+        (QString::find):
+
 2002-07-26  David Hyatt  <hyatt at apple.com>
 
 	Changing the default user agent to be Gecko.  This fixes
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index be958a7..5ecd744 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,14 @@
+2002-07-29  Richard Williamson  <rjw at apple.com>
+
+        Fixed 3009067.  We were not correctly testing the first character of the node string.  Fixed in KWQString.
+        This highlighted another problem.  KWQ does not support unichar * string find w/ case sensitive argument.
+        KWQString implements QString::find(const char *chs, int index, bool caseSensitive), so  QStrings passed 
+        will be auto-cast to char *.  Filed 3010875 to track that issue.
+
+        * kwq/KWQString.mm:
+        (compareToLatinCharacter):
+        (QString::find):
+
 2002-07-26  David Hyatt  <hyatt at apple.com>
 
 	Changing the default user agent to be Gecko.  This fixes
diff --git a/WebCore/kwq/KWQString.mm b/WebCore/kwq/KWQString.mm
index 607cb2d..f0a2bea 100644
--- a/WebCore/kwq/KWQString.mm
+++ b/WebCore/kwq/KWQString.mm
@@ -370,6 +370,25 @@ static int findCheapCount = 0;
 
 const int caseDelta = ('a' - 'A');
 
+static bool compareToLatinCharacter (UniChar c1, UniChar c2, bool caseSensitive)
+{
+    if (!caseSensitive){
+        if (c2 >= 'a' && c2 <= 'z'){
+            if (c1 == c2 || c1 == c2 - caseDelta)
+                return true;
+        }
+        else if (c2 >= 'A' && c2 <= 'Z'){
+            if (c1 == c2 || c1 == c2 + caseDelta)
+                return true;
+        }
+        else if (c1 == c2)
+            return true;
+    }
+    else if (c1 == c2)
+        return true;
+    return false;
+}
+
 int QString::find(const char *chs, int index, bool caseSensitive) const
 {
     int pos = -1;
@@ -417,25 +436,13 @@ int QString::find(const char *chs, int index, bool caseSensitive) const
                 _chs = chs + 1;
                 firstC = (UniChar)(*chs);
                 while (remaining >= compareToLength){
-                    if (*internalBuffer++ == firstC){
+                    if (compareToLatinCharacter(*internalBuffer++,firstC,caseSensitive)){
                         const UniChar *compareTo = internalBuffer;
                         
                         found = len - remaining;
                         while ( (c2 = (UniChar)(*_chs++)) ){
                             c1 = (UniChar)(*compareTo++);
-                            if (!caseSensitive){
-                                if (c2 >= 'a' && c2 <= 'z'){
-                                    if (c1 == c2 || c1 == c2 - caseDelta)
-                                        continue;
-                                }
-                                else if (c2 >= 'A' && c2 <= 'Z'){
-                                    if (c1 == c2 || c1 == c2 + caseDelta)
-                                        continue;
-                                }
-                                else if (c1 == c2)
-                                    continue;
-                            }
-                            else if (c1 == c2)
+                            if (compareToLatinCharacter(c1, c2,caseSensitive))
                                 continue;
                             break;
                         }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list