mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 11:26:09 +00:00
bug 1333749 - verify that inset box shadows are symmetric before attempting to mirror them. r=mchang
MozReview-Commit-ID: 2q3WH25PWSs
This commit is contained in:
parent
456dec1f00
commit
f72fa46b41
@ -1245,7 +1245,13 @@ gfxAlphaBoxBlur::BlurInsetBox(gfxContext* aDestinationCtx,
|
||||
GetInsetBoxShadowRects(blurMargin, innerMargin, aShadowClipRect,
|
||||
aDestinationRect, whitespaceRect, outerRect);
|
||||
|
||||
bool mirrorCorners = !aInnerClipRadii || aInnerClipRadii->AreRadiiSame();
|
||||
// Check that the inset margin between the outer and whitespace rects is symmetric,
|
||||
// and that all corner radii are the same, in which case the blur can be mirrored.
|
||||
Margin checkMargin = outerRect - whitespaceRect;
|
||||
bool mirrorCorners =
|
||||
checkMargin.left == checkMargin.right &&
|
||||
checkMargin.top == checkMargin.bottom &&
|
||||
(!aInnerClipRadii || aInnerClipRadii->AreRadiiSame());
|
||||
RefPtr<SourceSurface> minBlur =
|
||||
GetInsetBlur(outerRect, whitespaceRect, useDestRect, aShadowColor,
|
||||
aBlurRadius, aInnerClipRadii, destDrawTarget, mirrorCorners);
|
||||
|
Loading…
Reference in New Issue
Block a user