[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:49:29 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 00ae991f24c209cf040eb5477f3625dec324f57f
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Jul 30 22:19:36 2003 +0000
Add support for setting the text-shadow's color. This uses a new CG API,
so updating to a fairly recent Panther is required.
Reviewed by rjw
* khtml/css/cssparser.cpp:
(CSSParser::parseShadow):
* kwq/KWQPainter.mm:
(QPainter::setShadow):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4737 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 2a66c93..2ee290b 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,15 @@
+2003-07-30 Dave Hyatt <hyatt at apple.com>
+
+ Add support for setting the text-shadow's color. This uses a new CG API,
+ so updating to a fairly recent Panther is required.
+
+ Reviewed by rjw
+
+ * khtml/css/cssparser.cpp:
+ (CSSParser::parseShadow):
+ * kwq/KWQPainter.mm:
+ (QPainter::setShadow):
+
2003-07-30 John Sullivan <sullivan at apple.com>
- fixed 3346460 -- images > area (2048x2048) are compressed vertically
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 2a66c93..2ee290b 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,15 @@
+2003-07-30 Dave Hyatt <hyatt at apple.com>
+
+ Add support for setting the text-shadow's color. This uses a new CG API,
+ so updating to a fairly recent Panther is required.
+
+ Reviewed by rjw
+
+ * khtml/css/cssparser.cpp:
+ (CSSParser::parseShadow):
+ * kwq/KWQPainter.mm:
+ (QPainter::setShadow):
+
2003-07-30 John Sullivan <sullivan at apple.com>
- fixed 3346460 -- images > area (2048x2048) are compressed vertically
diff --git a/WebCore/khtml/css/cssparser.cpp b/WebCore/khtml/css/cssparser.cpp
index 056de50..2b285d8 100644
--- a/WebCore/khtml/css/cssparser.cpp
+++ b/WebCore/khtml/css/cssparser.cpp
@@ -1793,7 +1793,7 @@ bool CSSParser::parseShadow( int propId, bool important )
if (isColor) {
if (!context.allowColor)
return context.failed();
- parsedColor = new CSSPrimitiveValueImpl(id);
+ parsedColor = new CSSPrimitiveValueImpl(val->id);
}
if (!parsedColor)
diff --git a/WebCore/kwq/KWQPainter.mm b/WebCore/kwq/KWQPainter.mm
index c530b71..27c445d 100644
--- a/WebCore/kwq/KWQPainter.mm
+++ b/WebCore/kwq/KWQPainter.mm
@@ -586,11 +586,25 @@ void QPainter::endTransparencyLayer()
void QPainter::setShadow(int x, int y, int blur, const QColor& color)
{
- // FIXME: When CG supports setting the shadow color, we will use it here. An invalid
- // color should be checked for, as this means that the color was not set for the shadow
- // and we should therefore do nothing in that case.
+ // 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]);
- CGContextSetShadow(context, CGSizeMake(x,-y), blur); // y is flipped.
+ 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 };
+
+ CGContextSetShadowWithColor(context,
+ CGSizeMake(x,-y), // y is flipped.
+ blur,
+ CGColorCreate(CGColorSpaceCreateDeviceRGB(),
+ components));
+ }
}
void QPainter::clearShadow()
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list