bug 130550 - Added nsIFrame::CanPaintBackground, to treat nsTableOuterFrame as transparent. a=asa, sr=attinasi, r=roc+moz

This commit is contained in:
karnaze%netscape.com 2002-03-31 22:43:40 +00:00
parent 0287dad088
commit 7bb0f90ec2
6 changed files with 24 additions and 4 deletions

View File

@ -686,6 +686,12 @@ public:
nsFramePaintLayer aWhichLayer,
PRUint32 aFlags = 0) = 0;
/*
* Does the frame paint its background. If not, then all or part of it will be
* painted by ancestors.
*/
virtual PRBool CanPaintBackground() { return PR_TRUE; }
/**
* Event handling of GUI events.
*

View File

@ -552,8 +552,9 @@ nsContainerFrame::SyncFrameViewAfterReflow(nsIPresContext* aPresContext,
// See if the view should be hidden or visible
PRBool viewIsVisible = PR_TRUE;
PRBool viewHasTransparentContent =
(!hasBG ||
(bg->mBackgroundFlags & NS_STYLE_BG_COLOR_TRANSPARENT));
(!hasBG ||
(bg->mBackgroundFlags & NS_STYLE_BG_COLOR_TRANSPARENT) ||
!aFrame->CanPaintBackground());
if (isCanvas && viewHasTransparentContent) {
nsIView* rootView;
vm->GetRootView(rootView);

View File

@ -686,6 +686,12 @@ public:
nsFramePaintLayer aWhichLayer,
PRUint32 aFlags = 0) = 0;
/*
* Does the frame paint its background. If not, then all or part of it will be
* painted by ancestors.
*/
virtual PRBool CanPaintBackground() { return PR_TRUE; }
/**
* Event handling of GUI events.
*

View File

@ -552,8 +552,9 @@ nsContainerFrame::SyncFrameViewAfterReflow(nsIPresContext* aPresContext,
// See if the view should be hidden or visible
PRBool viewIsVisible = PR_TRUE;
PRBool viewHasTransparentContent =
(!hasBG ||
(bg->mBackgroundFlags & NS_STYLE_BG_COLOR_TRANSPARENT));
(!hasBG ||
(bg->mBackgroundFlags & NS_STYLE_BG_COLOR_TRANSPARENT) ||
!aFrame->CanPaintBackground());
if (isCanvas && viewHasTransparentContent) {
nsIView* rootView;
vm->GetRootView(rootView);

View File

@ -134,6 +134,9 @@ public:
nsFramePaintLayer aWhichLayer,
PRUint32 aFlags = 0);
// the outer table does not paint its entire background if it has margins and/or captions
virtual PRBool CanPaintBackground() { return PR_FALSE; }
NS_IMETHOD GetFrameForPoint(nsIPresContext* aPresContext,
const nsPoint& aPoint,
nsFramePaintLayer aWhichLayer,

View File

@ -134,6 +134,9 @@ public:
nsFramePaintLayer aWhichLayer,
PRUint32 aFlags = 0);
// the outer table does not paint its entire background if it has margins and/or captions
virtual PRBool CanPaintBackground() { return PR_FALSE; }
NS_IMETHOD GetFrameForPoint(nsIPresContext* aPresContext,
const nsPoint& aPoint,
nsFramePaintLayer aWhichLayer,