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

darin darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:56:29 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 3148e2a8302d504760211b507e7ffb448a45875a
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Sep 17 21:51:07 2003 +0000

            Reviewed by Ken.
    
            - fixed 3423404 -- REGRESSION: Japanese page appears blank due to unexpected kTECPartialCharErr
    
            * kwq/KWQTextCodec.mm: (KWQTextDecoder::convertOneChunkUsingTEC): In the case where we're already
            going from the small buffer back to the large one, treat kTECPartialCharErr the same as noErr.
            Otherwise we'll get confused and drop the contents of the big buffer.
            (KWQTextDecoder::convert): Improve the debugging code a bit (still turned off).
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5001 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 5d976ea..9c81703 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,14 @@
+2003-09-17  Darin Adler  <darin at apple.com>
+
+        Reviewed by Ken.
+
+        - fixed 3423404 -- REGRESSION: Japanese page appears blank due to unexpected kTECPartialCharErr
+
+        * kwq/KWQTextCodec.mm: (KWQTextDecoder::convertOneChunkUsingTEC): In the case where we're already
+        going from the small buffer back to the large one, treat kTECPartialCharErr the same as noErr.
+        Otherwise we'll get confused and drop the contents of the big buffer.
+        (KWQTextDecoder::convert): Improve the debugging code a bit (still turned off).
+
 === WebCore-105 ===
 
 2003-09-15  Ken as Darin  <darin at apple.com>
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 5d976ea..9c81703 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,14 @@
+2003-09-17  Darin Adler  <darin at apple.com>
+
+        Reviewed by Ken.
+
+        - fixed 3423404 -- REGRESSION: Japanese page appears blank due to unexpected kTECPartialCharErr
+
+        * kwq/KWQTextCodec.mm: (KWQTextDecoder::convertOneChunkUsingTEC): In the case where we're already
+        going from the small buffer back to the large one, treat kTECPartialCharErr the same as noErr.
+        Otherwise we'll get confused and drop the contents of the big buffer.
+        (KWQTextDecoder::convert): Improve the debugging code a bit (still turned off).
+
 === WebCore-105 ===
 
 2003-09-15  Ken as Darin  <darin at apple.com>
diff --git a/WebCore/kwq/KWQTextCodec.mm b/WebCore/kwq/KWQTextCodec.mm
index 4692662..f9b4110 100644
--- a/WebCore/kwq/KWQTextCodec.mm
+++ b/WebCore/kwq/KWQTextCodec.mm
@@ -381,6 +381,12 @@ OSStatus KWQTextDecoder::convertOneChunkUsingTEC(const unsigned char *inputBuffe
                 bytesRead = 0;
             }
             _numBufferedBytes = 0;
+            if (status == kTECPartialCharErr) {
+                // While there may be a partial character problem in the small buffer,
+                // we have to try again and not get confused and think there is a partial
+                // character problem in the large buffer.
+                status = noErr;
+            }
         }
     } else {
         status = TECConvertText(_converter, inputBuffer, inputBufferLength, &bytesRead,
@@ -474,10 +480,17 @@ QString KWQTextDecoder::convert(const unsigned char *chs, int len, bool flush)
         return convertUTF16(chs, len);
     }
 
-#if TEST_PARTIAL_CHARACTER_HANDLING
+//#define PARTIAL_CHARACTER_HANDLING_TEST_CHUNK_SIZE 1000
+#if PARTIAL_CHARACTER_HANDLING_TEST_CHUNK_SIZE
     QString result;
-    for (int i = 0; i != len; ++i)
-        result += convertUsingTEC(chs + i, 1, flush && i == len - 1);
+    int chunkSize;
+    for (int i = 0; i != len; i += chunkSize) {
+        chunkSize = len - i;
+        if (chunkSize > PARTIAL_CHARACTER_HANDLING_TEST_CHUNK_SIZE) {
+            chunkSize = PARTIAL_CHARACTER_HANDLING_TEST_CHUNK_SIZE;
+        }
+        result += convertUsingTEC(chs + i, chunkSize, flush && (i + chunkSize == len));
+    }
     return result;
 #else
     return convertUsingTEC(chs, len, flush);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list