From e592be8776c3bad35371689dc300416b4bf66cd5 Mon Sep 17 00:00:00 2001 From: "troy%netscape.com" Date: Wed, 13 Oct 1999 01:02:53 +0000 Subject: [PATCH] b=15509, r=peterl@netscape.com If the frame has visible content that extends outside its content area, then the view needs to be marked as having transparent content --- layout/base/nsCSSFrameConstructor.cpp | 11 +++++++++++ layout/generic/nsFrame.cpp | 8 ++++++++ layout/html/base/src/nsFrame.cpp | 8 ++++++++ layout/html/style/src/nsCSSFrameConstructor.cpp | 11 +++++++++++ 4 files changed, 38 insertions(+) diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index f383750db647..7cb16fe3cc11 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -7141,6 +7141,17 @@ SyncAndInvalidateView(nsIView* aView, nsIFrame* aFrame, } } + // If the frame has visible content that overflows the content area, then we + // need the view marked as having transparent content + if (NS_STYLE_OVERFLOW_VISIBLE == disp->mOverflow) { + nsFrameState frameState; + + aFrame->GetFrameState(&frameState); + if (frameState & NS_FRAME_OUTSIDE_CHILDREN) { + viewHasTransparentContent = PR_TRUE; + } + } + if (viewIsVisible) { aViewManager->SetViewContentTransparency(aView, viewHasTransparentContent); aViewManager->SetViewVisibility(aView, nsViewVisibility_kShow); diff --git a/layout/generic/nsFrame.cpp b/layout/generic/nsFrame.cpp index 06500389a3f2..8350cd9ff4db 100644 --- a/layout/generic/nsFrame.cpp +++ b/layout/generic/nsFrame.cpp @@ -1292,6 +1292,14 @@ nsFrame::DidReflow(nsIPresContext& aPresContext, } } + // If we have visible content that overflows the content area, then we + // need the view marked as having transparent content + if (NS_STYLE_OVERFLOW_VISIBLE == display->mOverflow) { + if (mState & NS_FRAME_OUTSIDE_CHILDREN) { + viewHasTransparentContent = PR_TRUE; + } + } + // Make sure visibility is correct vm->SetViewVisibility(mView, viewIsVisible ? nsViewVisibility_kShow : nsViewVisibility_kHide); diff --git a/layout/html/base/src/nsFrame.cpp b/layout/html/base/src/nsFrame.cpp index 06500389a3f2..8350cd9ff4db 100644 --- a/layout/html/base/src/nsFrame.cpp +++ b/layout/html/base/src/nsFrame.cpp @@ -1292,6 +1292,14 @@ nsFrame::DidReflow(nsIPresContext& aPresContext, } } + // If we have visible content that overflows the content area, then we + // need the view marked as having transparent content + if (NS_STYLE_OVERFLOW_VISIBLE == display->mOverflow) { + if (mState & NS_FRAME_OUTSIDE_CHILDREN) { + viewHasTransparentContent = PR_TRUE; + } + } + // Make sure visibility is correct vm->SetViewVisibility(mView, viewIsVisible ? nsViewVisibility_kShow : nsViewVisibility_kHide); diff --git a/layout/html/style/src/nsCSSFrameConstructor.cpp b/layout/html/style/src/nsCSSFrameConstructor.cpp index f383750db647..7cb16fe3cc11 100644 --- a/layout/html/style/src/nsCSSFrameConstructor.cpp +++ b/layout/html/style/src/nsCSSFrameConstructor.cpp @@ -7141,6 +7141,17 @@ SyncAndInvalidateView(nsIView* aView, nsIFrame* aFrame, } } + // If the frame has visible content that overflows the content area, then we + // need the view marked as having transparent content + if (NS_STYLE_OVERFLOW_VISIBLE == disp->mOverflow) { + nsFrameState frameState; + + aFrame->GetFrameState(&frameState); + if (frameState & NS_FRAME_OUTSIDE_CHILDREN) { + viewHasTransparentContent = PR_TRUE; + } + } + if (viewIsVisible) { aViewManager->SetViewContentTransparency(aView, viewHasTransparentContent); aViewManager->SetViewVisibility(aView, nsViewVisibility_kShow);