Bug 1041207. nsListBoxBodyFrame::Init shouldn't call nsLayoutUtils::GetScrollableFrameFor since it's not the scrolled frame yet. r=mattwoodrow

--HG--
extra : rebase_source : 97ad4db1b77775c632c407185df9db1ad0ff411a
This commit is contained in:
Robert O'Callahan 2014-07-22 01:55:26 +12:00
parent b51510d73a
commit 7766485b13

View File

@ -185,7 +185,9 @@ nsListBoxBodyFrame::Init(nsIContent* aContent,
nsIFrame* aPrevInFlow)
{
nsBoxFrame::Init(aContent, aParent, aPrevInFlow);
nsIScrollableFrame* scrollFrame = nsLayoutUtils::GetScrollableFrameFor(this);
// Don't call nsLayoutUtils::GetScrollableFrameFor since we are not its
// scrollframe child yet.
nsIScrollableFrame* scrollFrame = do_QueryFrame(aParent);
if (scrollFrame) {
nsIFrame* verticalScrollbar = scrollFrame->GetScrollbarBox(true);
nsScrollbarFrame* scrollbarFrame = do_QueryFrame(verticalScrollbar);