Land bug 72747 in pieces: convert users of nsIScrollableFrame::GetScrollPreference to using GetScrollbarStyles. b=72747 r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@161686 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1473,14 +1473,11 @@ nsListboxScrollPortFrame::GetMinSize(nsBoxLayoutState& aBoxLayoutState, nsSize&
|
||||
outer->GetContent()->GetAttr(kNameSpaceID_None, nsXULAtoms::sizemode, sizeMode);
|
||||
if (!sizeMode.IsEmpty()) {
|
||||
nsCOMPtr<nsIScrollableFrame> scrollFrame(do_QueryInterface(mParent));
|
||||
if (scrollFrame) {
|
||||
nsIScrollableFrame::nsScrollPref scrollPref;
|
||||
scrollFrame->GetScrollPreference(aBoxLayoutState.PresContext(), &scrollPref);
|
||||
|
||||
if (scrollPref == nsIScrollableFrame::Auto) {
|
||||
nsMargin scrollbars = scrollFrame->GetDesiredScrollbarSizes(&aBoxLayoutState);
|
||||
aSize.width += scrollbars.left + scrollbars.right;
|
||||
}
|
||||
if (scrollFrame &&
|
||||
scrollFrame->GetScrollbarStyles().mVertical == NS_STYLE_OVERFLOW_AUTO) {
|
||||
nsMargin scrollbars =
|
||||
scrollFrame->GetDesiredScrollbarSizes(&aBoxLayoutState);
|
||||
aSize.width += scrollbars.left + scrollbars.right;
|
||||
}
|
||||
}
|
||||
else aSize.width = 0;
|
||||
@@ -1510,14 +1507,10 @@ nsListboxScrollPortFrame::GetPrefSize(nsBoxLayoutState& aBoxLayoutState, nsSize&
|
||||
aSize.height = size*outer->GetRowHeightTwips();
|
||||
|
||||
nsCOMPtr<nsIScrollableFrame> scrollFrame(do_QueryInterface(mParent));
|
||||
if (scrollFrame) {
|
||||
nsIScrollableFrame::nsScrollPref scrollPref;
|
||||
scrollFrame->GetScrollPreference(aBoxLayoutState.PresContext(), &scrollPref);
|
||||
|
||||
if (scrollPref == nsIScrollableFrame::Auto) {
|
||||
nsMargin scrollbars = scrollFrame->GetDesiredScrollbarSizes(&aBoxLayoutState);
|
||||
aSize.width += scrollbars.left + scrollbars.right;
|
||||
}
|
||||
if (scrollFrame &&
|
||||
scrollFrame->GetScrollbarStyles().mVertical == NS_STYLE_OVERFLOW_AUTO) {
|
||||
nsMargin scrollbars = scrollFrame->GetDesiredScrollbarSizes(&aBoxLayoutState);
|
||||
aSize.width += scrollbars.left + scrollbars.right;
|
||||
}
|
||||
|
||||
AddMargin(child, aSize);
|
||||
|
||||
Reference in New Issue
Block a user