Title: [93957] trunk/Source/WebCore
- Revision
- 93957
- Author
- [email protected]
- Date
- 2011-08-29 00:34:19 -0700 (Mon, 29 Aug 2011)
Log Message
fast/canvas/shadow-offset-*.html fail on Leopard/Snow Leopard when removing the work around for <rdar://problem/5539388>.
https://bugs.webkit.org/show_bug.cgi?id=67107
Reviewed by David Levin.
No new tests. Effectively reverting the change from https://bugs.webkit.org/show_bug.cgi?id=67052 for Leopard and SL
because it caused test regressions on Leopard and SL, but not Lion.
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::setPlatformShadow):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (93956 => 93957)
--- trunk/Source/WebCore/ChangeLog 2011-08-29 07:16:18 UTC (rev 93956)
+++ trunk/Source/WebCore/ChangeLog 2011-08-29 07:34:19 UTC (rev 93957)
@@ -1,3 +1,16 @@
+2011-08-29 Matthew Delaney <[email protected]>
+
+ fast/canvas/shadow-offset-*.html fail on Leopard/Snow Leopard when removing the work around for <rdar://problem/5539388>.
+ https://bugs.webkit.org/show_bug.cgi?id=67107
+
+ Reviewed by David Levin.
+
+ No new tests. Effectively reverting the change from https://bugs.webkit.org/show_bug.cgi?id=67052 for Leopard and SL
+ because it caused test regressions on Leopard and SL, but not Lion.
+
+ * platform/graphics/cg/GraphicsContextCG.cpp:
+ (WebCore::GraphicsContext::setPlatformShadow):
+
2011-08-29 Zoltan Herczeg <[email protected]>
[Qt] Unreviewed minimal-build buildfix after r93937.
Modified: trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp (93956 => 93957)
--- trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp 2011-08-29 07:16:18 UTC (rev 93956)
+++ trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp 2011-08-29 07:34:19 UTC (rev 93957)
@@ -1021,6 +1021,21 @@
// Extreme "blur" values can make text drawing crash or take crazy long times, so clamp
blurRadius = min(blurRadius, narrowPrecisionToCGFloat(1000.0));
+#if defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_SNOW_LEOPARD)
+ // Work around <rdar://problem/5539388> by ensuring that the offsets will get truncated
+ // to the desired integer.
+ static const CGFloat extraShadowOffset = narrowPrecisionToCGFloat(1.0 / 128);
+ if (xOffset > 0)
+ xOffset += extraShadowOffset;
+ else if (xOffset < 0)
+ xOffset -= extraShadowOffset;
+
+ if (yOffset > 0)
+ yOffset += extraShadowOffset;
+ else if (yOffset < 0)
+ yOffset -= extraShadowOffset;
+#endif
+
// 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.
if (!color.isValid())
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes