Bug 786533 - Replace NS_MIN/NS_MAX with std::min/std::max and #include <algorithm> where needed. r=ehsan
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include "nsTableFrame.h"
|
||||
#include "nsTableColFrame.h"
|
||||
#include "nsTableCellFrame.h"
|
||||
#include <algorithm>
|
||||
|
||||
FixedTableLayoutStrategy::FixedTableLayoutStrategy(nsTableFrame *aTableFrame)
|
||||
: nsITableLayoutStrategy(nsITableLayoutStrategy::Fixed)
|
||||
@@ -294,7 +295,7 @@ FixedTableLayoutStrategy::ComputeColumnWidths(const nsHTMLReflowState& aReflowSt
|
||||
// had percentage widths. The spec doesn't say to do this,
|
||||
// but we've always done it in the past, and so does WinIE6.
|
||||
nscoord pctUsed = NSToCoordFloor(pctTotal * float(tableWidth));
|
||||
nscoord reduce = NS_MIN(pctUsed, -unassignedSpace);
|
||||
nscoord reduce = std::min(pctUsed, -unassignedSpace);
|
||||
float reduceRatio = float(reduce) / pctTotal;
|
||||
for (int32_t col = 0; col < colCount; ++col) {
|
||||
nsTableColFrame *colFrame = mTableFrame->GetColFrame(col);
|
||||
|
||||
Reference in New Issue
Block a user