From 91a7d5165edda5e919c24d5b0a04875576df3cd3 Mon Sep 17 00:00:00 2001 From: Robert O'Callahan Date: Tue, 4 Jan 2011 23:40:02 +1300 Subject: [PATCH] Bug 615794. Part 5: Don't abort in RoundedRectIntersectsRect, just check whether we intersect the frame border-box. r=dbaron a=blocking --- layout/base/nsDisplayList.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/layout/base/nsDisplayList.cpp b/layout/base/nsDisplayList.cpp index b5c10a15186..7bad52cd3a5 100644 --- a/layout/base/nsDisplayList.cpp +++ b/layout/base/nsDisplayList.cpp @@ -832,9 +832,9 @@ RoundedBorderIntersectsRect(nsIFrame* aFrame, const nsPoint& aFrameToReferenceFrame, const nsRect& aTestRect) { - NS_ABORT_IF_FALSE(nsRect(aFrameToReferenceFrame, - aFrame->GetSize()).Intersects(aTestRect), - "must intersect non-rounded rect"); + if (!nsRect(aFrameToReferenceFrame, aFrame->GetSize()).Intersects(aTestRect)) + return PR_FALSE; + nscoord radii[8]; return !aFrame->GetBorderRadii(radii) || RoundedRectIntersectsRect(nsRect(aFrameToReferenceFrame, @@ -861,9 +861,8 @@ nsDisplayBackground::HitTest(nsDisplayListBuilder* aBuilder, HitTestState* aState, nsTArray *aOutFrames) { - // Note that we have to check !mIsThemed here to avoid triggering the - // assertion in RoundedBorderIntersectsRect, since when mIsThemed, our - // bounds can be different from the frame bounds. + // For theme backgrounds, assume that any point in our bounds is a hit. + // We don't know the true hit region of the theme background. if (!mIsThemed && !RoundedBorderIntersectsRect(mFrame, ToReferenceFrame(), aRect)) { // aRect doesn't intersect our border-radius curve.