More work-in-progress for fixed positioning

This commit is contained in:
troy@netscape.com
1999-01-28 17:14:13 +00:00
parent 803653cfd4
commit e9cc52dbc3
6 changed files with 558 additions and 54 deletions
@@ -41,8 +41,10 @@
#include "nsHTMLIIDs.h"
#include "nsDOMEvent.h"
#include "nsIScrollableView.h"
#include "nsWidgetsCID.h"
static NS_DEFINE_IID(kScrollViewIID, NS_ISCROLLABLEVIEW_IID);
static NS_DEFINE_IID(kCChildCID, NS_CHILD_CID);
NS_IMETHODIMP
nsHTMLContainerFrame::Paint(nsIPresContext& aPresContext,
@@ -213,7 +215,7 @@ nsHTMLContainerFrame::CreateViewForFrame(nsIPresContext& aPresContext,
aFrame));
aForce = PR_TRUE;
} else if (NS_STYLE_POSITION_ABSOLUTE == position->mPosition) {
} else if (position->IsAbsolutelyPositioned()) {
NS_FRAME_LOG(NS_FRAME_TRACE_CALLS,
("nsHTMLContainerFrame::CreateViewForFrame: frame=%p relatively positioned",
aFrame));
@@ -326,6 +328,12 @@ nsHTMLContainerFrame::CreateViewForFrame(nsIPresContext& aPresContext,
viewManager->SetViewContentTransparency(view, PR_TRUE);
}
// XXX If it's fixed positioned, then create a widget so it floats
// above the scrolling area
if (NS_STYLE_POSITION_FIXED == position->mPosition) {
view->CreateWidget(kCChildCID);
}
viewManager->SetViewOpacity(view, color->mOpacity);
NS_RELEASE(viewManager);
}