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