зеркало из https://github.com/mozilla/pjs.git
Landing part of bug 363858 that somehow got misplaced. pending r=dbaron
This commit is contained in:
Родитель
8eded00047
Коммит
8bbaeaa979
|
@ -90,6 +90,7 @@
|
||||||
#include "nsIDOMKeyListener.h"
|
#include "nsIDOMKeyListener.h"
|
||||||
#include "nsLayoutUtils.h"
|
#include "nsLayoutUtils.h"
|
||||||
#include "nsDisplayList.h"
|
#include "nsDisplayList.h"
|
||||||
|
#include "nsBoxLayoutState.h"
|
||||||
|
|
||||||
// Constants
|
// Constants
|
||||||
const nscoord kMaxDropDownRows = 20; // This matches the setting for 4.x browsers
|
const nscoord kMaxDropDownRows = 20; // This matches the setting for 4.x browsers
|
||||||
|
@ -527,12 +528,14 @@ nsListControlFrame::CalcHeightOfARow()
|
||||||
nscoord
|
nscoord
|
||||||
nsListControlFrame::GetMinWidth(nsIRenderingContext *aRenderingContext)
|
nsListControlFrame::GetMinWidth(nsIRenderingContext *aRenderingContext)
|
||||||
{
|
{
|
||||||
// We don't want to have options wrapping unless they absolutely
|
// Scrollframes typically have an intrinsic min width of 0, but
|
||||||
// have to, so our min width is our pref width.
|
// that's not how we want to behave.
|
||||||
nscoord result;
|
nscoord result;
|
||||||
DISPLAY_MIN_WIDTH(this, result);
|
DISPLAY_MIN_WIDTH(this, result);
|
||||||
|
|
||||||
result = GetPrefWidth(aRenderingContext);
|
result = GetScrolledFrame()->GetMinWidth(aRenderingContext);
|
||||||
|
nsBoxLayoutState bls(PresContext(), aRenderingContext);
|
||||||
|
result += GetDesiredScrollbarSizes(&bls).LeftRight();
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче