[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
hyatt
hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:26:58 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 7977347fdcf68bfd6a6cc700b6d363bae0df9120
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Mar 3 22:47:22 2003 +0000
Fix for 3179084. Fix is to just dump our code so that the new
addHTMLColor code kicks in. This code is very close to WinIE
on more-colortests.html.
Reviewed by darin
* ChangeLog:
* kwq/KWQColor.mm:
(QColor::setNamedColor):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3730 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 53d9a05..5caa2a9 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,5 +1,17 @@
2003-03-03 David Hyatt <hyatt at apple.com>
+ Fix for 3179084. Fix is to just dump our code so that the new
+ addHTMLColor code kicks in. This code is very close to WinIE
+ on more-colortests.html.
+
+ Reviewed by darin
+
+ * ChangeLog:
+ * kwq/KWQColor.mm:
+ (QColor::setNamedColor):
+
+2003-03-03 David Hyatt <hyatt at apple.com>
+
Fix for 3178361, <th> don't draw borders. Boneheaded mistake
on my part. Just forgot to include it along with <td> in the
CSS hack for sharing cell rules.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 53d9a05..5caa2a9 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,17 @@
2003-03-03 David Hyatt <hyatt at apple.com>
+ Fix for 3179084. Fix is to just dump our code so that the new
+ addHTMLColor code kicks in. This code is very close to WinIE
+ on more-colortests.html.
+
+ Reviewed by darin
+
+ * ChangeLog:
+ * kwq/KWQColor.mm:
+ (QColor::setNamedColor):
+
+2003-03-03 David Hyatt <hyatt at apple.com>
+
Fix for 3178361, <th> don't draw borders. Boneheaded mistake
on my part. Just forgot to include it along with <td> in the
CSS hack for sharing cell rules.
diff --git a/WebCore/kwq/KWQColor.mm b/WebCore/kwq/KWQColor.mm
index 0d949b2..2a4092f 100644
--- a/WebCore/kwq/KWQColor.mm
+++ b/WebCore/kwq/KWQColor.mm
@@ -74,83 +74,6 @@ QString QColor::name() const
return name;
}
-// This tolerates bad hex digits, because that's what other web browsers do too.
-static int hex2int(QChar hexchar)
-{
- int v;
-
- if (hexchar.isDigit())
- v = hexchar.digitValue();
- else if (hexchar >= 'a' && hexchar <= 'f')
- v = hexchar.cell() - 'a' + 10;
- else
- v = 0;
-
- return v;
-}
-
-static bool decodeColorFromHexColorString(const QString &string, int *r, int *g, int *b)
-{
- int len = string.length();
- int offset = 0;
-
- while (len) {
- QChar c = string[offset];
- if (!(c == '#' || c == '"' || c == '\'')) {
- break;
- }
- len -= 1;
- offset += 1;
- }
-
- while (len) {
- QChar c = string[offset + len - 1];
- if (!(c == '"' || c == '\'')) {
- break;
- }
- len -= 1;
- }
-
- if (len == 0)
- return false;
-
- switch (len) {
- case 12:
- *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 11:
- case 10:
- case 9:
- *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 8:
- case 7:
- case 6:
- *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 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]) * 0x11;
- return true;
- case 4:
- case 3:
- // Convert 0 to F to 0 to 255.
- *r = hex2int(string[0+offset]) * 0x11;
- *g = hex2int(string[1+offset]) * 0x11;
- *b = hex2int(string[2+offset]) * 0x11;
- return true;
- }
-
- return false;
-}
-
void QColor::setNamedColor(const QString &name)
{
// FIXME: The combination of this code with the code that
@@ -167,7 +90,6 @@ void QColor::setNamedColor(const QString &name)
return;
}
- int r, g, b;
QString lowerName = name.lower();
const Color *foundColor = findColor(name.latin1(), name.length());
if (foundColor) {
@@ -176,11 +98,6 @@ void QColor::setNamedColor(const QString &name)
return;
}
- if (decodeColorFromHexColorString(lowerName, &r, &g, &b)) {
- setRgb(r, g, b);
- return;
- }
-
ERROR("couldn't create color using name %s", name.ascii());
color = KWQInvalidColor;
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list