зеркало из https://github.com/mozilla/pjs.git
Bug 386142: fantasai's li'l Need More Comments bug. Patch by fantasai, r+sr=roc
This commit is contained in:
Родитель
68ed486b64
Коммит
116c6b742e
|
@ -669,7 +669,8 @@ FrameArena::FrameArena(PRUint32 aArenaSize)
|
|||
|
||||
FrameArena::~FrameArena()
|
||||
{
|
||||
NS_ASSERTION(mFrameCount == 0, "Some frame destructors were not called");
|
||||
NS_ASSERTION(mFrameCount == 0,
|
||||
"Some objects allocated with AllocateFrame were not freed");
|
||||
|
||||
#if !defined(DEBUG_TRACEMALLOC_FRAMEARENA)
|
||||
// Free the arena in the pool and finish using it
|
||||
|
|
|
@ -1125,6 +1125,8 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext,
|
|||
cbWidthChanged, cbHeightChanged,
|
||||
&childBounds);
|
||||
|
||||
//XXXfr Why isn't this rv (and others in this file) checked/returned?
|
||||
|
||||
// Factor the absolutely positioned child bounds into the overflow area
|
||||
aMetrics.mOverflowArea.UnionRect(aMetrics.mOverflowArea, childBounds);
|
||||
}
|
||||
|
|
|
@ -117,7 +117,7 @@ public:
|
|||
|
||||
/**
|
||||
* Adjusts the border/padding to return 0 for the top if
|
||||
* we are no the first in flow.
|
||||
* we are not the first in flow.
|
||||
*/
|
||||
nsMargin BorderPadding() const {
|
||||
nsMargin result = mReflowState.mComputedBorderPadding;
|
||||
|
|
|
@ -411,7 +411,6 @@ SyncFrameViewGeometryDependentProperties(nsPresContext* aPresContext,
|
|||
if (isCanvas) {
|
||||
nsIView* rootView;
|
||||
vm->GetRootView(rootView);
|
||||
nsIView* rootParent = rootView->GetParent();
|
||||
|
||||
nsIDocument *doc = aPresContext->PresShell()->GetDocument();
|
||||
if (doc) {
|
||||
|
@ -786,7 +785,7 @@ nsContainerFrame::FinishReflowChild(nsIFrame* aKidFrame,
|
|||
*/
|
||||
void
|
||||
nsContainerFrame::DeleteNextInFlowChild(nsPresContext* aPresContext,
|
||||
nsIFrame* aNextInFlow)
|
||||
nsIFrame* aNextInFlow)
|
||||
{
|
||||
nsIFrame* prevInFlow = aNextInFlow->GetPrevInFlow();
|
||||
NS_PRECONDITION(prevInFlow, "bad prev-in-flow");
|
||||
|
@ -834,6 +833,9 @@ nsContainerFrame::DeleteNextInFlowChild(nsPresContext* aPresContext,
|
|||
NS_POSTCONDITION(!prevInFlow->GetNextInFlow(), "non null next-in-flow");
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the frames on the overflow list
|
||||
*/
|
||||
nsIFrame*
|
||||
nsContainerFrame::GetOverflowFrames(nsPresContext* aPresContext,
|
||||
PRBool aRemoveProperty) const
|
||||
|
@ -862,6 +864,9 @@ DestroyOverflowFrames(void* aFrame,
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the frames on the overflow list
|
||||
*/
|
||||
nsresult
|
||||
nsContainerFrame::SetOverflowFrames(nsPresContext* aPresContext,
|
||||
nsIFrame* aOverflowFrames)
|
||||
|
|
|
@ -147,11 +147,11 @@ public:
|
|||
* Flags:
|
||||
* NS_FRAME_NO_MOVE_VIEW - don't position the frame's view. Set this if you
|
||||
* don't want to automatically sync the frame and view
|
||||
* NS_FRAME_NO_MOVE_VIEW - don't move the frame. aX and aY are ignored in this
|
||||
* NS_FRAME_NO_MOVE_FRAME - don't move the frame. aX and aY are ignored in this
|
||||
* case. Also implies NS_FRAME_NO_MOVE_VIEW
|
||||
*/
|
||||
nsresult ReflowChild(nsIFrame* aKidFrame,
|
||||
nsPresContext* aPresContext,
|
||||
nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nscoord aX,
|
||||
|
@ -177,7 +177,7 @@ public:
|
|||
* NS_FRAME_NO_SIZE_VIEW - don't size the frame's view
|
||||
*/
|
||||
static nsresult FinishReflowChild(nsIFrame* aKidFrame,
|
||||
nsPresContext* aPresContext,
|
||||
nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState* aReflowState,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
nscoord aX,
|
||||
|
@ -221,13 +221,13 @@ protected:
|
|||
/**
|
||||
* Get the frames on the overflow list
|
||||
*/
|
||||
nsIFrame* GetOverflowFrames(nsPresContext* aPresContext,
|
||||
nsIFrame* GetOverflowFrames(nsPresContext* aPresContext,
|
||||
PRBool aRemoveProperty) const;
|
||||
|
||||
/**
|
||||
* Set the overflow list
|
||||
*/
|
||||
nsresult SetOverflowFrames(nsPresContext* aPresContext,
|
||||
nsresult SetOverflowFrames(nsPresContext* aPresContext,
|
||||
nsIFrame* aOverflowFrames);
|
||||
|
||||
/**
|
||||
|
@ -255,7 +255,7 @@ protected:
|
|||
* @param aPrevSibling aFromChild's previous sibling. Must not be null.
|
||||
* It's an error to push a parent's first child frame
|
||||
*/
|
||||
void PushChildren(nsPresContext* aPresContext,
|
||||
void PushChildren(nsPresContext* aPresContext,
|
||||
nsIFrame* aFromChild,
|
||||
nsIFrame* aPrevSibling);
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
* A class for managing a singly linked list of frames. Frames are
|
||||
* linked together through their next-sibling pointer.
|
||||
*/
|
||||
|
||||
class nsFrameList {
|
||||
public:
|
||||
nsFrameList() {
|
||||
|
@ -71,6 +72,8 @@ public:
|
|||
#endif
|
||||
}
|
||||
|
||||
// Appends frames from aFrameList to this list. If aParent
|
||||
// is not null, reparents the newly-added frames.
|
||||
void AppendFrames(nsIFrame* aParent, nsIFrame* aFrameList);
|
||||
|
||||
void AppendFrames(nsIFrame* aParent, nsFrameList& aFrameList) {
|
||||
|
@ -84,12 +87,14 @@ public:
|
|||
// from the sibling list. This will return PR_FALSE if aFrame is
|
||||
// nsnull or if aFrame is not in the list. The second frame is
|
||||
// a hint for the prev-sibling of aFrame; if the hint is correct,
|
||||
// then this is O(1) time.
|
||||
// then this is O(1) time. If successfully removed, the child's
|
||||
// NextSibling pointer is cleared.
|
||||
PRBool RemoveFrame(nsIFrame* aFrame, nsIFrame* aPrevSiblingHint = nsnull);
|
||||
|
||||
// Remove the first child from the list. The caller is assumed to be
|
||||
// holding a reference to the first child. This call is equivalent
|
||||
// in behavior to calling RemoveFrame(FirstChild()).
|
||||
// in behavior to calling RemoveFrame(FirstChild()). If successfully
|
||||
// removed the first child's NextSibling pointer is cleared.
|
||||
PRBool RemoveFirstChild();
|
||||
|
||||
// Take aFrame out of the frame list and then destroy it. This also
|
||||
|
@ -97,10 +102,17 @@ public:
|
|||
// PR_FALSE if aFrame is nsnull or if aFrame is not in the list.
|
||||
PRBool DestroyFrame(nsIFrame* aFrame);
|
||||
|
||||
// Inserts aNewFrame right after aPrevSibling, or prepends to
|
||||
// list if aPrevSibling is null. If aParent is not null, also
|
||||
// reparents newly-added frame. Note that this method always
|
||||
// sets the frame's nextSibling pointer.
|
||||
void InsertFrame(nsIFrame* aParent,
|
||||
nsIFrame* aPrevSibling,
|
||||
nsIFrame* aNewFrame);
|
||||
|
||||
// Inserts aFrameList right after aPrevSibling, or prepends to
|
||||
// list if aPrevSibling is null. If aParent is not null, also
|
||||
// reparents newly-added frame.
|
||||
void InsertFrames(nsIFrame* aParent,
|
||||
nsIFrame* aPrevSibling,
|
||||
nsIFrame* aFrameList);
|
||||
|
|
|
@ -1305,10 +1305,6 @@ nsTableRowGroupFrame::Reflow(nsPresContext* aPresContext,
|
|||
// just set our width to what was available. The table will calculate the width and not use our value.
|
||||
aDesiredSize.width = aReflowState.availableWidth;
|
||||
|
||||
// if we have a nextinflow we are not complete
|
||||
if (GetNextInFlow()) {
|
||||
aStatus |= NS_FRAME_NOT_COMPLETE;
|
||||
}
|
||||
aDesiredSize.mOverflowArea.UnionRect(aDesiredSize.mOverflowArea, nsRect(0, 0, aDesiredSize.width,
|
||||
aDesiredSize.height));
|
||||
FinishAndStoreOverflow(&aDesiredSize);
|
||||
|
|
Загрузка…
Ссылка в новой задаче