Bug 841192. Part 13: Rename nsFrame::ApplyOverflowClipping to ShouldApplyOverflowClipping. r=mattwoodrow

We rename nsFrame::ApplyOverflowClipping to nsFrame::ShouldApplyOverflowClipping
to reflect the fact that it doesn't cause any clipping.

--HG--
extra : rebase_source : d3bd1ef902276526b37b27c510a8d3a9db6416dc
This commit is contained in:
Robert O'Callahan 2013-03-07 00:08:16 +13:00
Родитель 8efacba3aa
Коммит b9592746c4
5 изменённых файлов: 11 добавлений и 11 удалений

Просмотреть файл

@ -1670,9 +1670,9 @@ RoundedBorderIntersectsRect(nsIFrame* aFrame,
nscoord radii[8];
return !aFrame->GetBorderRadii(radii) ||
RoundedRectIntersectsRect(nsRect(aFrameToReferenceFrame,
aFrame->GetSize()),
radii, aTestRect);
nsLayoutUtils::RoundedRectIntersectsRect(nsRect(aFrameToReferenceFrame,
aFrame->GetSize()),
radii, aTestRect);
}
// Returns TRUE if aContainedRect is guaranteed to be contained in

Просмотреть файл

@ -979,7 +979,7 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext,
// make sure our kids fit too.
if (aReflowState.availableHeight != NS_UNCONSTRAINEDSIZE &&
aReflowState.ComputedHeight() != NS_AUTOHEIGHT &&
ApplyOverflowClipping(this, aReflowState.mStyleDisplay)) {
ShouldApplyOverflowClipping(this, aReflowState.mStyleDisplay)) {
nsMargin heightExtras = aReflowState.mComputedBorderPadding;
if (GetSkipSides() & NS_SIDE_TOP) {
heightExtras.top = 0;
@ -1502,7 +1502,7 @@ nsBlockFrame::ComputeOverflowAreas(const nsRect& aBounds,
// XXX_perf: This can be done incrementally. It is currently one of
// the things that makes incremental reflow O(N^2).
nsOverflowAreas areas(aBounds, aBounds);
if (!ApplyOverflowClipping(this, aDisplay)) {
if (!ShouldApplyOverflowClipping(this, aDisplay)) {
for (line_iterator line = begin_lines(), line_end = end_lines();
line != line_end;
++line) {

Просмотреть файл

@ -1606,7 +1606,7 @@ static bool ApplyOverflowClipping(nsDisplayListBuilder* aBuilder,
// We allow -moz-hidden-unscrollable to apply to any kind of frame. This
// is required by comboboxes which make their display text (an inline frame)
// have clipping.
if (!nsFrame::ApplyOverflowClipping(aFrame, aDisp)) {
if (!nsFrame::ShouldApplyOverflowClipping(aFrame, aDisp)) {
return false;
}
*aRect = aFrame->GetPaddingRect() - aFrame->GetPosition();
@ -6932,7 +6932,7 @@ nsIFrame::FinishAndStoreOverflow(nsOverflowAreas& aOverflowAreas,
NS_ASSERTION((disp->mOverflowY == NS_STYLE_OVERFLOW_CLIP) ==
(disp->mOverflowX == NS_STYLE_OVERFLOW_CLIP),
"If one overflow is clip, the other should be too");
if (nsFrame::ApplyOverflowClipping(this, disp)) {
if (nsFrame::ShouldApplyOverflowClipping(this, disp)) {
// The contents are actually clipped to the padding area
aOverflowAreas.SetAllTo(bounds);
}

Просмотреть файл

@ -591,8 +591,8 @@ public:
/**
* Returns true if aFrame should apply overflow clipping.
*/
static bool ApplyOverflowClipping(const nsIFrame* aFrame,
const nsStyleDisplay* aDisp)
static bool ShouldApplyOverflowClipping(const nsIFrame* aFrame,
const nsStyleDisplay* aDisp)
{
// clip overflow:-moz-hidden-unscrollable ...
if (MOZ_UNLIKELY(aDisp->mOverflowX == NS_STYLE_OVERFLOW_CLIP)) {

Просмотреть файл

@ -1786,7 +1786,7 @@ NS_METHOD nsTableFrame::Reflow(nsPresContext* aPresContext,
// make sure the table overflow area does include the table rect.
nsRect tableRect(0, 0, aDesiredSize.width, aDesiredSize.height) ;
if (!ApplyOverflowClipping(this, aReflowState.mStyleDisplay)) {
if (!ShouldApplyOverflowClipping(this, aReflowState.mStyleDisplay)) {
// collapsed border may leak out
nsMargin bcMargin = GetExcludedOuterBCBorder();
tableRect.Inflate(bcMargin);
@ -1810,7 +1810,7 @@ nsTableFrame::UpdateOverflow()
// As above in Reflow, make sure the table overflow area includes the table
// rect, and check for collapsed borders leaking out.
if (!ApplyOverflowClipping(this, StyleDisplay())) {
if (!ShouldApplyOverflowClipping(this, StyleDisplay())) {
nsMargin bcMargin = GetExcludedOuterBCBorder();
bounds.Inflate(bcMargin);
}