Permalink
Browse files

Bug 759457. Don't fast path shadows with negative scale. r=roc,a=akeybl

We don't support this yet, so don't bother trying.
  • Loading branch information...
1 parent d81025b commit 3906b0c059fdfd5a95abaded5c090006934108d7 @jrmuizel jrmuizel committed May 31, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 layout/base/nsCSSRendering.cpp
@@ -4247,12 +4247,12 @@ nsContextBoxBlur::Init(const nsRect& aRect, nscoord aSpreadRadius,
gfxFloat scaleX = 1;
gfxFloat scaleY = 1;
- // Do blurs in device space when possible
- // If the scale is not uniform we fall back to transforming on paint.
+ // Do blurs in device space when possible.
// Chrome/Skia always does the blurs in device space
// and will sometimes get incorrect results (e.g. rotated blurs)
gfxMatrix transform = aDestinationCtx->CurrentMatrix();
- if (transform.HasNonAxisAlignedTransform()) {
+ // XXX: we could probably handle negative scales but for now it's easier just to fallback
+ if (transform.HasNonAxisAlignedTransform() || transform.xx <= 0.0 || transform.yy <= 0.0) {
transform = gfxMatrix();
} else {
scaleX = transform.xx;

0 comments on commit 3906b0c

Please sign in to comment.