зеркало из https://github.com/mozilla/pjs.git
Added checks for null to handle the case where a Mac-specific theme with native scrollbars is applied to a non-Mac platform, which was crashing us. b=138720 sr=kin r=kmcclusk
This commit is contained in:
Родитель
d7d08bbf7d
Коммит
c872e416b5
|
@ -118,14 +118,18 @@ nsNativeScrollbarFrame::Init(nsIPresContext* aPresContext, nsIContent* aContent,
|
|||
nsWidgetInitData widgetData;
|
||||
if ( NS_SUCCEEDED(myView->CreateWidget(kScrollbarCID, &widgetData, nsnull)) ) {
|
||||
myView->GetWidget(*getter_AddRefs(mScrollbar));
|
||||
NS_ASSERTION(mScrollbar, "Couldn't create native scrollbar!");
|
||||
mScrollbar->Show(PR_TRUE);
|
||||
mScrollbar->Enable(PR_TRUE);
|
||||
if (mScrollbar) {
|
||||
mScrollbar->Show(PR_TRUE);
|
||||
mScrollbar->Enable(PR_TRUE);
|
||||
|
||||
// defer telling the scrollbar about the mediator and the content
|
||||
// node until its first reflow since not everything has been set
|
||||
// by this point.
|
||||
mScrollbarNeedsContent = PR_TRUE;
|
||||
// defer telling the scrollbar about the mediator and the content
|
||||
// node until its first reflow since not everything has been set
|
||||
// by this point.
|
||||
mScrollbarNeedsContent = PR_TRUE;
|
||||
} else {
|
||||
NS_WARNING("Couldn't create native scrollbar!");
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче