[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 08:23:59 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 48cbbecf1fd7c6a93f77d123b9faca3a8e0fcb0b
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Jan 27 01:47:26 2004 +0000

            Reviewed by Dave.
    
            - fixed <rdar://problem/3539286>: text with a transparent background color pastes as black on black
    
            * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::attributedString): Don't put color in the mutable
            string if it's entirely transparent.
            * kwq/KWQColor.mm: (QColor::getNSColor): Fix bug where we would return nil for RGBA of 0.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5985 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 1c1be6c..e2514e1 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,15 @@
 2004-01-26  Darin Adler  <darin at apple.com>
 
+        Reviewed by Dave.
+
+        - fixed <rdar://problem/3539286>: text with a transparent background color pastes as black on black
+
+        * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::attributedString): Don't put color in the mutable
+        string if it's entirely transparent.
+        * kwq/KWQColor.mm: (QColor::getNSColor): Fix bug where we would return nil for RGBA of 0.
+
+2004-01-26  Darin Adler  <darin at apple.com>
+
         Reviewed by Maciej.
 
         - fixed <rdar://problem/3529120>: text-align style property not respected on input fields
diff --git a/WebCore/kwq/KWQColor.mm b/WebCore/kwq/KWQColor.mm
index e190d1a..af3f96f 100644
--- a/WebCore/kwq/KWQColor.mm
+++ b/WebCore/kwq/KWQColor.mm
@@ -221,6 +221,11 @@ NSColor *QColor::getNSColor() const
 {
     unsigned c = color & 0xFFFFFFFF;
     switch (c) {
+        case 0: {
+            // Need this to avoid returning nil because cachedRGBAValues will default to 0.
+            static NSColor *clearColor = [[NSColor clearColor] retain];
+            return clearColor;
+        }
         case Qt::black: {
             static NSColor *blackColor = [[NSColor blackColor] retain];
             return blackColor;
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index 84974c4..984dae8 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -2327,9 +2327,9 @@ NSAttributedString *KWQKHTMLPart::attributedString(NodeImpl *_start, int startOf
                 if (text.length() > 0 || needSpace) {
                     NSMutableDictionary *attrs = [[NSMutableDictionary alloc] init];
                     [attrs setObject:font forKey:NSFontAttributeName];
-                    if (style && style->color().isValid())
+                    if (style && style->color().isValid() && qAlpha(style->color().rgb()) != 0)
                         [attrs setObject:style->color().getNSColor() forKey:NSForegroundColorAttributeName];
-                    if (style && style->backgroundColor().isValid())
+                    if (style && style->backgroundColor().isValid() && qAlpha(style->backgroundColor().rgb()) != 0)
                         [attrs setObject:style->backgroundColor().getNSColor() forKey:NSBackgroundColorAttributeName];
 
                     if (text.length() > 0) {

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list