[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
mjs
mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:51:55 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 6300090b5803b746bd4a33cb2f090aa8a3e91cac
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Aug 15 00:40:24 2003 +0000
Fixed by Darin, reviewed by me (and originally figured out by John).
- fixed 3375592 - New Yahoo Maps doesn't work right
* kwq/KWQTextCodec.mm:
(KWQTextDecoder::convertUTF16): Don't pass through null characters.
(KWQTextDecoder::appendOmittingNullsAndBOMs): Ditto.
(KWQTextDecoder::convertUsingTEC): Ditto.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4827 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 05dfc9d..fe7fb69 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,14 @@
+2003-08-14 Maciej Stachowiak <mjs at apple.com>
+
+ Fixed by Darin, reviewed by me (and originally figured out by John).
+
+ - fixed 3375592 - New Yahoo Maps doesn't work right
+
+ * kwq/KWQTextCodec.mm:
+ (KWQTextDecoder::convertUTF16): Don't pass through null characters.
+ (KWQTextDecoder::appendOmittingNullsAndBOMs): Ditto.
+ (KWQTextDecoder::convertUsingTEC): Ditto.
+
2003-08-14 Vicki Murley <vicki at apple.com>
Reviewed by John.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 05dfc9d..fe7fb69 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,14 @@
+2003-08-14 Maciej Stachowiak <mjs at apple.com>
+
+ Fixed by Darin, reviewed by me (and originally figured out by John).
+
+ - fixed 3375592 - New Yahoo Maps doesn't work right
+
+ * kwq/KWQTextCodec.mm:
+ (KWQTextDecoder::convertUTF16): Don't pass through null characters.
+ (KWQTextDecoder::appendOmittingNullsAndBOMs): Ditto.
+ (KWQTextDecoder::convertUsingTEC): Ditto.
+
2003-08-14 Vicki Murley <vicki at apple.com>
Reviewed by John.
diff --git a/WebCore/kwq/KWQTextCodec.mm b/WebCore/kwq/KWQTextCodec.mm
index 8bfc304..7288d50 100644
--- a/WebCore/kwq/KWQTextCodec.mm
+++ b/WebCore/kwq/KWQTextCodec.mm
@@ -47,7 +47,7 @@ private:
OSStatus createTECConverter();
OSStatus convertOneChunkUsingTEC(const unsigned char *inputBuffer, int inputBufferLength, int &inputLength,
void *outputBuffer, int outputBufferLength, int &outputLength);
- static void appendOmittingBOMs(QString &s, const UniChar *characters, int byteCount);
+ static void appendOmittingNullsAndBOMs(QString &s, const UniChar *characters, int byteCount);
KWQTextDecoder(const KWQTextDecoder &);
KWQTextDecoder &operator=(const KWQTextDecoder &);
@@ -254,7 +254,9 @@ QString KWQTextDecoder::convertUTF16(const unsigned char *s, int length)
} else {
c = (_bufferedBytes[0] << 8) | p[0];
}
- result.append(reinterpret_cast<QChar *>(&c), 1);
+ if (c) {
+ result.append(reinterpret_cast<QChar *>(&c), 1);
+ }
_numBufferedBytes = 0;
p += 1;
len -= 1;
@@ -268,7 +270,7 @@ QString KWQTextDecoder::convertUTF16(const unsigned char *s, int length)
for (int i = 0; i < runLength; ++i) {
UniChar c = p[0] | (p[1] << 8);
p += 2;
- if (c != BOM) {
+ if (c && c != BOM) {
buffer[bufferLength++] = c;
}
}
@@ -276,7 +278,7 @@ QString KWQTextDecoder::convertUTF16(const unsigned char *s, int length)
for (int i = 0; i < runLength; ++i) {
UniChar c = (p[0] << 8) | p[1];
p += 2;
- if (c != BOM) {
+ if (c && c != BOM) {
buffer[bufferLength++] = c;
}
}
@@ -317,13 +319,14 @@ OSStatus KWQTextDecoder::createTECConverter()
return noErr;
}
-void KWQTextDecoder::appendOmittingBOMs(QString &s, const UniChar *characters, int byteCount)
+void KWQTextDecoder::appendOmittingNullsAndBOMs(QString &s, const UniChar *characters, int byteCount)
{
ASSERT(byteCount % sizeof(UniChar) == 0);
int start = 0;
int characterCount = byteCount / sizeof(UniChar);
for (int i = 0; i != characterCount; ++i) {
- if (characters[i] == BOM) {
+ UniChar c = characters[i];
+ if (c == 0 || c == BOM) {
if (start != i) {
s.append(reinterpret_cast<const QChar *>(&characters[start]), i - start);
}
@@ -442,13 +445,13 @@ QString KWQTextDecoder::convertUsingTEC(const unsigned char *chs, int len, bool
return QString();
}
- appendOmittingBOMs(result, buffer, bytesWritten);
+ appendOmittingNullsAndBOMs(result, buffer, bytesWritten);
}
if (flush) {
unsigned long bytesWritten = 0;
TECFlushText(_converter, reinterpret_cast<unsigned char *>(buffer), sizeof(buffer), &bytesWritten);
- appendOmittingBOMs(result, buffer, bytesWritten);
+ appendOmittingNullsAndBOMs(result, buffer, bytesWritten);
}
// Workaround for a bug in the Text Encoding Converter (see bug 3225472).
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list