Index: Source/core/rendering/RenderTableCell.cpp |
diff --git a/Source/core/rendering/RenderTableCell.cpp b/Source/core/rendering/RenderTableCell.cpp |
index 5cf8270ad1243be812ed128b3ae861c79fd8c63c..dd07efe85a1595d48cc8b9ac3c8d99f2776e027e 100644 |
--- a/Source/core/rendering/RenderTableCell.cpp |
+++ b/Source/core/rendering/RenderTableCell.cpp |
@@ -37,8 +37,6 @@ |
#include "platform/geometry/TransformState.h" |
#include "platform/graphics/GraphicsContextStateSaver.h" |
-using namespace std; |
- |
namespace WebCore { |
using namespace HTMLNames; |
@@ -75,7 +73,7 @@ unsigned RenderTableCell::parseColSpanFromDOM() const |
{ |
ASSERT(node()); |
if (isHTMLTableCellElement(*node())) |
- return min<unsigned>(toHTMLTableCellElement(*node()).colSpan(), maxColumnIndex); |
+ return std::min<unsigned>(toHTMLTableCellElement(*node()).colSpan(), maxColumnIndex); |
return 1; |
} |
@@ -83,7 +81,7 @@ unsigned RenderTableCell::parseRowSpanFromDOM() const |
{ |
ASSERT(node()); |
if (isHTMLTableCellElement(*node())) |
- return min<unsigned>(toHTMLTableCellElement(*node()).rowSpan(), maxRowIndex); |
+ return std::min<unsigned>(toHTMLTableCellElement(*node()).rowSpan(), maxRowIndex); |
return 1; |
} |
@@ -137,7 +135,7 @@ Length RenderTableCell::logicalWidthFromColumns(RenderTableCol* firstColForThisC |
// Column widths specified on <col> apply to the border box of the cell, see bug 8126. |
// FIXME: Why is border/padding ignored in the negative width case? |
if (colWidthSum > 0) |
- return Length(max(0, colWidthSum - borderAndPaddingLogicalWidth().ceil()), Fixed); |
+ return Length(std::max(0, colWidthSum - borderAndPaddingLogicalWidth().ceil()), Fixed); |
return Length(colWidthSum, Fixed); |
} |
@@ -153,13 +151,14 @@ void RenderTableCell::computePreferredLogicalWidths() |
// See if nowrap was set. |
Length w = styleOrColLogicalWidth(); |
const AtomicString& nowrap = toElement(node())->getAttribute(nowrapAttr); |
- if (!nowrap.isNull() && w.isFixed()) |
+ if (!nowrap.isNull() && w.isFixed()) { |
// Nowrap is set, but we didn't actually use it because of the |
// fixed width set on the cell. Even so, it is a WinIE/Moz trait |
// to make the minwidth of the cell into the fixed width. They do this |
// even in strict mode, so do not make this a quirk. Affected the top |
// of hiptop.com. |
- m_minPreferredLogicalWidth = max<LayoutUnit>(w.value(), m_minPreferredLogicalWidth); |
+ m_minPreferredLogicalWidth = std::max<LayoutUnit>(w.value(), m_minPreferredLogicalWidth); |
+ } |
} |
} |
@@ -246,7 +245,7 @@ void RenderTableCell::layout() |
// of them wrong. So if our content's intrinsic height has changed push the new content up into the intrinsic padding and relayout so that the rest of |
// table and row layout can use the correct baseline and height for this cell. |
if (isBaselineAligned() && section()->rowBaseline(rowIndex()) && cellBaselinePosition() > section()->rowBaseline(rowIndex())) { |
- int newIntrinsicPaddingBefore = max<LayoutUnit>(0, intrinsicPaddingBefore() - max<LayoutUnit>(0, cellBaselinePosition() - oldCellBaseline)); |
+ int newIntrinsicPaddingBefore = std::max<LayoutUnit>(0, intrinsicPaddingBefore() - std::max<LayoutUnit>(0, cellBaselinePosition() - oldCellBaseline)); |
setIntrinsicPaddingBefore(newIntrinsicPaddingBefore); |
SubtreeLayoutScope layouter(*this); |
layouter.setNeedsLayout(this); |
@@ -305,7 +304,7 @@ LayoutUnit RenderTableCell::paddingAfter() const |
void RenderTableCell::setOverrideLogicalContentHeightFromRowHeight(LayoutUnit rowHeight) |
{ |
clearIntrinsicPadding(); |
- setOverrideLogicalContentHeight(max<LayoutUnit>(0, rowHeight - borderAndPaddingLogicalHeight())); |
+ setOverrideLogicalContentHeight(std::max<LayoutUnit>(0, rowHeight - borderAndPaddingLogicalHeight())); |
} |
LayoutSize RenderTableCell::offsetFromContainer(const RenderObject* o, const LayoutPoint& point, bool* offsetDependsOnPoint) const |
@@ -330,36 +329,36 @@ LayoutRect RenderTableCell::clippedOverflowRectForPaintInvalidation(const Render |
bool rtl = !styleForCellFlow()->isLeftToRightDirection(); |
int outlineSize = style()->outlineSize(); |
- int left = max(borderHalfLeft(true), outlineSize); |
- int right = max(borderHalfRight(true), outlineSize); |
- int top = max(borderHalfTop(true), outlineSize); |
- int bottom = max(borderHalfBottom(true), outlineSize); |
+ int left = std::max(borderHalfLeft(true), outlineSize); |
+ int right = std::max(borderHalfRight(true), outlineSize); |
+ int top = std::max(borderHalfTop(true), outlineSize); |
+ int bottom = std::max(borderHalfBottom(true), outlineSize); |
if ((left && !rtl) || (right && rtl)) { |
if (RenderTableCell* before = table()->cellBefore(this)) { |
- top = max(top, before->borderHalfTop(true)); |
- bottom = max(bottom, before->borderHalfBottom(true)); |
+ top = std::max(top, before->borderHalfTop(true)); |
+ bottom = std::max(bottom, before->borderHalfBottom(true)); |
} |
} |
if ((left && rtl) || (right && !rtl)) { |
if (RenderTableCell* after = table()->cellAfter(this)) { |
- top = max(top, after->borderHalfTop(true)); |
- bottom = max(bottom, after->borderHalfBottom(true)); |
+ top = std::max(top, after->borderHalfTop(true)); |
+ bottom = std::max(bottom, after->borderHalfBottom(true)); |
} |
} |
if (top) { |
if (RenderTableCell* above = table()->cellAbove(this)) { |
- left = max(left, above->borderHalfLeft(true)); |
- right = max(right, above->borderHalfRight(true)); |
+ left = std::max(left, above->borderHalfLeft(true)); |
+ right = std::max(right, above->borderHalfRight(true)); |
} |
} |
if (bottom) { |
if (RenderTableCell* below = table()->cellBelow(this)) { |
- left = max(left, below->borderHalfLeft(true)); |
- right = max(right, below->borderHalfRight(true)); |
+ left = std::max(left, below->borderHalfLeft(true)); |
+ right = std::max(right, below->borderHalfRight(true)); |
} |
} |
- LayoutPoint location(max<LayoutUnit>(left, -visualOverflowRect().x()), max<LayoutUnit>(top, -visualOverflowRect().y())); |
- LayoutRect r(-location.x(), -location.y(), location.x() + max(width() + right, visualOverflowRect().maxX()), location.y() + max(height() + bottom, visualOverflowRect().maxY())); |
+ LayoutPoint location(std::max<LayoutUnit>(left, -visualOverflowRect().x()), std::max<LayoutUnit>(top, -visualOverflowRect().y())); |
+ LayoutRect r(-location.x(), -location.y(), location.x() + std::max(width() + right, visualOverflowRect().maxX()), location.y() + std::max(height() + bottom, visualOverflowRect().maxY())); |
if (!RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) { |
if (RenderView* v = view()) { |