[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 06:49:31 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit eae38956c8e5a1080591b5c0f34cd6457337ef6f
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Oct 14 23:27:19 2002 +0000

    	Fixed problems with named colors.
    
            * kwq/KWQColor.mm: (QColor::setNamedColor): Check named colors before
    	hex codes for colors because our hex code parsing is now lenient enough
    	that many names qualify.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2320 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index f4bee39..e91ee88 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,11 @@
+2002-10-14  Darin Adler  <darin at apple.com>
+
+	Fixed problems with named colors.
+
+        * kwq/KWQColor.mm: (QColor::setNamedColor): Check named colors before
+	hex codes for colors because our hex code parsing is now lenient enough
+	that many names qualify.
+
 2002-10-14  David Hyatt  <hyatt at apple.com>
 
 	Really fixing zeldman.com this time.  This disabling stuff
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index f4bee39..e91ee88 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,11 @@
+2002-10-14  Darin Adler  <darin at apple.com>
+
+	Fixed problems with named colors.
+
+        * kwq/KWQColor.mm: (QColor::setNamedColor): Check named colors before
+	hex codes for colors because our hex code parsing is now lenient enough
+	that many names qualify.
+
 2002-10-14  David Hyatt  <hyatt at apple.com>
 
 	Really fixing zeldman.com this time.  This disabling stuff
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index f4bee39..e91ee88 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,11 @@
+2002-10-14  Darin Adler  <darin at apple.com>
+
+	Fixed problems with named colors.
+
+        * kwq/KWQColor.mm: (QColor::setNamedColor): Check named colors before
+	hex codes for colors because our hex code parsing is now lenient enough
+	that many names qualify.
+
 2002-10-14  David Hyatt  <hyatt at apple.com>
 
 	Really fixing zeldman.com this time.  This disabling stuff
diff --git a/WebCore/kwq/KWQColor.mm b/WebCore/kwq/KWQColor.mm
index fd2ca03..b285d75 100644
--- a/WebCore/kwq/KWQColor.mm
+++ b/WebCore/kwq/KWQColor.mm
@@ -313,27 +313,25 @@ void QColor::setNamedColor(const QString &name)
     // [kocienda: 2001-11-08]: I've made some improvements
     // but it's still a crock.
     
-    int r, g, b;
-    
     if (name.isEmpty()) {
         color = KWQInvalidColor;
+        return;
     } 
-    else if (decodeColorFromHexColorString(name, &r, &g, &b)) {
+    
+    int r, g, b;
+    NSString *hexString = [getNamedColors() objectForKey:[name.getNSString() lowercaseString]];
+    if (hexString && decodeColorFromHexColorString(QString::fromNSString(hexString), &r, &g, &b)) {
         setRgb(r, g, b);
-    } 
-    else {
-        NSString *hexString;
-        
-        hexString = [getNamedColors() objectForKey:[name.getNSString() lowercaseString]];
-        
-        if (hexString && decodeColorFromHexColorString(QString::fromNSString(hexString), &r, &g, &b)) {
-            setRgb(r, g, b);
-        }
-        else {
-            ERROR("couldn't create color using name %s", name.ascii());
-            color = KWQInvalidColor;
-        }
+        return;
     }
+
+    if (decodeColorFromHexColorString(name, &r, &g, &b)) {
+        setRgb(r, g, b);
+        return;
+    } 
+
+    ERROR("couldn't create color using name %s", name.ascii());
+    color = KWQInvalidColor;
 }
 
 void QColor::hsv(int *h, int *s, int *v) const

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list