[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 08:49:37 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 5b9133d2dddd0e649f9ec836389fc3a167072d7c
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Jul 12 22:03:21 2004 +0000

            Reviewed by John.
    
    	<rdar://problem/3706080>: (REGRESSION (125.8-147u): Nested <ul> do not display bullets)
    	<rdar://problem/3676376>: (Second level bullets not printed when printing Xcode release notes)
    
            * kwq/KWQPainter.h:
            * kwq/KWQPainter.mm:
            (CGColorFromNSColor):
            (QPainter::drawEllipse):
            (QPainter::setShadow):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@7005 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 37d0aa6..31fc185 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,16 @@
+2004-07-10  Maciej Stachowiak  <mjs at apple.com>
+
+        Reviewed by John.
+
+	<rdar://problem/3706080>: (REGRESSION (125.8-147u): Nested <ul> do not display bullets)
+	<rdar://problem/3676376>: (Second level bullets not printed when printing Xcode release notes)
+	
+        * kwq/KWQPainter.h:
+        * kwq/KWQPainter.mm:
+        (CGColorFromNSColor):
+        (QPainter::drawEllipse):
+        (QPainter::setShadow):
+
 2004-07-12  Ken Kocienda  <kocienda at apple.com>
 
         Reviewed by me
@@ -54,6 +67,7 @@
         The equivalence case is new, and fixes 3723359.
 
 
+>>>>>>> 1.2967
 2004-07-09  Kevin Decker  <kdecker at apple.com>
 
         Reviewed by Hyatt.
diff --git a/WebCore/kwq/KWQPainter.h b/WebCore/kwq/KWQPainter.h
index dbbab1b..898e555 100644
--- a/WebCore/kwq/KWQPainter.h
+++ b/WebCore/kwq/KWQPainter.h
@@ -142,7 +142,6 @@ private:
     void _setColorFromBrush();
     void _setColorFromPen();
 
-    // A fillRect designed to work around buggy behavior in NSRectFill.
     void _fillRect(float x, float y, float w, float h, const QColor& color);
     
     void _drawPoints(const QPointArray &_points, bool winding, int index, int _npoints, bool fill);
diff --git a/WebCore/kwq/KWQPainter.mm b/WebCore/kwq/KWQPainter.mm
index 12c2210..5d3eff4 100644
--- a/WebCore/kwq/KWQPainter.mm
+++ b/WebCore/kwq/KWQPainter.mm
@@ -70,6 +70,22 @@ struct QPainterPrivate {
     QColor focusRingColor;
 };
 
+
+static CGColorRef CGColorFromNSColor(NSColor *color)
+{
+    NSColor* deviceColor = [color colorUsingColorSpaceName: @"NSDeviceRGBColorSpace"];
+    float red = [deviceColor redComponent];
+    float green = [deviceColor greenComponent];
+    float blue = [deviceColor blueComponent];
+    float alpha = [deviceColor alphaComponent];
+    const float components[] = { red, green, blue, alpha };
+    
+    CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
+    CGColorRef cgColor = CGColorCreate(colorSpace, components);
+    CGColorSpaceRelease(colorSpace);
+    return cgColor;
+}
+
 QPainter::QPainter() : data(new QPainterPrivate), _isForPrinting(false), _usesInactiveTextBackgroundColor(false), _drawsFocusRing(true)
 {
 }
@@ -343,11 +359,24 @@ void QPainter::drawEllipse(int x, int y, int w, int h)
 
     if (data->state.brush.style() != NoBrush) {
         _setColorFromBrush();
-        CGContextFillPath(context);
+	if (data->state.pen.style() != NoPen) {
+	    // stroke and fill
+	    _setColorFromPen();
+	    uint penWidth = data->state.pen.width();
+	    if (penWidth == 0) 
+		penWidth++;
+	    CGContextSetLineWidth(context, penWidth);
+	    CGContextDrawPath(context, kCGPathFillStroke);
+	} else {
+	    CGContextFillPath(context);
+	}
     }
     if (data->state.pen.style() != NoPen) {
         _setColorFromPen();
-        CGContextSetLineWidth(context, data->state.pen.width());
+	uint penWidth = data->state.pen.width();
+	if (penWidth == 0) 
+	    penWidth++;
+        CGContextSetLineWidth(context, penWidth);
         CGContextStrokePath(context);
     }
 }
@@ -688,6 +717,7 @@ QColor QPainter::selectedTextBackgroundColor() const
     return QColor((int)(255 * [color redComponent]), (int)(255 * [color greenComponent]), (int)(255 * [color blueComponent]));
 }
 
+// A fillRect designed to work around buggy behavior in NSRectFill.
 void QPainter::_fillRect(float x, float y, float w, float h, const QColor& col)
 {
     [col.getNSColor() set];
@@ -752,24 +782,15 @@ void QPainter::setShadow(int x, int y, int blur, const QColor& color)
     // Check for an invalid color, as this means that the color was not set for the shadow
     // and we should therefore just use the default shadow color.
     CGContextRef context = (CGContextRef)([[NSGraphicsContext currentContext] graphicsPort]);
-    if (!color.isValid())
+    if (!color.isValid()) {
         CGContextSetShadow(context, CGSizeMake(x,-y), blur); // y is flipped.
-    else {
-        NSColor* deviceColor = [color.getNSColor() colorUsingColorSpaceName: @"NSDeviceRGBColorSpace"];
-        float red = [deviceColor redComponent];
-        float green = [deviceColor greenComponent];
-        float blue = [deviceColor blueComponent];
-        float alpha = [deviceColor alphaComponent];
-        const float components[] = { red, green, blue, alpha };
-        
-        CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
-        CGColorRef color = CGColorCreate(colorSpace, components);
-        CGColorSpaceRelease(colorSpace);
+    } else {
+	CGColorRef cgColor = CGColorFromNSColor(color.getNSColor());
         CGContextSetShadowWithColor(context,
                                     CGSizeMake(x,-y), // y is flipped.
                                     blur, 
-                                    color);
-        CGColorRelease(color);
+                                    cgColor);
+        CGColorRelease(cgColor);
     }
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list