зеркало из https://github.com/mozilla/gecko-dev.git
1) Added sanity checks to box to case memory bugs
2) Fixed the floating point roundoff that was causing boxes to lay themselves out off by 1 pixel 3) Simplified box data structure -r Hyatt
This commit is contained in:
Родитель
ff8f6ed9d1
Коммит
9c827edcdb
|
@ -1599,7 +1599,7 @@ nsGfxScrollFrameInner::GetIntegerAttribute(nsIFrame* aFrame, nsIAtom* atom, PRIn
|
|||
NS_IMETHODIMP
|
||||
nsGfxScrollFrame::GetBoxInfo(nsIPresContext* aPresContext, const nsHTMLReflowState& aReflowState, nsBoxInfo& aSize)
|
||||
{
|
||||
aSize.clear();
|
||||
aSize.Clear();
|
||||
|
||||
nsresult rv;
|
||||
nsBoxInfo scrollAreaInfo, vboxInfo, hboxInfo;
|
||||
|
|
|
@ -1599,7 +1599,7 @@ nsGfxScrollFrameInner::GetIntegerAttribute(nsIFrame* aFrame, nsIAtom* atom, PRIn
|
|||
NS_IMETHODIMP
|
||||
nsGfxScrollFrame::GetBoxInfo(nsIPresContext* aPresContext, const nsHTMLReflowState& aReflowState, nsBoxInfo& aSize)
|
||||
{
|
||||
aSize.clear();
|
||||
aSize.Clear();
|
||||
|
||||
nsresult rv;
|
||||
nsBoxInfo scrollAreaInfo, vboxInfo, hboxInfo;
|
||||
|
|
|
@ -541,7 +541,7 @@ nsScrollPortFrame::GetBoxInfo(nsIPresContext* aPresContext, const nsHTMLReflowSt
|
|||
{
|
||||
nsresult rv;
|
||||
|
||||
aSize.clear();
|
||||
aSize.Clear();
|
||||
|
||||
if (mNeedsRecalc) {
|
||||
nsIFrame* childFrame = mFrames.FirstChild();
|
||||
|
@ -595,7 +595,7 @@ nsScrollPortFrame::GetBoxInfo(nsIPresContext* aPresContext, const nsHTMLReflowSt
|
|||
nsresult
|
||||
nsScrollPortFrame::GetChildBoxInfo(nsIPresContext* aPresContext, const nsHTMLReflowState& aReflowState, nsIFrame* aFrame, nsBoxInfo& aSize)
|
||||
{
|
||||
aSize.clear();
|
||||
aSize.Clear();
|
||||
|
||||
// see if the frame has IBox interface
|
||||
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -51,7 +51,9 @@ public:
|
|||
PRBool isIncremental;
|
||||
nsHTMLInfo* htmlInfo;
|
||||
nsCalculatedBoxInfo* next;
|
||||
virtual void clear()=0;
|
||||
nsIFrame* frame;
|
||||
PRBool prefWidthIntrinsic;
|
||||
PRBool prefHeightIntrinsic;
|
||||
};
|
||||
|
||||
class nsInfoList
|
||||
|
@ -130,11 +132,10 @@ public:
|
|||
nsIAtom* aListName,
|
||||
nsIFrame* aOldFrame);
|
||||
|
||||
NS_IMETHOD ReplaceFrame(nsIPresContext* aPresContext,
|
||||
nsIPresShell& aPresShell,
|
||||
nsIAtom* aListName,
|
||||
nsIFrame* aOldFrame,
|
||||
nsIFrame* aNewFrame);
|
||||
NS_IMETHOD SetInitialChildList(nsIPresContext* aPresContext,
|
||||
nsIAtom* aListName,
|
||||
nsIFrame* aChildList);
|
||||
|
||||
|
||||
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
||||
|
||||
|
|
|
@ -45,26 +45,11 @@ public:
|
|||
nsSize prefSize;
|
||||
nsSize minSize;
|
||||
nsSize maxSize;
|
||||
PRInt32 flex;
|
||||
|
||||
float flex;
|
||||
|
||||
nsBoxInfo() { clear(); }
|
||||
|
||||
virtual void clear()
|
||||
{
|
||||
prefSize.width = 0;
|
||||
prefSize.height = 0;
|
||||
|
||||
minSize.width = 0;
|
||||
minSize.height = 0;
|
||||
|
||||
flex = 0.0;
|
||||
|
||||
maxSize.width = NS_INTRINSICSIZE;
|
||||
maxSize.height = NS_INTRINSICSIZE;
|
||||
}
|
||||
|
||||
virtual ~nsBoxInfo() {}
|
||||
nsBoxInfo();
|
||||
virtual void Clear();
|
||||
virtual ~nsBoxInfo();
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -933,7 +933,7 @@ nsTitledButtonFrame::GetDesiredSize(nsIPresContext* aPresContext,
|
|||
{
|
||||
// get our info object.
|
||||
nsBoxInfo info;
|
||||
info.clear();
|
||||
info.Clear();
|
||||
|
||||
GetBoxInfo(aPresContext, aReflowState, info);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче