From e6e994595a13597f0168865a0c51fcab086c8d48 Mon Sep 17 00:00:00 2001 From: "troy%netscape.com" Date: Mon, 1 Feb 1999 18:36:23 +0000 Subject: [PATCH] Made sure that fixed positioned elements gets a widget --- layout/html/base/src/nsScrollFrame.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/layout/html/base/src/nsScrollFrame.cpp b/layout/html/base/src/nsScrollFrame.cpp index b823b71b153..01bcf70262b 100644 --- a/layout/html/base/src/nsScrollFrame.cpp +++ b/layout/html/base/src/nsScrollFrame.cpp @@ -34,9 +34,9 @@ static NS_DEFINE_IID(kWidgetCID, NS_CHILD_CID); static NS_DEFINE_IID(kScrollingViewCID, NS_SCROLLING_VIEW_CID); -static NS_DEFINE_IID(kIViewIID, NS_IVIEW_IID); - static NS_DEFINE_IID(kViewCID, NS_VIEW_CID); + +static NS_DEFINE_IID(kIViewIID, NS_IVIEW_IID); static NS_DEFINE_IID(kScrollViewIID, NS_ISCROLLABLEVIEW_IID); static NS_DEFINE_IID(kAreaFrameIID, NS_IAREAFRAME_IID); @@ -169,6 +169,11 @@ nsScrollFrame::CreateScrollingView() // inform the view manager that we have transparent content viewManager->SetViewContentTransparency(view, PR_TRUE); + // XXX If it's fixed positioned, then create a widget too + if (NS_STYLE_POSITION_FIXED == position->mPosition) { + view->CreateWidget(kWidgetCID); + } + // Get the nsIScrollableView interface nsIScrollableView* scrollingView; view->QueryInterface(kScrollViewIID, (void**)&scrollingView);