mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 20:35:50 +00:00
Bug 384491, remove assertion when <xul:listboxbody style='overflow: hidden' />, r+sr=roc
This commit is contained in:
parent
32e1431af7
commit
f0c8d4f1c5
@ -237,23 +237,18 @@ nsListBoxBodyFrame::Init(nsIContent* aContent,
|
||||
nsIFrame* aPrevInFlow)
|
||||
{
|
||||
nsresult rv = nsBoxFrame::Init(aContent, aParent, aPrevInFlow);
|
||||
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
nsIScrollableFrame* scrollFrame = nsLayoutUtils::GetScrollableFrameFor(this);
|
||||
if (!scrollFrame)
|
||||
return rv;
|
||||
|
||||
nsIScrollableView* scrollableView = scrollFrame->GetScrollableView();
|
||||
scrollableView->SetScrollProperties(NS_SCROLL_PROPERTY_ALWAYS_BLIT);
|
||||
|
||||
nsIBox* verticalScrollbar = scrollFrame->GetScrollbarBox(PR_TRUE);
|
||||
if (!verticalScrollbar) {
|
||||
NS_ERROR("Unable to install the scrollbar mediator on the listbox widget. You must be using GFX scrollbars.");
|
||||
return NS_ERROR_FAILURE;
|
||||
if (scrollFrame) {
|
||||
nsIScrollableView* scrollableView = scrollFrame->GetScrollableView();
|
||||
scrollableView->SetScrollProperties(NS_SCROLL_PROPERTY_ALWAYS_BLIT);
|
||||
nsIBox* verticalScrollbar = scrollFrame->GetScrollbarBox(PR_TRUE);
|
||||
if (verticalScrollbar) {
|
||||
nsIScrollbarFrame* scrollbarFrame = nsnull;
|
||||
CallQueryInterface(verticalScrollbar, &scrollbarFrame);
|
||||
scrollbarFrame->SetScrollbarMediatorContent(GetContent());
|
||||
}
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIScrollbarFrame> scrollbarFrame(do_QueryInterface(verticalScrollbar));
|
||||
scrollbarFrame->SetScrollbarMediatorContent(GetContent());
|
||||
|
||||
nsCOMPtr<nsIFontMetrics> fm;
|
||||
PresContext()->DeviceContext()->GetMetricsFor(
|
||||
GetStyleContext()->GetStyleFont()->mFont, *getter_AddRefs(fm)
|
||||
|
Loading…
Reference in New Issue
Block a user