From 722bca28f893a0e617935d9711e666002fe90109 Mon Sep 17 00:00:00 2001 From: "roc+%cs.cmu.edu" Date: Sun, 28 Mar 2004 21:05:29 +0000 Subject: [PATCH] Bug 236910. Elements that clip their backgrounds do not present a uniform background. r+sr=dbaron,a=choffman git-svn-id: svn://10.0.0.236/trunk@154348 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/generic/nsContainerFrame.cpp | 5 ++++- mozilla/layout/html/base/src/nsContainerFrame.cpp | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/mozilla/layout/generic/nsContainerFrame.cpp b/mozilla/layout/generic/nsContainerFrame.cpp index 90b18c2602b..7fe62c84574 100644 --- a/mozilla/layout/generic/nsContainerFrame.cpp +++ b/mozilla/layout/generic/nsContainerFrame.cpp @@ -561,10 +561,13 @@ SyncFrameViewGeometryDependentProperties(nsIPresContext* aPresContext, PRBool scrollFrameHasBG = nsCSSRendering::FindBackground(aPresContext, scrollFrame, &scrollFrameBG, &scrollFrameIsCanvas); + const nsStyleDisplay* bgDisplay = scrollFrame->GetStyleDisplay(); drawnOnUniformField = scrollFrameHasBG && !(scrollFrameBG->mBackgroundFlags & NS_STYLE_BG_COLOR_TRANSPARENT) && (scrollFrameBG->mBackgroundFlags & NS_STYLE_BG_IMAGE_NONE) && - !HasNonZeroBorderRadius(scrollFrame->GetStyleContext()); + !HasNonZeroBorderRadius(scrollFrame->GetStyleContext()) && + !(bgDisplay->IsAbsolutelyPositioned() + && (bgDisplay->mClipFlags & NS_STYLE_CLIP_RECT)); } aView->SetHasUniformBackground(drawnOnUniformField); diff --git a/mozilla/layout/html/base/src/nsContainerFrame.cpp b/mozilla/layout/html/base/src/nsContainerFrame.cpp index 90b18c2602b..7fe62c84574 100644 --- a/mozilla/layout/html/base/src/nsContainerFrame.cpp +++ b/mozilla/layout/html/base/src/nsContainerFrame.cpp @@ -561,10 +561,13 @@ SyncFrameViewGeometryDependentProperties(nsIPresContext* aPresContext, PRBool scrollFrameHasBG = nsCSSRendering::FindBackground(aPresContext, scrollFrame, &scrollFrameBG, &scrollFrameIsCanvas); + const nsStyleDisplay* bgDisplay = scrollFrame->GetStyleDisplay(); drawnOnUniformField = scrollFrameHasBG && !(scrollFrameBG->mBackgroundFlags & NS_STYLE_BG_COLOR_TRANSPARENT) && (scrollFrameBG->mBackgroundFlags & NS_STYLE_BG_IMAGE_NONE) && - !HasNonZeroBorderRadius(scrollFrame->GetStyleContext()); + !HasNonZeroBorderRadius(scrollFrame->GetStyleContext()) && + !(bgDisplay->IsAbsolutelyPositioned() + && (bgDisplay->mClipFlags & NS_STYLE_CLIP_RECT)); } aView->SetHasUniformBackground(drawnOnUniformField);