[Webkit-unassigned] [Bug 51374] Cairo's ContextShadow may mis-render some box shadows
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Dec 20 21:22:24 PST 2010
https://bugs.webkit.org/show_bug.cgi?id=51374
Simon Fraser (smfr) <simon.fraser at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |simon.fraser at apple.com
--- Comment #2 from Simon Fraser (smfr) <simon.fraser at apple.com> 2010-12-20 21:22:24 PST ---
I think the top of ContextShadow::drawRectShadow() should read:
float radiusTwice = m_blurDistance * 2;
// Size of the tiling side.
int sideTileWidth = 1;
// Find the extra space needed from the curve of the corners.
int extraWidthFromCornerRadii = radiusTwice + max(topLeftRadius.width(), bottomLeftRadius.width()) +
radiusTwice + max(topRightRadius.width(), bottomRightRadius.width());
int extraHeightFromCornerRadii = radiusTwice + max(topLeftRadius.height(), topRightRadius.height()) +
radiusTwice + max(bottomLeftRadius.height(), bottomRightRadius.height());
// The length of a side of the buffer is the enough space for four blur radii,
// the radii of the corners, and then 1 pixel to draw the side tiles.
IntSize shadowTemplateSize = IntSize(sideTileWidth + extraWidthFromCornerRadii,
sideTileWidth + extraHeightFromCornerRadii);
// drawShadowedRect still does not work with rotations.
// https://bugs.webkit.org/show_bug.cgi?id=45042
CGContextRef cgContext = context->platformContext();
if ((!context->getCTM().isIdentityOrTranslationOrFlipped()) || (shadowTemplateSize.width() > rect.width())
|| (shadowTemplateSize.height() > rect.height()) || (m_type != BlurShadow)) {
drawRectShadowWithoutTiling(cgContext, rect, topLeftRadius, topRightRadius, bottomLeftRadius, bottomRightRadius, 1);
return;
}
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list