зеркало из https://github.com/mozilla/pjs.git
remove unused prescontext from PlaceFrameView, PlaceChildsView, ConsiderChildOverflow bug 276092 r/sr=dbaron
This commit is contained in:
Родитель
b31a0f655f
Коммит
917905359e
|
@ -881,7 +881,7 @@ IncrementalReflow::Dispatch(nsPresContext *aPresContext,
|
|||
nsIFrame* root = aPresContext->PresShell()->FrameManager()->GetRootFrame();
|
||||
|
||||
first->WillReflow(aPresContext);
|
||||
nsContainerFrame::PositionFrameView(aPresContext, first);
|
||||
nsContainerFrame::PositionFrameView(first);
|
||||
|
||||
// If the first frame in the path is the root of the frame
|
||||
// hierarchy, then use all the available space. If it's simply a
|
||||
|
@ -2753,7 +2753,7 @@ PresShell::InitialReflow(nscoord aWidth, nscoord aHeight)
|
|||
nsHTMLReflowState reflowState(mPresContext, rootFrame,
|
||||
eReflowReason_Initial, rcx, maxSize);
|
||||
rootFrame->WillReflow(mPresContext);
|
||||
nsContainerFrame::PositionFrameView(mPresContext, rootFrame);
|
||||
nsContainerFrame::PositionFrameView(rootFrame);
|
||||
rootFrame->Reflow(mPresContext, desiredSize, reflowState, status);
|
||||
rootFrame->SetSize(nsSize(desiredSize.width, desiredSize.height));
|
||||
mPresContext->SetVisibleArea(nsRect(0,0,desiredSize.width,desiredSize.height));
|
||||
|
@ -2892,7 +2892,7 @@ PresShell::ResizeReflow(nscoord aWidth, nscoord aHeight)
|
|||
eReflowReason_Resize, rcx, maxSize);
|
||||
|
||||
rootFrame->WillReflow(mPresContext);
|
||||
nsContainerFrame::PositionFrameView(mPresContext, rootFrame);
|
||||
nsContainerFrame::PositionFrameView(rootFrame);
|
||||
rootFrame->Reflow(mPresContext, desiredSize, reflowState, status);
|
||||
rootFrame->SetSize(nsSize(desiredSize.width, desiredSize.height));
|
||||
mPresContext->SetVisibleArea(nsRect(0,0,desiredSize.width,desiredSize.height));
|
||||
|
@ -3332,7 +3332,7 @@ PresShell::StyleChangeReflow()
|
|||
eReflowReason_StyleChange, rcx, maxSize);
|
||||
|
||||
rootFrame->WillReflow(mPresContext);
|
||||
nsContainerFrame::PositionFrameView(mPresContext, rootFrame);
|
||||
nsContainerFrame::PositionFrameView(rootFrame);
|
||||
rootFrame->Reflow(mPresContext, desiredSize, reflowState, status);
|
||||
rootFrame->SetSize(nsSize(desiredSize.width, desiredSize.height));
|
||||
mPresContext->SetVisibleArea(nsRect(0,0,desiredSize.width,desiredSize.height));
|
||||
|
|
|
@ -972,7 +972,7 @@ nsComboboxControlFrame::ReflowCombobox(nsPresContext * aPresContext,
|
|||
aDisplayFrame->WillReflow(aPresContext);
|
||||
//aDisplayFrame->SetPosition(nsPoint(dspBorderPadding.left + aBorderPadding.left, dspBorderPadding.top + aBorderPadding.top));
|
||||
aDisplayFrame->SetPosition(nsPoint(aBorderPadding.left, aBorderPadding.top));
|
||||
nsAreaFrame::PositionFrameView(aPresContext, aDisplayFrame);
|
||||
nsAreaFrame::PositionFrameView(aDisplayFrame);
|
||||
nsReflowStatus status;
|
||||
nsresult rv = aDisplayFrame->Reflow(aPresContext, txtKidSize, txtKidReflowState, status);
|
||||
if (NS_FAILED(rv)) return;
|
||||
|
@ -1665,7 +1665,7 @@ nsComboboxControlFrame::ShowDropDown(PRBool aDoDropDown)
|
|||
|
||||
if (!mDroppedDown && aDoDropDown) {
|
||||
if (mListControlFrame) {
|
||||
mListControlFrame->SyncViewWithFrame(mPresContext);
|
||||
mListControlFrame->SyncViewWithFrame();
|
||||
}
|
||||
ToggleList(mPresContext);
|
||||
return NS_OK;
|
||||
|
|
|
@ -544,11 +544,11 @@ nsFieldSetFrame::Reflow(nsPresContext* aPresContext,
|
|||
// only if the origin changed
|
||||
if ((curOrigin.x != mLegendRect.x) || (curOrigin.y != mLegendRect.y)) {
|
||||
mLegendFrame->SetPosition(nsPoint(actualLegendRect.x , actualLegendRect.y));
|
||||
nsContainerFrame::PositionFrameView(aPresContext, mLegendFrame);
|
||||
nsContainerFrame::PositionFrameView(mLegendFrame);
|
||||
|
||||
// We need to recursively process the legend frame's
|
||||
// children since we're moving the frame after Reflow.
|
||||
nsContainerFrame::PositionChildViews(aPresContext, mLegendFrame);
|
||||
nsContainerFrame::PositionChildViews(mLegendFrame);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -579,9 +579,9 @@ nsFieldSetFrame::Reflow(nsPresContext* aPresContext,
|
|||
borderPadding.left + borderPadding.right);
|
||||
}
|
||||
if (mLegendFrame)
|
||||
ConsiderChildOverflow(aPresContext, aDesiredSize.mOverflowArea, mLegendFrame);
|
||||
ConsiderChildOverflow(aDesiredSize.mOverflowArea, mLegendFrame);
|
||||
if (mContentFrame)
|
||||
ConsiderChildOverflow(aPresContext, aDesiredSize.mOverflowArea, mContentFrame);
|
||||
ConsiderChildOverflow(aDesiredSize.mOverflowArea, mContentFrame);
|
||||
FinishAndStoreOverflow(&aDesiredSize);
|
||||
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
|
||||
return NS_OK;
|
||||
|
|
|
@ -96,7 +96,7 @@ public:
|
|||
/**
|
||||
*
|
||||
*/
|
||||
NS_IMETHOD SyncViewWithFrame(nsPresContext* aPresContext) = 0;
|
||||
NS_IMETHOD SyncViewWithFrame() = 0;
|
||||
|
||||
/**
|
||||
* Called by combobox when it's about to drop down
|
||||
|
|
|
@ -2239,7 +2239,7 @@ nsListControlFrame::GetProperty(nsIAtom* aName, nsAString& aValue)
|
|||
|
||||
//---------------------------------------------------------
|
||||
NS_IMETHODIMP
|
||||
nsListControlFrame::SyncViewWithFrame(nsPresContext* aPresContext)
|
||||
nsListControlFrame::SyncViewWithFrame()
|
||||
{
|
||||
// Resync the view's position with the frame.
|
||||
// The problem is the dropdown's view is attached directly under
|
||||
|
@ -2247,7 +2247,7 @@ nsListControlFrame::SyncViewWithFrame(nsPresContext* aPresContext)
|
|||
// as if it were in it's normal position in the view hierarchy.
|
||||
mComboboxFrame->AbsolutelyPositionDropDown();
|
||||
|
||||
nsContainerFrame::PositionFrameView(aPresContext, this);
|
||||
nsContainerFrame::PositionFrameView(this);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -2304,7 +2304,7 @@ nsListControlFrame::DidReflow(nsPresContext* aPresContext,
|
|||
mState &= ~NS_FRAME_SYNC_FRAME_AND_VIEW;
|
||||
rv = nsHTMLScrollFrame::DidReflow(aPresContext, aReflowState, aStatus);
|
||||
mState |= NS_FRAME_SYNC_FRAME_AND_VIEW;
|
||||
SyncViewWithFrame(aPresContext);
|
||||
SyncViewWithFrame();
|
||||
} else {
|
||||
rv = nsHTMLScrollFrame::DidReflow(aPresContext, aReflowState, aStatus);
|
||||
}
|
||||
|
|
|
@ -167,7 +167,7 @@ public:
|
|||
NS_IMETHOD GetMaximumSize(nsSize &aSize);
|
||||
NS_IMETHOD SetSuggestedSize(nscoord aWidth, nscoord aHeight);
|
||||
NS_IMETHOD GetNumberOfOptions(PRInt32* aNumOptions);
|
||||
NS_IMETHOD SyncViewWithFrame(nsPresContext* aPresContext);
|
||||
NS_IMETHOD SyncViewWithFrame();
|
||||
NS_IMETHOD AboutToDropDown();
|
||||
NS_IMETHOD AboutToRollup();
|
||||
NS_IMETHOD UpdateSelection();
|
||||
|
|
|
@ -608,7 +608,7 @@ nsAbsoluteContainingBlock::ReflowAbsoluteFrame(nsIFrame* aDelegat
|
|||
// Position its view, but don't bother it doing it now if we haven't
|
||||
// yet determined the left offset
|
||||
if (NS_AUTOOFFSET != kidReflowState.mComputedOffsets.left) {
|
||||
nsContainerFrame::PositionFrameView(aPresContext, aKidFrame);
|
||||
nsContainerFrame::PositionFrameView(aKidFrame);
|
||||
}
|
||||
|
||||
// Do the reflow
|
||||
|
|
|
@ -1998,7 +1998,7 @@ DirtyLinesWithDirtyContinuations(const nsLineList::iterator& aLineStart,
|
|||
}
|
||||
}
|
||||
|
||||
static void PlaceFrameView(nsPresContext* aPresContext, nsIFrame* aFrame);
|
||||
static void PlaceFrameView(nsIFrame* aFrame);
|
||||
static void CollectFloats(nsIFrame* aFrame, nsIFrame* aBlockParent,
|
||||
nsIFrame** aHead, nsIFrame** aTail);
|
||||
|
||||
|
@ -2356,7 +2356,7 @@ nsBlockFrame::ReflowDirtyLines(nsBlockReflowState& aState)
|
|||
|
||||
// Should we really have to do this?
|
||||
if (repositionViews)
|
||||
::PlaceFrameView(aState.mPresContext, this);
|
||||
::PlaceFrameView(this);
|
||||
|
||||
// We can skip trying to pull up the next line if there is no next
|
||||
// in flow or if the next in flow is not changing and we cannot have
|
||||
|
@ -2909,13 +2909,12 @@ nsBlockFrame::PullFrameFrom(nsBlockReflowState& aState,
|
|||
}
|
||||
|
||||
static void
|
||||
PlaceFrameView(nsPresContext* aPresContext,
|
||||
nsIFrame* aFrame)
|
||||
PlaceFrameView(nsIFrame* aFrame)
|
||||
{
|
||||
if (aFrame->HasView())
|
||||
nsContainerFrame::PositionFrameView(aPresContext, aFrame);
|
||||
nsContainerFrame::PositionFrameView(aFrame);
|
||||
else
|
||||
nsContainerFrame::PositionChildViews(aPresContext, aFrame);
|
||||
nsContainerFrame::PositionChildViews(aFrame);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -2943,7 +2942,7 @@ nsBlockFrame::SlideLine(nsBlockReflowState& aState,
|
|||
}
|
||||
|
||||
// Make sure the frame's view and any child views are updated
|
||||
::PlaceFrameView(aState.mPresContext, kid);
|
||||
::PlaceFrameView(kid);
|
||||
}
|
||||
else {
|
||||
// Adjust the Y coordinate of the frames in the line.
|
||||
|
@ -2958,7 +2957,7 @@ nsBlockFrame::SlideLine(nsBlockReflowState& aState,
|
|||
kid->SetPosition(p);
|
||||
}
|
||||
// Make sure the frame's view and any child views are updated
|
||||
::PlaceFrameView(aState.mPresContext, kid);
|
||||
::PlaceFrameView(kid);
|
||||
kid = kid->GetNextSibling();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -502,7 +502,7 @@ nsBlockReflowContext::ReflowBlock(const nsRect& aSpace,
|
|||
// Note: Use "x" and "y" and not "mX" and "mY" because they more accurately
|
||||
// represents where we think the block will be placed
|
||||
mFrame->SetPosition(nsPoint(x, y));
|
||||
nsContainerFrame::PositionFrameView(mPresContext, mFrame);
|
||||
nsContainerFrame::PositionFrameView(mFrame);
|
||||
|
||||
#ifdef DEBUG
|
||||
mMetrics.width = nscoord(0xdeadbeef);
|
||||
|
|
|
@ -1008,8 +1008,8 @@ nsBlockReflowState::FlowAndPlaceFloat(nsFloatCache* aFloatCache,
|
|||
// positioned. We need to explicitly position its child views as
|
||||
// well, since we're moving the float after flowing it.
|
||||
floatFrame->SetPosition(nsPoint(x, y));
|
||||
nsContainerFrame::PositionFrameView(mPresContext, floatFrame);
|
||||
nsContainerFrame::PositionChildViews(mPresContext, floatFrame);
|
||||
nsContainerFrame::PositionFrameView(floatFrame);
|
||||
nsContainerFrame::PositionChildViews(floatFrame);
|
||||
|
||||
// Update the float combined area state
|
||||
nsRect combinedArea = aFloatCache->mCombinedArea;
|
||||
|
|
|
@ -303,9 +303,9 @@ static void
|
|||
PlaceFrameView(nsIFrame* aFrame)
|
||||
{
|
||||
if (aFrame->HasView())
|
||||
nsContainerFrame::PositionFrameView(aFrame->GetPresContext(), aFrame);
|
||||
nsContainerFrame::PositionFrameView(aFrame);
|
||||
else
|
||||
nsContainerFrame::PositionChildViews(aFrame->GetPresContext(), aFrame);
|
||||
nsContainerFrame::PositionChildViews(aFrame);
|
||||
}
|
||||
|
||||
static void MoveChildTo(nsIFrame* aParent, nsIFrame* aChild, nsPoint aOrigin) {
|
||||
|
@ -485,7 +485,7 @@ nsColumnSetFrame::ReflowChildren(nsHTMLReflowMetrics& aDesiredSize,
|
|||
|
||||
contentRect.UnionRect(contentRect, child->GetRect());
|
||||
|
||||
ConsiderChildOverflow(GetPresContext(), overflowRect, child);
|
||||
ConsiderChildOverflow(overflowRect, child);
|
||||
|
||||
// Build a continuation column if necessary
|
||||
nsIFrame* kidNextInFlow = child->GetNextInFlow();
|
||||
|
@ -559,7 +559,7 @@ nsColumnSetFrame::ReflowChildren(nsHTMLReflowMetrics& aDesiredSize,
|
|||
#endif
|
||||
for (child = mFrames.FirstChild(); child; child = child->GetNextSibling()) {
|
||||
MoveChildTo(this, child, child->GetPosition() + nsPoint(deltaX, 0));
|
||||
ConsiderChildOverflow(GetPresContext(), overflowRect, child);
|
||||
ConsiderChildOverflow(overflowRect, child);
|
||||
contentRect.UnionRect(contentRect, child->GetRect());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -439,8 +439,7 @@ nsContainerFrame::ReflowDirtyChild(nsIPresShell* aPresShell, nsIFrame* aChild)
|
|||
* but before |Reflow|.
|
||||
*/
|
||||
void
|
||||
nsContainerFrame::PositionFrameView(nsPresContext* aPresContext,
|
||||
nsIFrame* aKidFrame)
|
||||
nsContainerFrame::PositionFrameView(nsIFrame* aKidFrame)
|
||||
{
|
||||
if (aKidFrame->HasView()) {
|
||||
nsIView* view = aKidFrame->GetView();
|
||||
|
@ -737,7 +736,7 @@ nsContainerFrame::SyncFrameViewAfterReflow(nsPresContext* aPresContext,
|
|||
|
||||
// Make sure the view is sized and positioned correctly
|
||||
if (0 == (aFlags & NS_FRAME_NO_MOVE_VIEW)) {
|
||||
PositionFrameView(aPresContext, aFrame);
|
||||
PositionFrameView(aFrame);
|
||||
}
|
||||
|
||||
if (0 == (aFlags & NS_FRAME_NO_SIZE_VIEW)) {
|
||||
|
@ -949,7 +948,7 @@ nsContainerFrame::ReflowChild(nsIFrame* aKidFrame,
|
|||
}
|
||||
|
||||
if (0 == (aFlags & NS_FRAME_NO_MOVE_VIEW)) {
|
||||
PositionFrameView(aPresContext, aKidFrame);
|
||||
PositionFrameView(aKidFrame);
|
||||
}
|
||||
|
||||
// Reflow the child frame
|
||||
|
@ -988,8 +987,7 @@ nsContainerFrame::ReflowChild(nsIFrame* aKidFrame,
|
|||
* should call this method if it moves a frame after |Reflow|.
|
||||
*/
|
||||
void
|
||||
nsContainerFrame::PositionChildViews(nsPresContext* aPresContext,
|
||||
nsIFrame* aFrame)
|
||||
nsContainerFrame::PositionChildViews(nsIFrame* aFrame)
|
||||
{
|
||||
if (!(aFrame->GetStateBits() & NS_FRAME_HAS_CHILD_WITH_VIEW)) {
|
||||
return;
|
||||
|
@ -1005,9 +1003,9 @@ nsContainerFrame::PositionChildViews(nsPresContext* aPresContext,
|
|||
// Position the frame's view (if it has one) otherwise recursively
|
||||
// process its children
|
||||
if (childFrame->HasView()) {
|
||||
PositionFrameView(aPresContext, childFrame);
|
||||
PositionFrameView(childFrame);
|
||||
} else {
|
||||
PositionChildViews(aPresContext, childFrame);
|
||||
PositionChildViews(childFrame);
|
||||
}
|
||||
|
||||
// Get the next sibling child frame
|
||||
|
@ -1063,7 +1061,7 @@ nsContainerFrame::FinishReflowChild(nsIFrame* aKidFrame,
|
|||
if (!aKidFrame->HasView()) {
|
||||
// If the frame has moved, then we need to make sure any child views are
|
||||
// correctly positioned
|
||||
PositionChildViews(aPresContext, aKidFrame);
|
||||
PositionChildViews(aKidFrame);
|
||||
}
|
||||
|
||||
// We also need to redraw everything associated with the frame
|
||||
|
|
|
@ -95,8 +95,7 @@ public:
|
|||
}
|
||||
|
||||
// Positions the frame's view based on the frame's origin
|
||||
static void PositionFrameView(nsPresContext* aPresContext,
|
||||
nsIFrame* aKidFrame);
|
||||
static void PositionFrameView(nsIFrame* aKidFrame);
|
||||
|
||||
// Set the view's size and position after its frame has been reflowed.
|
||||
//
|
||||
|
@ -183,8 +182,7 @@ public:
|
|||
PRUint32 aFlags);
|
||||
|
||||
|
||||
static void PositionChildViews(nsPresContext* aPresContext,
|
||||
nsIFrame* aFrame);
|
||||
static void PositionChildViews(nsIFrame* aFrame);
|
||||
|
||||
protected:
|
||||
nsContainerFrame();
|
||||
|
|
|
@ -4330,9 +4330,8 @@ nsIFrame::FinishAndStoreOverflow(nsRect* aOverflowArea, nsSize aNewSize)
|
|||
}
|
||||
|
||||
void
|
||||
nsFrame::ConsiderChildOverflow(nsPresContext* aPresContext,
|
||||
nsRect& aOverflowArea,
|
||||
nsIFrame* aChildFrame)
|
||||
nsFrame::ConsiderChildOverflow(nsRect& aOverflowArea,
|
||||
nsIFrame* aChildFrame)
|
||||
{
|
||||
const nsStyleDisplay* disp = GetStyleDisplay();
|
||||
// check here also for hidden as table frames (table, tr and td) currently
|
||||
|
|
|
@ -386,9 +386,8 @@ public:
|
|||
|
||||
// incorporate the child overflow area into the parent overflow area
|
||||
// if the child does not have a overflow use the child area
|
||||
void ConsiderChildOverflow(nsPresContext* aPresContext,
|
||||
nsRect& aOverflowArea,
|
||||
nsIFrame* aChildFrame);
|
||||
void ConsiderChildOverflow(nsRect& aOverflowArea,
|
||||
nsIFrame* aChildFrame);
|
||||
|
||||
//Mouse Capturing code used by the frames to tell the view to capture all the following events
|
||||
NS_IMETHOD CaptureMouse(nsPresContext* aPresContext, PRBool aGrabMouseEvents);
|
||||
|
|
|
@ -2988,7 +2988,7 @@ nsLineLayout::RelativePositionFrames(PerSpanData* psd, nsRect& aCombinedArea)
|
|||
// does have a view in case this frame's view does not have a
|
||||
// widget and some of the descendant views do have widgets --
|
||||
// otherwise the widgets won't be repositioned.
|
||||
nsContainerFrame::PositionChildViews(mPresContext, frame);
|
||||
nsContainerFrame::PositionChildViews(frame);
|
||||
}
|
||||
|
||||
// Do this here (rather than along with NS_FRAME_OUTSIDE_CHILDREN
|
||||
|
|
|
@ -601,12 +601,12 @@ void nsTableCellFrame::VerticallyAlignChild(nsPresContext* aPresContext
|
|||
desiredSize.width = mRect.width;
|
||||
desiredSize.height = mRect.height;
|
||||
desiredSize.mOverflowArea = nsRect(0, 0, mRect.width, mRect.height);
|
||||
ConsiderChildOverflow(aPresContext, desiredSize.mOverflowArea, firstKid);
|
||||
ConsiderChildOverflow(desiredSize.mOverflowArea, firstKid);
|
||||
FinishAndStoreOverflow(&desiredSize);
|
||||
if (kidYTop != kidRect.y) {
|
||||
// Make sure any child views are correctly positioned. We know the inner table
|
||||
// cell won't have a view
|
||||
nsContainerFrame::PositionChildViews(aPresContext, firstKid);
|
||||
nsContainerFrame::PositionChildViews(firstKid);
|
||||
}
|
||||
if (HasView()) {
|
||||
nsContainerFrame::SyncFrameViewAfterReflow(aPresContext, this, GetView(), &desiredSize.mOverflowArea, 0);
|
||||
|
|
|
@ -360,11 +360,10 @@ nsTableFrame::AppendDirtyReflowCommand(nsIPresShell* aPresShell,
|
|||
|
||||
// Make sure any views are positioned properly
|
||||
void
|
||||
nsTableFrame::RePositionViews(nsPresContext* aPresContext,
|
||||
nsIFrame* aFrame)
|
||||
nsTableFrame::RePositionViews(nsIFrame* aFrame)
|
||||
{
|
||||
nsContainerFrame::PositionFrameView(aPresContext, aFrame);
|
||||
nsContainerFrame::PositionChildViews(aPresContext, aFrame);
|
||||
nsContainerFrame::PositionFrameView(aFrame);
|
||||
nsContainerFrame::PositionChildViews(aFrame);
|
||||
}
|
||||
|
||||
PRBool
|
||||
|
@ -1545,8 +1544,7 @@ PRBool nsTableFrame::NeedsReflow(const nsHTMLReflowState& aReflowState)
|
|||
// Slides all the row groups following aKidFrame by the specified
|
||||
// amount
|
||||
nsresult
|
||||
nsTableFrame::AdjustSiblingsAfterReflow(nsPresContext* aPresContext,
|
||||
nsTableReflowState& aReflowState,
|
||||
nsTableFrame::AdjustSiblingsAfterReflow(nsTableReflowState& aReflowState,
|
||||
nsIFrame* aKidFrame,
|
||||
nscoord aDeltaY)
|
||||
{
|
||||
|
@ -1585,7 +1583,7 @@ nsTableFrame::AdjustSiblingsAfterReflow(nsPresContext* aPresContext,
|
|||
if (aDeltaY != 0) {
|
||||
kidRect.y += aDeltaY;
|
||||
kidFrame->SetPosition(nsPoint(kidRect.x, kidRect.y));
|
||||
RePositionViews(aPresContext, kidFrame);
|
||||
RePositionViews(kidFrame);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3007,13 +3005,13 @@ nsTableFrame::IR_TargetIsChild(nsPresContext* aPresContext,
|
|||
}
|
||||
|
||||
// Adjust the row groups that follow
|
||||
AdjustSiblingsAfterReflow(aPresContext, aReflowState, aNextFrame,
|
||||
AdjustSiblingsAfterReflow(aReflowState, aNextFrame,
|
||||
desiredSize.height - oldKidRect.height);
|
||||
|
||||
// recover the overflow area from all children
|
||||
desiredSize.mOverflowArea = nsRect(0, 0, desiredSize.width, desiredSize.height);
|
||||
for (nsIFrame* kidFrame = mFrames.FirstChild(); kidFrame; kidFrame = kidFrame->GetNextSibling()) {
|
||||
ConsiderChildOverflow(aPresContext, desiredSize.mOverflowArea, kidFrame);
|
||||
ConsiderChildOverflow(desiredSize.mOverflowArea, kidFrame);
|
||||
}
|
||||
FinishAndStoreOverflow(&desiredSize.mOverflowArea,
|
||||
nsSize(desiredSize.width, desiredSize.height));
|
||||
|
@ -3301,7 +3299,7 @@ nsTableFrame::ReflowChildren(nsPresContext* aPresContext,
|
|||
}
|
||||
aReflowState.y += cellSpacingY + kidRect.height;
|
||||
}
|
||||
ConsiderChildOverflow(aPresContext, aOverflowArea, kidFrame);
|
||||
ConsiderChildOverflow(aOverflowArea, kidFrame);
|
||||
}
|
||||
|
||||
// if required, give the colgroups their initial reflows
|
||||
|
@ -3468,9 +3466,8 @@ nsTableFrame::CalcDesiredHeight(const nsHTMLReflowState& aReflowState, nsHTMLRef
|
|||
if (NS_UNCONSTRAINEDSIZE != aReflowState.availableWidth) {
|
||||
DistributeHeightToRows(aReflowState, tableSpecifiedHeight - desiredHeight);
|
||||
// this might have changed the overflow area incorporate the childframe overflow area.
|
||||
nsPresContext* presContext = GetPresContext();
|
||||
for (nsIFrame* kidFrame = mFrames.FirstChild(); kidFrame; kidFrame = kidFrame->GetNextSibling()) {
|
||||
ConsiderChildOverflow(presContext, aDesiredSize.mOverflowArea, kidFrame);
|
||||
ConsiderChildOverflow(aDesiredSize.mOverflowArea, kidFrame);
|
||||
}
|
||||
}
|
||||
desiredHeight = tableSpecifiedHeight;
|
||||
|
@ -3506,7 +3503,7 @@ void ResizeCells(nsTableFrame& aTableFrame,
|
|||
nsTableRowFrame* rowFrame = rgFrame->GetFirstRow();
|
||||
while (rowFrame) {
|
||||
rowFrame->DidResize(aPresContext, aReflowState);
|
||||
rgFrame->ConsiderChildOverflow(aPresContext, groupDesiredSize.mOverflowArea, rowFrame);
|
||||
rgFrame->ConsiderChildOverflow(groupDesiredSize.mOverflowArea, rowFrame);
|
||||
rowFrame = rowFrame->GetNextRow();
|
||||
}
|
||||
rgFrame->FinishAndStoreOverflow(&groupDesiredSize.mOverflowArea,
|
||||
|
@ -3564,13 +3561,13 @@ nsTableFrame::DistributeHeightToRows(const nsHTMLReflowState& aReflowState,
|
|||
amountUsed += amountForRow;
|
||||
amountUsedByRG += amountForRow;
|
||||
//rowFrame->DidResize(aPresContext, aReflowState);
|
||||
nsTableFrame::RePositionViews(presContext, rowFrame);
|
||||
nsTableFrame::RePositionViews(rowFrame);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (amountUsed > 0) {
|
||||
rowFrame->SetPosition(nsPoint(rowRect.x, yOriginRow));
|
||||
nsTableFrame::RePositionViews(presContext, rowFrame);
|
||||
nsTableFrame::RePositionViews(rowFrame);
|
||||
}
|
||||
yOriginRow += rowRect.height + cellSpacingY;
|
||||
yEndRG += rowRect.height + cellSpacingY;
|
||||
|
@ -3586,7 +3583,7 @@ nsTableFrame::DistributeHeightToRows(const nsHTMLReflowState& aReflowState,
|
|||
else if (amountUsed > 0) {
|
||||
rgFrame->SetPosition(nsPoint(0, yOriginRG));
|
||||
// Make sure child views are properly positioned
|
||||
nsTableFrame::RePositionViews(presContext, rgFrame);
|
||||
nsTableFrame::RePositionViews(rgFrame);
|
||||
}
|
||||
yOriginRG = yEndRG;
|
||||
}
|
||||
|
@ -3669,12 +3666,12 @@ nsTableFrame::DistributeHeightToRows(const nsHTMLReflowState& aReflowState,
|
|||
amountUsedByRG += amountForRow;
|
||||
NS_ASSERTION((amountUsed <= aAmount), "invalid row allocation");
|
||||
//rowFrame->DidResize(aPresContext, aReflowState);
|
||||
nsTableFrame::RePositionViews(presContext, rowFrame);
|
||||
nsTableFrame::RePositionViews(rowFrame);
|
||||
}
|
||||
else {
|
||||
if (amountUsed > 0) {
|
||||
rowFrame->SetPosition(nsPoint(rowRect.x, yOriginRow));
|
||||
nsTableFrame::RePositionViews(presContext, rowFrame);
|
||||
nsTableFrame::RePositionViews(rowFrame);
|
||||
}
|
||||
yOriginRow += rowRect.height + cellSpacingY;
|
||||
yEndRG += rowRect.height + cellSpacingY;
|
||||
|
@ -3692,7 +3689,7 @@ nsTableFrame::DistributeHeightToRows(const nsHTMLReflowState& aReflowState,
|
|||
else if (amountUsed > 0) {
|
||||
rgFrame->SetPosition(nsPoint(0, yOriginRG));
|
||||
// Make sure child views are properly positioned
|
||||
nsTableFrame::RePositionViews(presContext, rgFrame);
|
||||
nsTableFrame::RePositionViews(rgFrame);
|
||||
}
|
||||
yOriginRG = yEndRG;
|
||||
}
|
||||
|
|
|
@ -235,8 +235,7 @@ public:
|
|||
static nsresult AppendDirtyReflowCommand(nsIPresShell* aPresShell,
|
||||
nsIFrame* aFrame);
|
||||
|
||||
static void RePositionViews(nsPresContext* aPresContext,
|
||||
nsIFrame* aFrame);
|
||||
static void RePositionViews(nsIFrame* aFrame);
|
||||
|
||||
static PRBool PageBreakAfter(nsIFrame& aSourceFrame,
|
||||
nsIFrame* aNextFrame);
|
||||
|
@ -660,8 +659,7 @@ protected:
|
|||
nsTableReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus);
|
||||
|
||||
NS_IMETHOD AdjustSiblingsAfterReflow(nsPresContext* aPresContext,
|
||||
nsTableReflowState& aReflowState,
|
||||
NS_IMETHOD AdjustSiblingsAfterReflow(nsTableReflowState& aReflowState,
|
||||
nsIFrame* aKidFrame,
|
||||
nscoord aDeltaY);
|
||||
|
||||
|
|
|
@ -505,15 +505,14 @@ nscoord CalcAutoMargin(nscoord aAutoMargin,
|
|||
}
|
||||
|
||||
void
|
||||
MoveFrameTo(nsPresContext* aPresContext,
|
||||
nsIFrame* aFrame,
|
||||
nscoord aX,
|
||||
nscoord aY)
|
||||
MoveFrameTo(nsIFrame* aFrame,
|
||||
nscoord aX,
|
||||
nscoord aY)
|
||||
{
|
||||
nsPoint pt = aFrame->GetPosition();
|
||||
if ((pt.x != aX) || (pt.y != aY)) {
|
||||
aFrame->SetPosition(nsPoint(aX, aY));
|
||||
nsTableFrame::RePositionViews(aPresContext, aFrame);
|
||||
nsTableFrame::RePositionViews(aFrame);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -538,8 +537,7 @@ GetContainingBlockSize(const nsHTMLReflowState& aOuterRS)
|
|||
}
|
||||
|
||||
void
|
||||
nsTableOuterFrame::InvalidateDamage(nsPresContext* aPresContext,
|
||||
PRUint8 aCaptionSide,
|
||||
nsTableOuterFrame::InvalidateDamage(PRUint8 aCaptionSide,
|
||||
const nsSize& aOuterSize,
|
||||
PRBool aInnerChanged,
|
||||
PRBool aCaptionChanged,
|
||||
|
@ -617,7 +615,7 @@ nsTableOuterFrame::InvalidateDamage(nsPresContext* aPresContext,
|
|||
}
|
||||
|
||||
nsIFrame* kidFrame = aCaptionChanged ? mCaptionFrame : mInnerTableFrame;
|
||||
ConsiderChildOverflow(aPresContext, damage, kidFrame);
|
||||
ConsiderChildOverflow(damage, kidFrame);
|
||||
if (aOldOverflowArea) {
|
||||
damage.UnionRect(damage, *aOldOverflowArea);
|
||||
}
|
||||
|
@ -811,8 +809,7 @@ nsTableOuterFrame::GetCaptionVerticalAlign()
|
|||
}
|
||||
|
||||
void
|
||||
nsTableOuterFrame::SetDesiredSize(nsPresContext* aPresContext,
|
||||
PRUint8 aCaptionSide,
|
||||
nsTableOuterFrame::SetDesiredSize(PRUint8 aCaptionSide,
|
||||
const nsMargin& aInnerMargin,
|
||||
const nsMargin& aCaptionMargin,
|
||||
nscoord aAvailableWidth,
|
||||
|
@ -831,7 +828,7 @@ nsTableOuterFrame::SetDesiredSize(nsPresContext* aPresContext,
|
|||
captionWidth = captionRect.width;
|
||||
if ((NS_UNCONSTRAINEDSIZE == aAvailableWidth) &&
|
||||
((NS_SIDE_LEFT == aCaptionSide) || (NS_SIDE_RIGHT == aCaptionSide))) {
|
||||
BalanceLeftRightCaption(aPresContext, aCaptionSide, aInnerMargin, aCaptionMargin,
|
||||
BalanceLeftRightCaption(aCaptionSide, aInnerMargin, aCaptionMargin,
|
||||
innerWidth, captionWidth);
|
||||
}
|
||||
}
|
||||
|
@ -876,8 +873,7 @@ nsTableOuterFrame::PctAdjustMinCaptionWidth(nsPresContext* aPresContex
|
|||
}
|
||||
}
|
||||
void
|
||||
nsTableOuterFrame::BalanceLeftRightCaption(nsPresContext* aPresContext,
|
||||
PRUint8 aCaptionSide,
|
||||
nsTableOuterFrame::BalanceLeftRightCaption(PRUint8 aCaptionSide,
|
||||
const nsMargin& aInnerMargin,
|
||||
const nsMargin& aCaptionMargin,
|
||||
nscoord& aInnerWidth,
|
||||
|
@ -939,7 +935,7 @@ nsTableOuterFrame::BalanceLeftRightCaption(nsPresContext* aPresContext,
|
|||
aCaptionWidth = (nscoord) ((capPercent / innerPercent) * aInnerWidth);
|
||||
}
|
||||
aCaptionWidth = nsTableFrame::RoundToPixel(aCaptionWidth,
|
||||
aPresContext->ScaledPixelsToTwips(),
|
||||
GetPresContext()->ScaledPixelsToTwips(),
|
||||
eAlwaysRoundDown);
|
||||
}
|
||||
|
||||
|
@ -1340,8 +1336,7 @@ nsTableOuterFrame::OuterReflowChild(nsPresContext* aPresContext,
|
|||
}
|
||||
|
||||
void
|
||||
nsTableOuterFrame::UpdateReflowMetrics(nsPresContext* aPresContext,
|
||||
PRUint8 aCaptionSide,
|
||||
nsTableOuterFrame::UpdateReflowMetrics(PRUint8 aCaptionSide,
|
||||
nsHTMLReflowMetrics& aMet,
|
||||
const nsMargin& aInnerMargin,
|
||||
const nsMargin& aInnerMarginNoAuto,
|
||||
|
@ -1350,7 +1345,7 @@ nsTableOuterFrame::UpdateReflowMetrics(nsPresContext* aPresContext,
|
|||
const nsMargin& aCaptionMarginNoAuto,
|
||||
const nscoord aAvailableWidth)
|
||||
{
|
||||
SetDesiredSize(aPresContext, aCaptionSide, aInnerMargin, aCaptionMargin, aAvailableWidth, aMet.width, aMet.height);
|
||||
SetDesiredSize(aCaptionSide, aInnerMargin, aCaptionMargin, aAvailableWidth, aMet.width, aMet.height);
|
||||
|
||||
// set maxElementSize width if requested
|
||||
if (aMet.mComputeMEW) {
|
||||
|
@ -1362,9 +1357,9 @@ nsTableOuterFrame::UpdateReflowMetrics(nsPresContext* aPresContext,
|
|||
}
|
||||
|
||||
aMet.mOverflowArea = nsRect(0, 0, aMet.width, aMet.height);
|
||||
ConsiderChildOverflow(aPresContext, aMet.mOverflowArea, mInnerTableFrame);
|
||||
ConsiderChildOverflow(aMet.mOverflowArea, mInnerTableFrame);
|
||||
if (mCaptionFrame) {
|
||||
ConsiderChildOverflow(aPresContext, aMet.mOverflowArea, mCaptionFrame);
|
||||
ConsiderChildOverflow(aMet.mOverflowArea, mCaptionFrame);
|
||||
}
|
||||
FinishAndStoreOverflow(&aMet);
|
||||
}
|
||||
|
@ -1532,7 +1527,7 @@ nsTableOuterFrame::IR_TargetIsCaptionFrame(nsPresContext* aPresContext
|
|||
captionMargin, innerSize, innerMargin, innerOrigin);
|
||||
GetCaptionOrigin(aPresContext, captionSide, containSize, innerSize,
|
||||
innerMargin, captionSize, captionMargin, captionOrigin);
|
||||
MoveFrameTo(aPresContext, mInnerTableFrame, innerOrigin.x, innerOrigin.y);
|
||||
MoveFrameTo(mInnerTableFrame, innerOrigin.x, innerOrigin.y);
|
||||
}
|
||||
|
||||
rv = FinishReflowChild(mCaptionFrame, aPresContext, nsnull, captionMet,
|
||||
|
@ -1545,12 +1540,11 @@ nsTableOuterFrame::IR_TargetIsCaptionFrame(nsPresContext* aPresContext
|
|||
overflowStorage = &overflow;
|
||||
}
|
||||
|
||||
UpdateReflowMetrics(aPresContext, captionSide, aDesiredSize, innerMargin, innerMarginNoAuto,
|
||||
UpdateReflowMetrics(captionSide, aDesiredSize, innerMargin, innerMarginNoAuto,
|
||||
innerPadding, captionMargin, captionMarginNoAuto, aOuterRS.availableWidth);
|
||||
nsSize desSize(aDesiredSize.width, aDesiredSize.height);
|
||||
PRBool innerMoved = (innerOrigin.x != prevInnerRect.x) || (innerOrigin.y != prevInnerRect.y);
|
||||
InvalidateDamage(aPresContext, captionSide, desSize, innerMoved, PR_TRUE,
|
||||
overflowStorage);
|
||||
InvalidateDamage(captionSide, desSize, innerMoved, PR_TRUE, overflowStorage);
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
@ -1589,7 +1583,7 @@ nsTableOuterFrame::IR_ReflowDirty(nsPresContext* aPresContext,
|
|||
nsSize containSize = GetContainingBlockSize(aReflowState);
|
||||
GetInnerOrigin(aPresContext, NO_SIDE, containSize, nsSize(0,0),
|
||||
nsMargin(0,0,0,0), innerSize, innerMargin, innerOrigin);
|
||||
MoveFrameTo(aPresContext, mInnerTableFrame, innerOrigin.x, innerOrigin.y);
|
||||
MoveFrameTo(mInnerTableFrame, innerOrigin.x, innerOrigin.y);
|
||||
|
||||
aDesiredSize.width = innerRect.XMost() + innerMargin.right;
|
||||
aDesiredSize.height = innerRect.YMost() + innerMargin.bottom;
|
||||
|
@ -1599,8 +1593,7 @@ nsTableOuterFrame::IR_ReflowDirty(nsPresContext* aPresContext,
|
|||
PRBool innerMoved = (innerRect.x != innerOrigin.x) ||
|
||||
(innerRect.y != innerOrigin.y);
|
||||
nsSize desSize(aDesiredSize.width, aDesiredSize.height);
|
||||
InvalidateDamage(aPresContext, (PRUint8) NO_SIDE, desSize, innerMoved, PR_FALSE,
|
||||
oldOverflowArea);
|
||||
InvalidateDamage((PRUint8) NO_SIDE, desSize, innerMoved, PR_FALSE, oldOverflowArea);
|
||||
}
|
||||
if (!sizeSet) {
|
||||
// set our desired size to what it was before
|
||||
|
@ -1740,7 +1733,7 @@ nsTableOuterFrame::IR_InnerTableReflow(nsPresContext* aPresContext,
|
|||
innerMargin, captionSize, captionMargin, captionOrigin);
|
||||
GetInnerOrigin(aPresContext, captionSide, containSize, captionSize,
|
||||
captionMargin, innerSize, innerMargin, innerOrigin);
|
||||
MoveFrameTo(aPresContext, mCaptionFrame, captionOrigin.x, captionOrigin.y);
|
||||
MoveFrameTo(mCaptionFrame, captionOrigin.x, captionOrigin.y);
|
||||
}
|
||||
if ((captionOrigin.x != prevCaptionRect.x) || (captionOrigin.y != prevCaptionRect.y)) {
|
||||
captionMoved = PR_TRUE;
|
||||
|
@ -1767,12 +1760,11 @@ nsTableOuterFrame::IR_InnerTableReflow(nsPresContext* aPresContext,
|
|||
overflowStorage = &overflow;
|
||||
}
|
||||
|
||||
UpdateReflowMetrics(aPresContext, captionSide, aOuterMet, innerMargin, innerMarginNoAuto,
|
||||
UpdateReflowMetrics(captionSide, aOuterMet, innerMargin, innerMarginNoAuto,
|
||||
innerPadding, captionMargin, captionMarginNoAuto, aOuterRS.availableWidth);
|
||||
nsSize desSize(aOuterMet.width, aOuterMet.height);
|
||||
InvalidateDamage(aPresContext, captionSide, desSize,
|
||||
(innerSize.width != priorInnerSize.width), captionMoved,
|
||||
overflowStorage);
|
||||
InvalidateDamage(captionSide, desSize, (innerSize.width != priorInnerSize.width),
|
||||
captionMoved, overflowStorage);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
@ -1844,7 +1836,7 @@ nsTableOuterFrame::IR_CaptionInserted(nsPresContext* aPresContext,
|
|||
captionMargin, innerSize, innerMargin, innerOrigin);
|
||||
GetCaptionOrigin(aPresContext, captionSide, containSize, innerSize,
|
||||
innerMargin, captionSize, captionMargin, captionOrigin);
|
||||
MoveFrameTo(aPresContext, mInnerTableFrame, innerOrigin.x, innerOrigin.y);
|
||||
MoveFrameTo(mInnerTableFrame, innerOrigin.x, innerOrigin.y);
|
||||
}
|
||||
|
||||
rv = FinishReflowChild(mCaptionFrame, aPresContext, nsnull, captionMet,
|
||||
|
@ -1857,12 +1849,11 @@ nsTableOuterFrame::IR_CaptionInserted(nsPresContext* aPresContext,
|
|||
overflow = *oldOverflowArea;
|
||||
overflowStorage = &overflow;
|
||||
}
|
||||
UpdateReflowMetrics(aPresContext, captionSide, aDesiredSize, innerMargin, innerMarginNoAuto,
|
||||
UpdateReflowMetrics(captionSide, aDesiredSize, innerMargin, innerMarginNoAuto,
|
||||
innerPadding, captionMargin, captionMarginNoAuto, aOuterRS.availableWidth);
|
||||
nsSize desSize(aDesiredSize.width, aDesiredSize.height);
|
||||
PRBool innerMoved = innerOrigin != prevInnerOrigin;
|
||||
InvalidateDamage(aPresContext, captionSide, desSize, innerMoved, PR_TRUE,
|
||||
overflowStorage);
|
||||
InvalidateDamage(captionSide, desSize, innerMoved, PR_TRUE, overflowStorage);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
@ -1946,7 +1937,7 @@ NS_METHOD nsTableOuterFrame::Reflow(nsPresContext* aPresContext,
|
|||
// We know our view (if we have one) has been positioned
|
||||
// correctly, but it's up to us to make sure that our child views
|
||||
// are correctly positioned, too.
|
||||
nsContainerFrame::PositionChildViews(aPresContext, this);
|
||||
nsContainerFrame::PositionChildViews(this);
|
||||
}
|
||||
}
|
||||
else if (eReflowReason_Incremental == aOuterRS.reason) {
|
||||
|
@ -2040,7 +2031,7 @@ NS_METHOD nsTableOuterFrame::Reflow(nsPresContext* aPresContext,
|
|||
aDesiredSize.mMaxElementWidth = innerMet.mMaxElementWidth;
|
||||
}
|
||||
|
||||
UpdateReflowMetrics(aPresContext, captionSide, aDesiredSize, innerMargin, innerMarginNoAuto,
|
||||
UpdateReflowMetrics(captionSide, aDesiredSize, innerMargin, innerMarginNoAuto,
|
||||
innerPadding, captionMargin, captionMarginNoAuto, aOuterRS.availableWidth);
|
||||
needUpdateMetrics = PR_FALSE;
|
||||
}
|
||||
|
@ -2071,7 +2062,7 @@ NS_METHOD nsTableOuterFrame::Reflow(nsPresContext* aPresContext,
|
|||
GetMarginPadding(aPresContext, aOuterRS, mCaptionFrame, outerWidth,
|
||||
capMargin, capMarginNoAuto, capPadding);
|
||||
}
|
||||
UpdateReflowMetrics(aPresContext, captionSide, aDesiredSize, innerMargin, innerMarginNoAuto,
|
||||
UpdateReflowMetrics(captionSide, aDesiredSize, innerMargin, innerMarginNoAuto,
|
||||
innerPadding, capMargin, capMarginNoAuto, aOuterRS.availableWidth);
|
||||
}
|
||||
#ifdef CHECK_THIS_AND_REMOVE
|
||||
|
|
|
@ -311,8 +311,7 @@ protected:
|
|||
|
||||
PRUint8 GetCaptionVerticalAlign();
|
||||
|
||||
void SetDesiredSize(nsPresContext* aPresContext,
|
||||
PRUint8 aCaptionSide,
|
||||
void SetDesiredSize(PRUint8 aCaptionSide,
|
||||
const nsMargin& aInnerMargin,
|
||||
const nsMargin& aCaptionMargin,
|
||||
nscoord aAvailWidth,
|
||||
|
@ -324,8 +323,7 @@ protected:
|
|||
PRUint8 aCaptionSide,
|
||||
nscoord& capMin);
|
||||
|
||||
void BalanceLeftRightCaption(nsPresContext* aPresContext,
|
||||
PRUint8 aCaptionSide,
|
||||
void BalanceLeftRightCaption(PRUint8 aCaptionSide,
|
||||
const nsMargin& aInnerMargin,
|
||||
const nsMargin& aCaptionMargin,
|
||||
nscoord& aInnerWidth,
|
||||
|
@ -384,8 +382,7 @@ protected:
|
|||
// Set the reflow metrics, aInnerMarginNoAuto is aInnerMargin, but with
|
||||
// auto margins set to 0
|
||||
// aCaptionMargionNoAuto is aCaptionMargin, but with auto margins set to 0
|
||||
void UpdateReflowMetrics(nsPresContext* aPresContext,
|
||||
PRUint8 aCaptionSide,
|
||||
void UpdateReflowMetrics(PRUint8 aCaptionSide,
|
||||
nsHTMLReflowMetrics& aMet,
|
||||
const nsMargin& aInnerMargin,
|
||||
const nsMargin& aInnerMarginNoAuto,
|
||||
|
@ -394,8 +391,7 @@ protected:
|
|||
const nsMargin& aCaptionMargionNoAuto,
|
||||
const nscoord aAvailWidth);
|
||||
|
||||
void InvalidateDamage(nsPresContext* aPresContext,
|
||||
PRUint8 aCaptionSide,
|
||||
void InvalidateDamage(PRUint8 aCaptionSide,
|
||||
const nsSize& aOuterSize,
|
||||
PRBool aInnerChanged,
|
||||
PRBool aCaptionChanged,
|
||||
|
|
|
@ -392,7 +392,7 @@ nsTableRowFrame::DidResize(nsPresContext* aPresContext,
|
|||
//ReflowChild(cellFrame, aPresContext, desiredSize, kidReflowState, status);
|
||||
|
||||
cellFrame->VerticallyAlignChild(aPresContext, aReflowState, mMaxCellAscent);
|
||||
ConsiderChildOverflow(aPresContext, desiredSize.mOverflowArea, cellFrame);
|
||||
ConsiderChildOverflow(desiredSize.mOverflowArea, cellFrame);
|
||||
}
|
||||
}
|
||||
// Get the next child
|
||||
|
@ -1009,7 +1009,7 @@ nsTableRowFrame::ReflowChildren(nsPresContext* aPresContext,
|
|||
// Because we may have moved the frame we need to make sure any views are
|
||||
// positioned properly. We have to do this, because any one of our parent
|
||||
// frames could have moved and we have no way of knowing...
|
||||
nsTableFrame::RePositionViews(aPresContext, kidFrame);
|
||||
nsTableFrame::RePositionViews(kidFrame);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1057,7 +1057,7 @@ nsTableRowFrame::ReflowChildren(nsPresContext* aPresContext,
|
|||
// we need to account for the cell's width even if it isn't reflowed
|
||||
x += kidFrame->GetSize().width;
|
||||
}
|
||||
ConsiderChildOverflow(aPresContext, aDesiredSize.mOverflowArea, kidFrame);
|
||||
ConsiderChildOverflow(aDesiredSize.mOverflowArea, kidFrame);
|
||||
kidFrame = iter.Next(); // Get the next child
|
||||
x += cellSpacingX;
|
||||
}
|
||||
|
@ -1320,7 +1320,7 @@ nsTableRowFrame::IR_TargetIsChild(nsPresContext* aPresContext,
|
|||
cellFrame->VerticallyAlignChild(aPresContext, aReflowState, mMaxCellAscent);
|
||||
nsRect dirtyRect = cellFrame->GetRect();
|
||||
dirtyRect.height = mRect.height;
|
||||
ConsiderChildOverflow(aPresContext, aDesiredSize.mOverflowArea, cellFrame);
|
||||
ConsiderChildOverflow(aDesiredSize.mOverflowArea, cellFrame);
|
||||
dirtyRect.UnionRect(dirtyRect, aDesiredSize.mOverflowArea);
|
||||
Invalidate(dirtyRect);
|
||||
}
|
||||
|
@ -1335,7 +1335,7 @@ nsTableRowFrame::IR_TargetIsChild(nsPresContext* aPresContext,
|
|||
// Make sure the overflow area includes the width and height, in any case.
|
||||
cellMet.mOverflowArea.UnionRect(cellMet.mOverflowArea,
|
||||
nsRect(0, 0, cellMet.width, cellMet.height));
|
||||
cellFrame->ConsiderChildOverflow(aPresContext, cellMet.mOverflowArea, cellKidFrame);
|
||||
cellFrame->ConsiderChildOverflow(cellMet.mOverflowArea, cellKidFrame);
|
||||
cellFrame->FinishAndStoreOverflow(&cellMet);
|
||||
if (cellFrame->HasView()) {
|
||||
nsContainerFrame::SyncFrameViewAfterReflow(aPresContext, cellFrame, cellFrame->GetView(), &cellMet.mOverflowArea, 0);
|
||||
|
@ -1351,7 +1351,7 @@ nsTableRowFrame::IR_TargetIsChild(nsPresContext* aPresContext,
|
|||
// recover the overflow area
|
||||
aDesiredSize.mOverflowArea = nsRect(0, 0, aDesiredSize.width, aDesiredSize.height);
|
||||
for (nsIFrame* cell = mFrames.FirstChild(); cell; cell = cell->GetNextSibling()) {
|
||||
ConsiderChildOverflow(aPresContext, aDesiredSize.mOverflowArea, cell);
|
||||
ConsiderChildOverflow(aDesiredSize.mOverflowArea, cell);
|
||||
}
|
||||
FinishAndStoreOverflow(&aDesiredSize);
|
||||
// When returning whether we're complete we need to look at each of our cell
|
||||
|
|
|
@ -413,7 +413,7 @@ nsTableRowGroupFrame::ReflowChildren(nsPresContext* aPresContext,
|
|||
// Adjust the running y-offset so we know where the next row should be placed
|
||||
aReflowState.y += kidFrame->GetSize().height + cellSpacingY;
|
||||
}
|
||||
ConsiderChildOverflow(aPresContext, aDesiredSize.mOverflowArea, kidFrame);
|
||||
ConsiderChildOverflow(aDesiredSize.mOverflowArea, kidFrame);
|
||||
}
|
||||
|
||||
// adjust the rows after the ones that were reflowed
|
||||
|
@ -423,7 +423,7 @@ nsTableRowGroupFrame::ReflowChildren(nsPresContext* aPresContext,
|
|||
nscoord deltaY = cellSpacingY + lastReflowedRow->GetRect().YMost()
|
||||
- nextRow->GetPosition().y;
|
||||
if (deltaY != 0) {
|
||||
AdjustSiblingsAfterReflow(aPresContext, aReflowState, lastReflowedRow, deltaY);
|
||||
AdjustSiblingsAfterReflow(aReflowState, lastReflowedRow, deltaY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -487,7 +487,7 @@ nsTableRowGroupFrame::DidResizeRows(nsPresContext& aPresContext,
|
|||
}
|
||||
for (rowFrame = startRowFrame, rowIndex = 0; rowFrame; rowFrame = rowFrame->GetNextRow(), rowIndex++) {
|
||||
rowFrame->DidResize(&aPresContext, aReflowState);
|
||||
ConsiderChildOverflow(&aPresContext, aDesiredSize.mOverflowArea, rowFrame);
|
||||
ConsiderChildOverflow(aDesiredSize.mOverflowArea, rowFrame);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -787,7 +787,7 @@ nsTableRowGroupFrame::CalculateRowHeights(nsPresContext* aPresContext,
|
|||
rowFrame->SetRect(rowBounds);
|
||||
}
|
||||
if (movedFrame) {
|
||||
nsTableFrame::RePositionViews(aPresContext, rowFrame);
|
||||
nsTableFrame::RePositionViews(rowFrame);
|
||||
}
|
||||
yOrigin += rowHeight + cellSpacingY;
|
||||
}
|
||||
|
@ -811,8 +811,7 @@ nsTableRowGroupFrame::CalculateRowHeights(nsPresContext* aPresContext,
|
|||
// cells that span into it and no cells that span across it. That way
|
||||
// we don't have to deal with rowspans
|
||||
nsresult
|
||||
nsTableRowGroupFrame::AdjustSiblingsAfterReflow(nsPresContext* aPresContext,
|
||||
nsRowGroupReflowState& aReflowState,
|
||||
nsTableRowGroupFrame::AdjustSiblingsAfterReflow(nsRowGroupReflowState& aReflowState,
|
||||
nsIFrame* aKidFrame,
|
||||
nscoord aDeltaY)
|
||||
{
|
||||
|
@ -826,7 +825,7 @@ nsTableRowGroupFrame::AdjustSiblingsAfterReflow(nsPresContext* aPresConte
|
|||
// Move the frame if we need to
|
||||
if (aDeltaY != 0) {
|
||||
kidFrame->SetPosition(kidFrame->GetPosition() + nsPoint(0, aDeltaY));
|
||||
nsTableFrame::RePositionViews(aPresContext, kidFrame);
|
||||
nsTableFrame::RePositionViews(kidFrame);
|
||||
}
|
||||
|
||||
// Remember the last frame
|
||||
|
@ -1684,7 +1683,7 @@ nsTableRowGroupFrame::IR_TargetIsChild(nsPresContext* aPresContext,
|
|||
}
|
||||
|
||||
// Adjust the frames that follow
|
||||
AdjustSiblingsAfterReflow(aPresContext, aReflowState, aNextFrame,
|
||||
AdjustSiblingsAfterReflow(aReflowState, aNextFrame,
|
||||
desiredSize.height - oldKidSize.height);
|
||||
aDesiredSize.height = aReflowState.y;
|
||||
}
|
||||
|
@ -1715,7 +1714,7 @@ nsTableRowGroupFrame::IR_TargetIsChild(nsPresContext* aPresContext,
|
|||
else {
|
||||
// need to recover the OverflowArea
|
||||
for (nsTableRowFrame* rowFrame = GetFirstRow(); rowFrame; rowFrame = rowFrame->GetNextRow()) {
|
||||
ConsiderChildOverflow(aPresContext, aDesiredSize.mOverflowArea, rowFrame);
|
||||
ConsiderChildOverflow(aDesiredSize.mOverflowArea, rowFrame);
|
||||
}
|
||||
FinishAndStoreOverflow(&aDesiredSize);
|
||||
}
|
||||
|
|
|
@ -314,8 +314,7 @@ protected:
|
|||
nsRowGroupReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus);
|
||||
|
||||
nsresult AdjustSiblingsAfterReflow(nsPresContext* aPresContext,
|
||||
nsRowGroupReflowState& aReflowState,
|
||||
nsresult AdjustSiblingsAfterReflow(nsRowGroupReflowState& aReflowState,
|
||||
nsIFrame* aKidFrame,
|
||||
nscoord aDeltaY);
|
||||
|
||||
|
|
|
@ -480,8 +480,6 @@ nsBox::SetBounds(nsBoxLayoutState& aState, const nsRect& aRect, PRBool aRemoveOv
|
|||
|
||||
nsRect rect(mRect);
|
||||
|
||||
nsPresContext* presContext = aState.PresContext();
|
||||
|
||||
PRUint32 flags = 0;
|
||||
GetLayoutFlags(flags);
|
||||
|
||||
|
@ -505,9 +503,9 @@ nsBox::SetBounds(nsBoxLayoutState& aState, const nsRect& aRect, PRBool aRemoveOv
|
|||
|
||||
if (!(flags & NS_FRAME_NO_MOVE_VIEW))
|
||||
{
|
||||
nsContainerFrame::PositionFrameView(presContext, this);
|
||||
nsContainerFrame::PositionFrameView(this);
|
||||
if ((rect.x != aRect.x) || (rect.y != aRect.y))
|
||||
nsContainerFrame::PositionChildViews(presContext, this);
|
||||
nsContainerFrame::PositionChildViews(this);
|
||||
}
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче