From ebcb5ad8366ae511ba30795de7c77a21838ccaca Mon Sep 17 00:00:00 2001 From: "pierre%netscape.com" Date: Wed, 1 Dec 1999 04:10:02 +0000 Subject: [PATCH] 18163 "Use of fixed positioning in style sheet corrupts display". Don't create empty widgets for fixed positioned elements in order to avoid problems in the View Manager (GetDrawingSurface) where we end up copying uninitialized bitmaps to the screen. The main reason for fixing the bug here instead of within the View Manager is that we'll get rid of widgets altogether over time. git-svn-id: svn://10.0.0.236/trunk@54860 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/generic/nsHTMLContainerFrame.cpp | 5 ++++- mozilla/layout/html/base/src/nsHTMLContainerFrame.cpp | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/mozilla/layout/generic/nsHTMLContainerFrame.cpp b/mozilla/layout/generic/nsHTMLContainerFrame.cpp index ab4863a8c39..a2e76bec1f7 100644 --- a/mozilla/layout/generic/nsHTMLContainerFrame.cpp +++ b/mozilla/layout/generic/nsHTMLContainerFrame.cpp @@ -468,7 +468,10 @@ nsHTMLContainerFrame::CreateViewForFrame(nsIPresContext* aPresContext, aStyleContext->GetStyleData(eStyleStruct_Position); if (NS_STYLE_POSITION_FIXED == position->mPosition) { - view->CreateWidget(kCChildCID); + nsRect rect; + view->GetBounds(rect); + if (! rect.IsEmpty()) + view->CreateWidget(kCChildCID); } viewManager->SetViewOpacity(view, color->mOpacity); diff --git a/mozilla/layout/html/base/src/nsHTMLContainerFrame.cpp b/mozilla/layout/html/base/src/nsHTMLContainerFrame.cpp index ab4863a8c39..a2e76bec1f7 100644 --- a/mozilla/layout/html/base/src/nsHTMLContainerFrame.cpp +++ b/mozilla/layout/html/base/src/nsHTMLContainerFrame.cpp @@ -468,7 +468,10 @@ nsHTMLContainerFrame::CreateViewForFrame(nsIPresContext* aPresContext, aStyleContext->GetStyleData(eStyleStruct_Position); if (NS_STYLE_POSITION_FIXED == position->mPosition) { - view->CreateWidget(kCChildCID); + nsRect rect; + view->GetBounds(rect); + if (! rect.IsEmpty()) + view->CreateWidget(kCChildCID); } viewManager->SetViewOpacity(view, color->mOpacity);