Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1097)

Unified Diff: Source/core/rendering/RenderTable.cpp

Issue 339333002: Removing using declarations that import names in the C++ Standard library. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixing mac error Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/RenderSearchField.cpp ('k') | Source/core/rendering/RenderTableCell.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderTable.cpp
diff --git a/Source/core/rendering/RenderTable.cpp b/Source/core/rendering/RenderTable.cpp
index ea196ecff9541cf1a0fecb8bb2fba1e9ec3b6300..19947392e24e74a14ba0fbd2c5c63de0af50725e 100644
--- a/Source/core/rendering/RenderTable.cpp
+++ b/Source/core/rendering/RenderTable.cpp
@@ -46,8 +46,6 @@
#include "core/rendering/style/StyleInheritedData.h"
#include "platform/graphics/GraphicsContextStateSaver.h"
-using namespace std;
-
namespace WebCore {
using namespace HTMLNames;
@@ -275,30 +273,30 @@ void RenderTable::updateLogicalWidth()
LayoutUnit marginTotal = marginStart + marginEnd;
// Subtract out our margins to get the available content width.
- LayoutUnit availableContentLogicalWidth = max<LayoutUnit>(0, containerWidthInInlineDirection - marginTotal);
+ LayoutUnit availableContentLogicalWidth = std::max<LayoutUnit>(0, containerWidthInInlineDirection - marginTotal);
if (shrinkToAvoidFloats() && cb->containsFloats() && !hasPerpendicularContainingBlock)
availableContentLogicalWidth = shrinkLogicalWidthToAvoidFloats(marginStart, marginEnd, toRenderBlockFlow(cb));
// Ensure we aren't bigger than our available width.
- setLogicalWidth(min<int>(availableContentLogicalWidth, maxPreferredLogicalWidth()));
+ setLogicalWidth(std::min<int>(availableContentLogicalWidth, maxPreferredLogicalWidth()));
}
// Ensure we aren't bigger than our max-width style.
Length styleMaxLogicalWidth = style()->logicalMaxWidth();
if ((styleMaxLogicalWidth.isSpecified() && !styleMaxLogicalWidth.isNegative()) || styleMaxLogicalWidth.isIntrinsic()) {
LayoutUnit computedMaxLogicalWidth = convertStyleLogicalWidthToComputedWidth(styleMaxLogicalWidth, availableLogicalWidth);
- setLogicalWidth(min<int>(logicalWidth(), computedMaxLogicalWidth));
+ setLogicalWidth(std::min<int>(logicalWidth(), computedMaxLogicalWidth));
}
// Ensure we aren't smaller than our min preferred width. This MUST be done after 'max-width' as
// we ignore it if it means we wouldn't accomodate our content.
- setLogicalWidth(max<int>(logicalWidth(), minPreferredLogicalWidth()));
+ setLogicalWidth(std::max<int>(logicalWidth(), minPreferredLogicalWidth()));
// Ensure we aren't smaller than our min-width style.
Length styleMinLogicalWidth = style()->logicalMinWidth();
if ((styleMinLogicalWidth.isSpecified() && !styleMinLogicalWidth.isNegative()) || styleMinLogicalWidth.isIntrinsic()) {
LayoutUnit computedMinLogicalWidth = convertStyleLogicalWidthToComputedWidth(styleMinLogicalWidth, availableLogicalWidth);
- setLogicalWidth(max<int>(logicalWidth(), computedMinLogicalWidth));
+ setLogicalWidth(std::max<int>(logicalWidth(), computedMinLogicalWidth));
}
// Finally, with our true width determined, compute our margins for real.
@@ -349,7 +347,7 @@ LayoutUnit RenderTable::convertStyleLogicalHeightToComputedHeight(const Length&
computedLogicalHeight = computeIntrinsicLogicalContentHeightUsing(styleLogicalHeight, logicalHeight() - borderAndPadding, borderAndPadding);
else
ASSERT_NOT_REACHED();
- return max<LayoutUnit>(0, computedLogicalHeight);
+ return std::max<LayoutUnit>(0, computedLogicalHeight);
}
void RenderTable::layoutCaption(RenderTableCaption* caption)
@@ -480,7 +478,7 @@ void RenderTable::layout()
}
if (logicalHeight() != oldTableLogicalTop) {
sectionMoved = true;
- movedSectionLogicalTop = min(logicalHeight(), oldTableLogicalTop);
+ movedSectionLogicalTop = std::min(logicalHeight(), oldTableLogicalTop);
}
}
@@ -501,13 +499,13 @@ void RenderTable::layout()
Length logicalMaxHeightLength = style()->logicalMaxHeight();
if (logicalMaxHeightLength.isIntrinsic() || (logicalMaxHeightLength.isSpecified() && !logicalMaxHeightLength.isNegative())) {
LayoutUnit computedMaxLogicalHeight = convertStyleLogicalHeightToComputedHeight(logicalMaxHeightLength);
- computedLogicalHeight = min(computedLogicalHeight, computedMaxLogicalHeight);
+ computedLogicalHeight = std::min(computedLogicalHeight, computedMaxLogicalHeight);
}
Length logicalMinHeightLength = style()->logicalMinHeight();
if (logicalMinHeightLength.isIntrinsic() || (logicalMinHeightLength.isSpecified() && !logicalMinHeightLength.isNegative())) {
LayoutUnit computedMinLogicalHeight = convertStyleLogicalHeightToComputedHeight(logicalMinHeightLength);
- computedLogicalHeight = max(computedLogicalHeight, computedMinLogicalHeight);
+ computedLogicalHeight = std::max(computedLogicalHeight, computedMinLogicalHeight);
}
distributeExtraLogicalHeight(floorToInt(computedLogicalHeight - totalSectionLogicalHeight));
@@ -530,7 +528,7 @@ void RenderTable::layout()
while (section) {
if (!sectionMoved && section->logicalTop() != logicalHeight()) {
sectionMoved = true;
- movedSectionLogicalTop = min(logicalHeight(), section->logicalTop()) + (style()->isHorizontalWritingMode() ? section->visualOverflowRect().y() : section->visualOverflowRect().x());
+ movedSectionLogicalTop = std::min(logicalHeight(), section->logicalTop()) + (style()->isHorizontalWritingMode() ? section->visualOverflowRect().y() : section->visualOverflowRect().x());
}
section->setLogicalLocation(LayoutPoint(sectionLogicalLeft, logicalHeight()));
@@ -766,7 +764,7 @@ void RenderTable::computePreferredLogicalWidths()
m_tableLayout->applyPreferredLogicalWidthQuirks(m_minPreferredLogicalWidth, m_maxPreferredLogicalWidth);
for (unsigned i = 0; i < m_captions.size(); i++)
- m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, m_captions[i]->minPreferredLogicalWidth());
+ m_minPreferredLogicalWidth = std::max(m_minPreferredLogicalWidth, m_captions[i]->minPreferredLogicalWidth());
RenderStyle* styleToUse = style();
// FIXME: This should probably be checking for isSpecified since you should be able to use percentage or calc values for min-width.
@@ -987,7 +985,7 @@ int RenderTable::calcBorderStart() const
if (columnAdjoiningBorder.style() == BHIDDEN)
return 0;
if (columnAdjoiningBorder.style() > BHIDDEN)
- borderWidth = max(borderWidth, columnAdjoiningBorder.width());
+ borderWidth = std::max(borderWidth, columnAdjoiningBorder.width());
// FIXME: This logic doesn't properly account for the first column in the first column-group case.
}
@@ -997,7 +995,7 @@ int RenderTable::calcBorderStart() const
return 0;
if (sectionAdjoiningBorder.style() > BHIDDEN)
- borderWidth = max(borderWidth, sectionAdjoiningBorder.width());
+ borderWidth = std::max(borderWidth, sectionAdjoiningBorder.width());
if (const RenderTableCell* adjoiningStartCell = topNonEmptySection->firstRowCellAdjoiningTableStart()) {
// FIXME: Make this work with perpendicular and flipped cells.
@@ -1010,9 +1008,9 @@ int RenderTable::calcBorderStart() const
return 0;
if (startCellAdjoiningBorder.style() > BHIDDEN)
- borderWidth = max(borderWidth, startCellAdjoiningBorder.width());
+ borderWidth = std::max(borderWidth, startCellAdjoiningBorder.width());
if (firstRowAdjoiningBorder.style() > BHIDDEN)
- borderWidth = max(borderWidth, firstRowAdjoiningBorder.width());
+ borderWidth = std::max(borderWidth, firstRowAdjoiningBorder.width());
}
}
return (borderWidth + (style()->isLeftToRightDirection() ? 0 : 1)) / 2;
@@ -1042,7 +1040,7 @@ int RenderTable::calcBorderEnd() const
if (columnAdjoiningBorder.style() == BHIDDEN)
return 0;
if (columnAdjoiningBorder.style() > BHIDDEN)
- borderWidth = max(borderWidth, columnAdjoiningBorder.width());
+ borderWidth = std::max(borderWidth, columnAdjoiningBorder.width());
// FIXME: This logic doesn't properly account for the last column in the last column-group case.
}
@@ -1052,7 +1050,7 @@ int RenderTable::calcBorderEnd() const
return 0;
if (sectionAdjoiningBorder.style() > BHIDDEN)
- borderWidth = max(borderWidth, sectionAdjoiningBorder.width());
+ borderWidth = std::max(borderWidth, sectionAdjoiningBorder.width());
if (const RenderTableCell* adjoiningEndCell = topNonEmptySection->firstRowCellAdjoiningTableEnd()) {
// FIXME: Make this work with perpendicular and flipped cells.
@@ -1065,9 +1063,9 @@ int RenderTable::calcBorderEnd() const
return 0;
if (endCellAdjoiningBorder.style() > BHIDDEN)
- borderWidth = max(borderWidth, endCellAdjoiningBorder.width());
+ borderWidth = std::max(borderWidth, endCellAdjoiningBorder.width());
if (firstRowAdjoiningBorder.style() > BHIDDEN)
- borderWidth = max(borderWidth, firstRowAdjoiningBorder.width());
+ borderWidth = std::max(borderWidth, firstRowAdjoiningBorder.width());
}
}
return (borderWidth + (style()->isLeftToRightDirection() ? 1 : 0)) / 2;
@@ -1112,7 +1110,7 @@ int RenderTable::outerBorderBefore() const
if (tb.style() == BHIDDEN)
return 0;
if (tb.style() > BHIDDEN)
- borderWidth = max<int>(borderWidth, tb.width() / 2);
+ borderWidth = std::max<int>(borderWidth, tb.width() / 2);
return borderWidth;
}
@@ -1131,7 +1129,7 @@ int RenderTable::outerBorderAfter() const
if (tb.style() == BHIDDEN)
return 0;
if (tb.style() > BHIDDEN)
- borderWidth = max<int>(borderWidth, (tb.width() + 1) / 2);
+ borderWidth = std::max<int>(borderWidth, (tb.width() + 1) / 2);
return borderWidth;
}
@@ -1154,7 +1152,7 @@ int RenderTable::outerBorderStart() const
if (sw < 0)
continue;
allHidden = false;
- borderWidth = max(borderWidth, sw);
+ borderWidth = std::max(borderWidth, sw);
}
if (allHidden)
return 0;
@@ -1181,7 +1179,7 @@ int RenderTable::outerBorderEnd() const
if (sw < 0)
continue;
allHidden = false;
- borderWidth = max(borderWidth, sw);
+ borderWidth = std::max(borderWidth, sw);
}
if (allHidden)
return 0;
« no previous file with comments | « Source/core/rendering/RenderSearchField.cpp ('k') | Source/core/rendering/RenderTableCell.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698