Fix bug 313498 -- no need for aPresContext in GetOptionsContainer. r+sr=roc.

git-svn-id: svn://10.0.0.236/trunk@182852 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu
2005-10-23 22:11:27 +00:00
parent 26d108cb4a
commit ebec986940
3 changed files with 7 additions and 23 deletions

View File

@@ -436,8 +436,7 @@ void nsListControlFrame::PaintFocus(nsIRenderingContext& aRC, nsFramePaintLayer
nsIPresShell *presShell = presContext->GetPresShell();
if (!presShell) return;
nsIFrame* containerFrame;
GetOptionsContainer(presContext, &containerFrame);
nsIFrame* containerFrame = GetOptionsContainer();
if (!containerFrame) return;
nsIFrame * childframe = nsnull;
@@ -931,9 +930,7 @@ nsListControlFrame::Reflow(nsPresContext* aPresContext,
// list by using the tallest of the grandchildren, since there may be
// option groups in addition to option elements, either of which may
// be visible or invisible.
nsIFrame *optionsContainer;
GetOptionsContainer(aPresContext, &optionsContainer);
PRInt32 heightOfARow = GetMaxOptionHeight(optionsContainer);
PRInt32 heightOfARow = GetMaxOptionHeight(GetOptionsContainer());
// Check to see if we have zero items
PRInt32 length = 0;
@@ -1214,9 +1211,7 @@ nsListControlFrame::IsOptionElement(nsIContent* aContent)
nsIFrame*
nsListControlFrame::GetContentInsertionFrame() {
nsIFrame* frame;
GetOptionsContainer(GetPresContext(), &frame);
return frame->GetContentInsertionFrame();
return GetOptionsContainer()->GetContentInsertionFrame();
}
//---------------------------------------------------------
@@ -2167,14 +2162,6 @@ nsListControlFrame::ComboboxFinish(PRInt32 aIndex)
return NS_OK;
}
NS_IMETHODIMP
nsListControlFrame::GetOptionsContainer(nsPresContext* aPresContext,
nsIFrame** aFrame)
{
*aFrame = GetScrolledFrame();
return NS_OK;
}
// Send out an onchange notification.
NS_IMETHODIMP
nsListControlFrame::FireOnChange()