[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:28:25 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 12b6c247788035055002565720aece179a627c7a
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Jul 31 02:14:21 2002 +0000
Don't create unnecessary unicode string. Of the
95695 unnecessary unicode allocations we do loading
the base test, this usage accounted for 7185. Most
of the others come from DOMString to QConstString to
QString to unicode() conversion during parsing. All
that unnecessary work needs to be removed.
* kwq/KWQColor.mm:
(decodeColorFromHexColorString):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1705 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index a9cc3ff..33da5e7 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,15 @@
+2002-07-30 Richard Williamson (local) <rjw at apple.com>
+
+ Don't create unnecessary unicode string. Of the
+ 95695 unnecessary unicode allocations we do loading
+ the base test, this usage accounted for 7185. Most
+ of the others come from DOMString to QConstString to
+ QString to unicode() conversion during parsing. All
+ that unnecessary work needs to be removed.
+
+ * kwq/KWQColor.mm:
+ (decodeColorFromHexColorString):
+
2002-07-30 David Hyatt <hyatt at apple.com>
Ok, this time i've got it. I hope. I think. Fingers crossed.
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index a9cc3ff..33da5e7 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,15 @@
+2002-07-30 Richard Williamson (local) <rjw at apple.com>
+
+ Don't create unnecessary unicode string. Of the
+ 95695 unnecessary unicode allocations we do loading
+ the base test, this usage accounted for 7185. Most
+ of the others come from DOMString to QConstString to
+ QString to unicode() conversion during parsing. All
+ that unnecessary work needs to be removed.
+
+ * kwq/KWQColor.mm:
+ (decodeColorFromHexColorString):
+
2002-07-30 David Hyatt <hyatt at apple.com>
Ok, this time i've got it. I hope. I think. Fingers crossed.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index a9cc3ff..33da5e7 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,15 @@
+2002-07-30 Richard Williamson (local) <rjw at apple.com>
+
+ Don't create unnecessary unicode string. Of the
+ 95695 unnecessary unicode allocations we do loading
+ the base test, this usage accounted for 7185. Most
+ of the others come from DOMString to QConstString to
+ QString to unicode() conversion during parsing. All
+ that unnecessary work needs to be removed.
+
+ * kwq/KWQColor.mm:
+ (decodeColorFromHexColorString):
+
2002-07-30 David Hyatt <hyatt at apple.com>
Ok, this time i've got it. I hope. I think. Fingers crossed.
diff --git a/WebCore/kwq/KWQColor.mm b/WebCore/kwq/KWQColor.mm
index 10f5ecc..c1c78ad 100644
--- a/WebCore/kwq/KWQColor.mm
+++ b/WebCore/kwq/KWQColor.mm
@@ -277,40 +277,41 @@ static int hex2int(QChar hexchar)
static bool decodeColorFromHexColorString(const QString &string, int *r, int *g, int *b)
{
int len = string.length();
+ int offset = 0;
+
if (len == 0)
return false;
- const QChar *p = string.unicode();
if (string[0] == '#') {
len -= 1;
- p += 1;
+ offset += 1;
}
for (int i = 0; i < len; i++)
- if (hex2int(p[i]) == -1)
+ if (hex2int(string[i+offset]) == -1)
return false;
switch (len) {
case 12:
- *r = (hex2int(p[0]) << 4) + hex2int(p[1]);
- *g = (hex2int(p[4]) << 4) + hex2int(p[5]);
- *b = (hex2int(p[8]) << 4) + hex2int(p[9]);
+ *r = (hex2int(string[0+offset]) << 4) + hex2int(string[1+offset]);
+ *g = (hex2int(string[4+offset]) << 4) + hex2int(string[5+offset]);
+ *b = (hex2int(string[8+offset]) << 4) + hex2int(string[9+offset]);
return true;
case 9:
- *r = (hex2int(p[0]) << 4) + hex2int(p[1]);
- *g = (hex2int(p[3]) << 4) + hex2int(p[4]);
- *b = (hex2int(p[6]) << 4) + hex2int(p[7]);
+ *r = (hex2int(string[0+offset]) << 4) + hex2int(string[1+offset]);
+ *g = (hex2int(string[3+offset]) << 4) + hex2int(string[4+offset]);
+ *b = (hex2int(string[6+offset]) << 4) + hex2int(string[7+offset]);
return true;
case 6:
- *r = (hex2int(p[0]) << 4) + hex2int(p[1]);
- *g = (hex2int(p[2]) << 4) + hex2int(p[3]);
- *b = (hex2int(p[4]) << 4) + hex2int(p[5]);
+ *r = (hex2int(string[0+offset]) << 4) + hex2int(string[1+offset]);
+ *g = (hex2int(string[2+offset]) << 4) + hex2int(string[3+offset]);
+ *b = (hex2int(string[4+offset]) << 4) + hex2int(string[5+offset]);
return true;
case 3:
// Convert 0 to F to 0 to 255.
- *r = hex2int(p[0]) * 0x11;
- *g = hex2int(p[1]) * 0x11;
- *b = hex2int(p[2]) * 0x11;
+ *r = hex2int(string[0+offset]) * 0x11;
+ *g = hex2int(string[1+offset]) * 0x11;
+ *b = hex2int(string[2+offset]) * 0x11;
return true;
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list