зеркало из https://github.com/mozilla/gecko-dev.git
bug 904555 - clean up use of nsRect APIs in layout. r=roc
This commit is contained in:
Родитель
30cfe09d1d
Коммит
c79c573b77
|
@ -3039,7 +3039,7 @@ nsBlockFrame::ReflowBlockFrame(nsBlockReflowState& aState,
|
||||||
// construct the html reflow state for the block. ReflowBlock
|
// construct the html reflow state for the block. ReflowBlock
|
||||||
// will initialize it
|
// will initialize it
|
||||||
nsHTMLReflowState blockHtmlRS(aState.mPresContext, aState.mReflowState, frame,
|
nsHTMLReflowState blockHtmlRS(aState.mPresContext, aState.mReflowState, frame,
|
||||||
nsSize(availSpace.width, availSpace.height));
|
availSpace.Size());
|
||||||
blockHtmlRS.mFlags.mHasClearance = aLine->HasClearance();
|
blockHtmlRS.mFlags.mHasClearance = aLine->HasClearance();
|
||||||
|
|
||||||
nsFloatManager::SavedState floatManagerState;
|
nsFloatManager::SavedState floatManagerState;
|
||||||
|
@ -5730,7 +5730,7 @@ nsBlockFrame::ComputeFloatWidth(nsBlockReflowState& aState,
|
||||||
aFloat);
|
aFloat);
|
||||||
|
|
||||||
nsHTMLReflowState floatRS(aState.mPresContext, aState.mReflowState, aFloat,
|
nsHTMLReflowState floatRS(aState.mPresContext, aState.mReflowState, aFloat,
|
||||||
nsSize(availSpace.width, availSpace.height));
|
availSpace.Size());
|
||||||
return floatRS.ComputedWidth() + floatRS.mComputedBorderPadding.LeftRight() +
|
return floatRS.ComputedWidth() + floatRS.mComputedBorderPadding.LeftRight() +
|
||||||
floatRS.mComputedMargin.LeftRight();
|
floatRS.mComputedMargin.LeftRight();
|
||||||
}
|
}
|
||||||
|
|
|
@ -7715,7 +7715,7 @@ nsFrame::DoLayout(nsBoxLayoutState& aState)
|
||||||
|
|
||||||
// ensure our size is what we think is should be. Someone could have
|
// ensure our size is what we think is should be. Someone could have
|
||||||
// reset the frame to be smaller or something dumb like that.
|
// reset the frame to be smaller or something dumb like that.
|
||||||
SetSize(nsSize(ourRect.width, ourRect.height));
|
SetSize(ourRect.Size());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -830,8 +830,8 @@ public:
|
||||||
* position.
|
* position.
|
||||||
*/
|
*/
|
||||||
nsRect GetRect() const { return mRect; }
|
nsRect GetRect() const { return mRect; }
|
||||||
nsPoint GetPosition() const { return nsPoint(mRect.x, mRect.y); }
|
nsPoint GetPosition() const { return mRect.TopLeft(); }
|
||||||
nsSize GetSize() const { return nsSize(mRect.width, mRect.height); }
|
nsSize GetSize() const { return mRect.Size(); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When we change the size of the frame's border-box rect, we may need to
|
* When we change the size of the frame's border-box rect, we may need to
|
||||||
|
|
|
@ -1260,8 +1260,7 @@ nsTableRowFrame::CollapseRowIfNecessary(nscoord aRowOffset,
|
||||||
// collapse the cell!
|
// collapse the cell!
|
||||||
nsRect cellBounds(0, 0, cRect.width, cRect.height);
|
nsRect cellBounds(0, 0, cRect.width, cRect.height);
|
||||||
nsOverflowAreas cellOverflow(cellBounds, cellBounds);
|
nsOverflowAreas cellOverflow(cellBounds, cellBounds);
|
||||||
cellFrame->FinishAndStoreOverflow(cellOverflow,
|
cellFrame->FinishAndStoreOverflow(cellOverflow, cRect.Size());
|
||||||
nsSize(cRect.width, cRect.height));
|
|
||||||
nsTableFrame::RePositionViews(cellFrame);
|
nsTableFrame::RePositionViews(cellFrame);
|
||||||
ConsiderChildOverflow(overflow, cellFrame);
|
ConsiderChildOverflow(overflow, cellFrame);
|
||||||
|
|
||||||
|
@ -1276,8 +1275,8 @@ nsTableRowFrame::CollapseRowIfNecessary(nscoord aRowOffset,
|
||||||
}
|
}
|
||||||
|
|
||||||
SetRect(rowRect);
|
SetRect(rowRect);
|
||||||
overflow.UnionAllWith(nsRect(0,0,rowRect.width, rowRect.height));
|
overflow.UnionAllWith(nsRect(0, 0, rowRect.width, rowRect.height));
|
||||||
FinishAndStoreOverflow(overflow, nsSize(rowRect.width, rowRect.height));
|
FinishAndStoreOverflow(overflow, rowRect.Size());
|
||||||
|
|
||||||
nsTableFrame::RePositionViews(this);
|
nsTableFrame::RePositionViews(this);
|
||||||
nsTableFrame::InvalidateTableFrame(this, oldRect, oldVisualOverflow, false);
|
nsTableFrame::InvalidateTableFrame(this, oldRect, oldVisualOverflow, false);
|
||||||
|
|
|
@ -837,7 +837,7 @@ nsTableRowGroupFrame::CollapseRowGroupIfNecessary(nscoord aYTotalOffset,
|
||||||
|
|
||||||
SetRect(groupRect);
|
SetRect(groupRect);
|
||||||
overflow.UnionAllWith(nsRect(0, 0, groupRect.width, groupRect.height));
|
overflow.UnionAllWith(nsRect(0, 0, groupRect.width, groupRect.height));
|
||||||
FinishAndStoreOverflow(overflow, nsSize(groupRect.width, groupRect.height));
|
FinishAndStoreOverflow(overflow, groupRect.Size());
|
||||||
nsTableFrame::RePositionViews(this);
|
nsTableFrame::RePositionViews(this);
|
||||||
nsTableFrame::InvalidateTableFrame(this, oldGroupRect, oldGroupVisualOverflow,
|
nsTableFrame::InvalidateTableFrame(this, oldGroupRect, oldGroupVisualOverflow,
|
||||||
false);
|
false);
|
||||||
|
|
|
@ -245,7 +245,7 @@ nsBox::SetBounds(nsBoxLayoutState& aState, const nsRect& aRect, bool aRemoveOver
|
||||||
flags |= stateFlags;
|
flags |= stateFlags;
|
||||||
|
|
||||||
if ((flags & NS_FRAME_NO_MOVE_FRAME) == NS_FRAME_NO_MOVE_FRAME)
|
if ((flags & NS_FRAME_NO_MOVE_FRAME) == NS_FRAME_NO_MOVE_FRAME)
|
||||||
SetSize(nsSize(aRect.width, aRect.height));
|
SetSize(aRect.Size());
|
||||||
else
|
else
|
||||||
SetRect(aRect);
|
SetRect(aRect);
|
||||||
|
|
||||||
|
|
|
@ -496,7 +496,7 @@ nsImageBoxFrame::GetPrefSize(nsBoxLayoutState& aState)
|
||||||
GetImageSize();
|
GetImageSize();
|
||||||
|
|
||||||
if (!mUseSrcAttr && (mSubRect.width > 0 || mSubRect.height > 0))
|
if (!mUseSrcAttr && (mSubRect.width > 0 || mSubRect.height > 0))
|
||||||
size = nsSize(mSubRect.width, mSubRect.height);
|
size = mSubRect.Size();
|
||||||
else
|
else
|
||||||
size = mImageSize;
|
size = mImageSize;
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче