Bug 786533 - Replace NS_MIN/NS_MAX with std::min/std::max and #include <algorithm> where needed. r=ehsan

This commit is contained in:
Mats Palmgren
2013-01-15 13:22:03 +01:00
parent 9f4749fbb5
commit 7532b4e736
337 changed files with 1739 additions and 1410 deletions

View File

@@ -28,6 +28,7 @@
#include "nsLayoutUtils.h"
#include "nsTextFrame.h"
#include "FrameLayerBuilder.h"
#include <algorithm>
//TABLECELL SELECTION
#include "nsFrameSelection.h"
@@ -227,7 +228,7 @@ nsTableCellFrame::DidSetStyleContext(nsStyleContext* aOldStyleContext)
// row span needs to be clamped as we do not create rows in the cellmap
// which do not have cells originating in them
nsIntRect damageArea(colIndex, rowIndex, GetColSpan(),
NS_MIN(GetRowSpan(), tableFrame->GetRowCount() - rowIndex));
std::min(GetRowSpan(), tableFrame->GetRowCount() - rowIndex));
tableFrame->AddBCDamageArea(damageArea);
}
}
@@ -574,7 +575,7 @@ void nsTableCellFrame::VerticallyAlignChild(nscoord aMaxAscent)
kidYTop = (height - childHeight - bottomInset + topInset) / 2;
}
// if the content is larger than the cell height align from top
kidYTop = NS_MAX(0, kidYTop);
kidYTop = std::max(0, kidYTop);
if (kidYTop != kidRect.y) {
// Invalidate at the old position first