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

Unified Diff: Source/core/rendering/RenderBlock.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/InlineTextBox.cpp ('k') | Source/core/rendering/RenderBlockFlow.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBlock.cpp
diff --git a/Source/core/rendering/RenderBlock.cpp b/Source/core/rendering/RenderBlock.cpp
index d926fee12130d7a02493563f1917a19fad9044a2..5a83a7715c369eed18e61eab9e3b5124511a1658 100644
--- a/Source/core/rendering/RenderBlock.cpp
+++ b/Source/core/rendering/RenderBlock.cpp
@@ -69,7 +69,6 @@
#include "wtf/StdLibExtras.h"
#include "wtf/TemporaryChange.h"
-using namespace std;
using namespace WTF;
using namespace Unicode;
@@ -1464,9 +1463,9 @@ void RenderBlock::computeOverflow(LayoutUnit oldClientAfterEdge, bool)
LayoutRect clientRect(noOverflowRect());
LayoutRect rectToApply;
if (isHorizontalWritingMode())
- rectToApply = LayoutRect(clientRect.x(), clientRect.y(), 1, max<LayoutUnit>(0, oldClientAfterEdge - clientRect.y()));
+ rectToApply = LayoutRect(clientRect.x(), clientRect.y(), 1, std::max<LayoutUnit>(0, oldClientAfterEdge - clientRect.y()));
else
- rectToApply = LayoutRect(clientRect.x(), clientRect.y(), max<LayoutUnit>(0, oldClientAfterEdge - clientRect.x()), 1);
+ rectToApply = LayoutRect(clientRect.x(), clientRect.y(), std::max<LayoutUnit>(0, oldClientAfterEdge - clientRect.x()), 1);
addLayoutOverflow(rectToApply);
if (hasRenderOverflow())
m_overflow->setLayoutClientAfterEdge(oldClientAfterEdge);
@@ -2434,8 +2433,8 @@ LayoutRect RenderBlock::blockSelectionGap(RenderBlock* rootBlock, const LayoutPo
return LayoutRect();
// Get the selection offsets for the bottom of the gap
- LayoutUnit logicalLeft = max(lastLogicalLeft, logicalLeftSelectionOffset(rootBlock, logicalBottom));
- LayoutUnit logicalRight = min(lastLogicalRight, logicalRightSelectionOffset(rootBlock, logicalBottom));
+ LayoutUnit logicalLeft = std::max(lastLogicalLeft, logicalLeftSelectionOffset(rootBlock, logicalBottom));
+ LayoutUnit logicalRight = std::min(lastLogicalRight, logicalRightSelectionOffset(rootBlock, logicalBottom));
LayoutUnit logicalWidth = logicalRight - logicalLeft;
if (logicalWidth <= 0)
return LayoutRect();
@@ -2450,8 +2449,8 @@ LayoutRect RenderBlock::logicalLeftSelectionGap(RenderBlock* rootBlock, const La
RenderObject* selObj, LayoutUnit logicalLeft, LayoutUnit logicalTop, LayoutUnit logicalHeight, const PaintInfo* paintInfo)
{
LayoutUnit rootBlockLogicalTop = rootBlock->blockDirectionOffset(offsetFromRootBlock) + logicalTop;
- LayoutUnit rootBlockLogicalLeft = max(logicalLeftSelectionOffset(rootBlock, logicalTop), logicalLeftSelectionOffset(rootBlock, logicalTop + logicalHeight));
- LayoutUnit rootBlockLogicalRight = min(rootBlock->inlineDirectionOffset(offsetFromRootBlock) + floorToInt(logicalLeft), min(logicalRightSelectionOffset(rootBlock, logicalTop), logicalRightSelectionOffset(rootBlock, logicalTop + logicalHeight)));
+ LayoutUnit rootBlockLogicalLeft = std::max(logicalLeftSelectionOffset(rootBlock, logicalTop), logicalLeftSelectionOffset(rootBlock, logicalTop + logicalHeight));
+ LayoutUnit rootBlockLogicalRight = std::min(rootBlock->inlineDirectionOffset(offsetFromRootBlock) + floorToInt(logicalLeft), std::min(logicalRightSelectionOffset(rootBlock, logicalTop), logicalRightSelectionOffset(rootBlock, logicalTop + logicalHeight)));
LayoutUnit rootBlockLogicalWidth = rootBlockLogicalRight - rootBlockLogicalLeft;
if (rootBlockLogicalWidth <= 0)
return LayoutRect();
@@ -2466,8 +2465,8 @@ LayoutRect RenderBlock::logicalRightSelectionGap(RenderBlock* rootBlock, const L
RenderObject* selObj, LayoutUnit logicalRight, LayoutUnit logicalTop, LayoutUnit logicalHeight, const PaintInfo* paintInfo)
{
LayoutUnit rootBlockLogicalTop = rootBlock->blockDirectionOffset(offsetFromRootBlock) + logicalTop;
- LayoutUnit rootBlockLogicalLeft = max(rootBlock->inlineDirectionOffset(offsetFromRootBlock) + floorToInt(logicalRight), max(logicalLeftSelectionOffset(rootBlock, logicalTop), logicalLeftSelectionOffset(rootBlock, logicalTop + logicalHeight)));
- LayoutUnit rootBlockLogicalRight = min(logicalRightSelectionOffset(rootBlock, logicalTop), logicalRightSelectionOffset(rootBlock, logicalTop + logicalHeight));
+ LayoutUnit rootBlockLogicalLeft = std::max(rootBlock->inlineDirectionOffset(offsetFromRootBlock) + floorToInt(logicalRight), max(logicalLeftSelectionOffset(rootBlock, logicalTop), logicalLeftSelectionOffset(rootBlock, logicalTop + logicalHeight)));
+ LayoutUnit rootBlockLogicalRight = std::min(logicalRightSelectionOffset(rootBlock, logicalTop), logicalRightSelectionOffset(rootBlock, logicalTop + logicalHeight));
LayoutUnit rootBlockLogicalWidth = rootBlockLogicalRight - rootBlockLogicalLeft;
if (rootBlockLogicalWidth <= 0)
return LayoutRect();
@@ -3098,7 +3097,7 @@ PositionWithAffinity RenderBlock::positionForPointWithInlineChildren(const Layou
if (closestBox) {
if (moveCaretToBoundary) {
- LayoutUnit firstRootBoxWithChildrenTop = min<LayoutUnit>(firstRootBoxWithChildren->selectionTop(), firstRootBoxWithChildren->logicalTop());
+ LayoutUnit firstRootBoxWithChildrenTop = std::min<LayoutUnit>(firstRootBoxWithChildren->selectionTop(), firstRootBoxWithChildren->logicalTop());
if (pointInLogicalContents.y() < firstRootBoxWithChildrenTop
|| (blocksAreFlipped && pointInLogicalContents.y() == firstRootBoxWithChildrenTop)) {
InlineBox* box = firstRootBoxWithChildren->firstLeafChild();
@@ -3239,17 +3238,17 @@ void RenderBlock::calcColumnWidth()
LayoutUnit availWidth = desiredColumnWidth;
LayoutUnit colGap = columnGap();
- LayoutUnit colWidth = max<LayoutUnit>(1, LayoutUnit(style()->columnWidth()));
- int colCount = max<int>(1, style()->columnCount());
+ LayoutUnit colWidth = std::max<LayoutUnit>(1, LayoutUnit(style()->columnWidth()));
+ int colCount = std::max<int>(1, style()->columnCount());
if (style()->hasAutoColumnWidth() && !style()->hasAutoColumnCount()) {
desiredColumnCount = colCount;
- desiredColumnWidth = max<LayoutUnit>(0, (availWidth - ((desiredColumnCount - 1) * colGap)) / desiredColumnCount);
+ desiredColumnWidth = std::max<LayoutUnit>(0, (availWidth - ((desiredColumnCount - 1) * colGap)) / desiredColumnCount);
} else if (!style()->hasAutoColumnWidth() && style()->hasAutoColumnCount()) {
- desiredColumnCount = max<LayoutUnit>(1, (availWidth + colGap) / (colWidth + colGap));
+ desiredColumnCount = std::max<LayoutUnit>(1, (availWidth + colGap) / (colWidth + colGap));
desiredColumnWidth = ((availWidth + colGap) / desiredColumnCount) - colGap;
} else {
- desiredColumnCount = max<LayoutUnit>(min<LayoutUnit>(colCount, (availWidth + colGap) / (colWidth + colGap)), 1);
+ desiredColumnCount = std::max<LayoutUnit>(std::min<LayoutUnit>(colCount, (availWidth + colGap) / (colWidth + colGap)), 1);
desiredColumnWidth = ((availWidth + colGap) / desiredColumnCount) - colGap;
}
setDesiredColumnCountAndWidth(desiredColumnCount, desiredColumnWidth);
@@ -3451,8 +3450,8 @@ void RenderBlock::adjustRectForColumns(LayoutRect& r) const
if (!colHeight)
return;
- LayoutUnit startOffset = max(isHorizontal ? r.y() : r.x(), beforeBorderPadding);
- LayoutUnit endOffset = max(min<LayoutUnit>(isHorizontal ? r.maxY() : r.maxX(), beforeBorderPadding + colCount * colHeight), beforeBorderPadding);
+ LayoutUnit startOffset = std::max(isHorizontal ? r.y() : r.x(), beforeBorderPadding);
+ LayoutUnit endOffset = std::max(std::min<LayoutUnit>(isHorizontal ? r.maxY() : r.maxX(), beforeBorderPadding + colCount * colHeight), beforeBorderPadding);
// FIXME: Can overflow on fast/block/float/float-not-removed-from-next-sibling4.html, see https://bugs.webkit.org/show_bug.cgi?id=68744
unsigned startColumn = (startOffset - beforeBorderPadding) / colHeight;
@@ -3565,7 +3564,7 @@ void RenderBlock::computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Lay
computeBlockPreferredLogicalWidths(minLogicalWidth, maxLogicalWidth);
}
- maxLogicalWidth = max(minLogicalWidth, maxLogicalWidth);
+ maxLogicalWidth = std::max(minLogicalWidth, maxLogicalWidth);
adjustIntrinsicLogicalWidthsForColumns(minLogicalWidth, maxLogicalWidth);
@@ -3576,7 +3575,7 @@ void RenderBlock::computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Lay
if (isTableCell()) {
Length tableCellWidth = toRenderTableCell(this)->styleOrColLogicalWidth();
if (tableCellWidth.isFixed() && tableCellWidth.value() > 0)
- maxLogicalWidth = max(minLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(tableCellWidth.value()));
+ maxLogicalWidth = std::max(minLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(tableCellWidth.value()));
}
int scrollbarWidth = instrinsicScrollbarLogicalWidth();
@@ -3603,13 +3602,13 @@ void RenderBlock::computePreferredLogicalWidths()
computeIntrinsicLogicalWidths(m_minPreferredLogicalWidth, m_maxPreferredLogicalWidth);
if (styleToUse->logicalMinWidth().isFixed() && styleToUse->logicalMinWidth().value() > 0) {
- m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMinWidth().value()));
- m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMinWidth().value()));
+ m_maxPreferredLogicalWidth = std::max(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMinWidth().value()));
+ m_minPreferredLogicalWidth = std::max(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMinWidth().value()));
}
if (styleToUse->logicalMaxWidth().isFixed()) {
- m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMaxWidth().value()));
- m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMaxWidth().value()));
+ m_maxPreferredLogicalWidth = std::min(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMaxWidth().value()));
+ m_minPreferredLogicalWidth = std::min(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMaxWidth().value()));
}
// Table layout uses integers, ceil the preferred widths to ensure that they can contain the contents.
@@ -3638,14 +3637,14 @@ void RenderBlock::adjustIntrinsicLogicalWidthsForColumns(LayoutUnit& minLogicalW
minLogicalWidth = minLogicalWidth * columnCount + gapExtra;
} else {
columnWidth = style()->columnWidth();
- minLogicalWidth = min(minLogicalWidth, columnWidth);
+ minLogicalWidth = std::min(minLogicalWidth, columnWidth);
}
// FIXME: If column-count is auto here, we should resolve it to calculate the maximum
// intrinsic width, instead of pretending that it's 1. The only way to do that is by
// performing a layout pass, but this is not an appropriate time or place for layout. The
// good news is that if height is unconstrained and there are no explicit breaks, the
// resolved column-count really should be 1.
- maxLogicalWidth = max(maxLogicalWidth, columnWidth) * columnCount + gapExtra;
+ maxLogicalWidth = std::max(maxLogicalWidth, columnWidth) * columnCount + gapExtra;
}
}
@@ -3668,11 +3667,11 @@ void RenderBlock::computeBlockPreferredLogicalWidths(LayoutUnit& minLogicalWidth
if (child->isFloating() || (child->isBox() && toRenderBox(child)->avoidsFloats())) {
LayoutUnit floatTotalWidth = floatLeftWidth + floatRightWidth;
if (childStyle->clear() & CLEFT) {
- maxLogicalWidth = max(floatTotalWidth, maxLogicalWidth);
+ maxLogicalWidth = std::max(floatTotalWidth, maxLogicalWidth);
floatLeftWidth = 0;
}
if (childStyle->clear() & CRIGHT) {
- maxLogicalWidth = max(floatTotalWidth, maxLogicalWidth);
+ maxLogicalWidth = std::max(floatTotalWidth, maxLogicalWidth);
floatRightWidth = 0;
}
}
@@ -3703,11 +3702,11 @@ void RenderBlock::computeBlockPreferredLogicalWidths(LayoutUnit& minLogicalWidth
}
LayoutUnit w = childMinPreferredLogicalWidth + margin;
- minLogicalWidth = max(w, minLogicalWidth);
+ minLogicalWidth = std::max(w, minLogicalWidth);
// IE ignores tables for calculation of nowrap. Makes some sense.
if (nowrap && !child->isTable())
- maxLogicalWidth = max(w, maxLogicalWidth);
+ maxLogicalWidth = std::max(w, maxLogicalWidth);
w = childMaxPreferredLogicalWidth + margin;
@@ -3719,13 +3718,13 @@ void RenderBlock::computeBlockPreferredLogicalWidths(LayoutUnit& minLogicalWidth
bool ltr = containingBlock ? containingBlock->style()->isLeftToRightDirection() : styleToUse->isLeftToRightDirection();
LayoutUnit marginLogicalLeft = ltr ? marginStart : marginEnd;
LayoutUnit marginLogicalRight = ltr ? marginEnd : marginStart;
- LayoutUnit maxLeft = marginLogicalLeft > 0 ? max(floatLeftWidth, marginLogicalLeft) : floatLeftWidth + marginLogicalLeft;
- LayoutUnit maxRight = marginLogicalRight > 0 ? max(floatRightWidth, marginLogicalRight) : floatRightWidth + marginLogicalRight;
+ LayoutUnit maxLeft = marginLogicalLeft > 0 ? std::max(floatLeftWidth, marginLogicalLeft) : floatLeftWidth + marginLogicalLeft;
+ LayoutUnit maxRight = marginLogicalRight > 0 ? std::max(floatRightWidth, marginLogicalRight) : floatRightWidth + marginLogicalRight;
w = childMaxPreferredLogicalWidth + maxLeft + maxRight;
- w = max(w, floatLeftWidth + floatRightWidth);
+ w = std::max(w, floatLeftWidth + floatRightWidth);
+ } else {
+ maxLogicalWidth = std::max(floatLeftWidth + floatRightWidth, maxLogicalWidth);
}
- else
- maxLogicalWidth = max(floatLeftWidth + floatRightWidth, maxLogicalWidth);
floatLeftWidth = floatRightWidth = 0;
}
@@ -3734,17 +3733,18 @@ void RenderBlock::computeBlockPreferredLogicalWidths(LayoutUnit& minLogicalWidth
floatLeftWidth += w;
else
floatRightWidth += w;
- } else
- maxLogicalWidth = max(w, maxLogicalWidth);
+ } else {
+ maxLogicalWidth = std::max(w, maxLogicalWidth);
+ }
child = child->nextSibling();
}
// Always make sure these values are non-negative.
- minLogicalWidth = max<LayoutUnit>(0, minLogicalWidth);
- maxLogicalWidth = max<LayoutUnit>(0, maxLogicalWidth);
+ minLogicalWidth = std::max<LayoutUnit>(0, minLogicalWidth);
+ maxLogicalWidth = std::max<LayoutUnit>(0, maxLogicalWidth);
- maxLogicalWidth = max(floatLeftWidth + floatRightWidth, maxLogicalWidth);
+ maxLogicalWidth = std::max(floatLeftWidth + floatRightWidth, maxLogicalWidth);
}
bool RenderBlock::hasLineIfEmpty() const
@@ -4295,9 +4295,9 @@ void RenderBlock::adjustForBorderFit(LayoutUnit x, LayoutUnit& left, LayoutUnit&
if (childrenInline()) {
for (RootInlineBox* box = firstRootBox(); box; box = box->nextRootBox()) {
if (box->firstChild())
- left = min(left, x + static_cast<LayoutUnit>(box->firstChild()->x()));
+ left = std::min(left, x + static_cast<LayoutUnit>(box->firstChild()->x()));
if (box->lastChild())
- right = max(right, x + static_cast<LayoutUnit>(ceilf(box->lastChild()->logicalRight())));
+ right = std::max(right, x + static_cast<LayoutUnit>(ceilf(box->lastChild()->logicalRight())));
}
} else {
for (RenderBox* obj = firstChildBox(); obj; obj = obj->nextSiblingBox()) {
@@ -4306,8 +4306,8 @@ void RenderBlock::adjustForBorderFit(LayoutUnit x, LayoutUnit& left, LayoutUnit&
toRenderBlock(obj)->adjustForBorderFit(x + obj->x(), left, right);
else if (obj->style()->visibility() == VISIBLE) {
// We are a replaced element or some kind of non-block-flow object.
- left = min(left, x + obj->x());
- right = max(right, x + obj->x() + obj->width());
+ left = std::min(left, x + obj->x());
+ right = std::max(right, x + obj->x() + obj->width());
}
}
}
@@ -4329,8 +4329,8 @@ void RenderBlock::fitBorderToLinesIfNeeded()
// Clamp to our existing edges. We can never grow. We only shrink.
LayoutUnit leftEdge = borderLeft() + paddingLeft();
LayoutUnit rightEdge = leftEdge + oldWidth;
- left = min(rightEdge, max(leftEdge, left));
- right = max(left, min(rightEdge, right));
+ left = std::min(rightEdge, std::max(leftEdge, left));
+ right = std::max(left, std::min(rightEdge, right));
LayoutUnit newContentWidth = right - left;
if (newContentWidth == oldWidth)
@@ -4546,8 +4546,8 @@ void RenderBlock::addFocusRingRects(Vector<IntRect>& rects, const LayoutPoint& a
if (!hasOverflowClip() && !hasControlClip()) {
for (RootInlineBox* curr = firstRootBox(); curr; curr = curr->nextRootBox()) {
- LayoutUnit top = max<LayoutUnit>(curr->lineTop(), curr->top());
- LayoutUnit bottom = min<LayoutUnit>(curr->lineBottom(), curr->top() + curr->height());
+ LayoutUnit top = std::max<LayoutUnit>(curr->lineTop(), curr->top());
+ LayoutUnit bottom = std::min<LayoutUnit>(curr->lineBottom(), curr->top() + curr->height());
LayoutRect rect(additionalOffset.x() + curr->x(), additionalOffset.y() + top, curr->width(), bottom - top);
if (!rect.isEmpty())
rects.append(pixelSnappedIntRect(rect));
@@ -4566,8 +4566,8 @@ void RenderBlock::computeSelfHitTestRects(Vector<LayoutRect>& rects, const Layou
if (hasHorizontalLayoutOverflow() || hasVerticalLayoutOverflow()) {
for (RootInlineBox* curr = firstRootBox(); curr; curr = curr->nextRootBox()) {
- LayoutUnit top = max<LayoutUnit>(curr->lineTop(), curr->top());
- LayoutUnit bottom = min<LayoutUnit>(curr->lineBottom(), curr->top() + curr->height());
+ LayoutUnit top = std::max<LayoutUnit>(curr->lineTop(), curr->top());
+ LayoutUnit bottom = std::min<LayoutUnit>(curr->lineBottom(), curr->top() + curr->height());
LayoutRect rect(layerOffset.x() + curr->x(), layerOffset.y() + top, curr->width(), bottom - top);
// It's common for this rect to be entirely contained in our box, so exclude that simple case.
if (!rect.isEmpty() && (rects.isEmpty() || !rects[0].contains(rect)))
@@ -4681,7 +4681,7 @@ static inline LayoutUnit calculateMinimumPageHeight(RenderStyle* renderStyle, Ro
{
// We may require a certain minimum number of lines per page in order to satisfy
// orphans and widows, and that may affect the minimum page height.
- unsigned lineCount = max<unsigned>(renderStyle->hasAutoOrphans() ? 1 : renderStyle->orphans(), renderStyle->hasAutoWidows() ? 1 : renderStyle->widows());
+ unsigned lineCount = std::max<unsigned>(renderStyle->hasAutoOrphans() ? 1 : renderStyle->orphans(), renderStyle->hasAutoWidows() ? 1 : renderStyle->widows());
if (lineCount > 1) {
RootInlineBox* line = lastLine;
for (unsigned i = 1; i < lineCount && line->prevRootBox(); i++)
@@ -4690,7 +4690,7 @@ static inline LayoutUnit calculateMinimumPageHeight(RenderStyle* renderStyle, Ro
// FIXME: Paginating using line overflow isn't all fine. See FIXME in
// adjustLinePositionForPagination() for more details.
LayoutRect overflow = line->logicalVisualOverflowRect(line->lineTop(), line->lineBottom());
- lineTop = min(line->lineTopWithLeading(), overflow.y());
+ lineTop = std::min(line->lineTopWithLeading(), overflow.y());
}
return lineBottom - lineTop;
}
@@ -4717,8 +4717,8 @@ void RenderBlock::adjustLinePositionForPagination(RootInlineBox* lineBox, Layout
// Technically if the location we move the line to has a different line width than our old position, then we need to dirty the
// line and all following lines.
LayoutRect logicalVisualOverflow = lineBox->logicalVisualOverflowRect(lineBox->lineTop(), lineBox->lineBottom());
- LayoutUnit logicalOffset = min(lineBox->lineTopWithLeading(), logicalVisualOverflow.y());
- LayoutUnit logicalBottom = max(lineBox->lineBottomWithLeading(), logicalVisualOverflow.maxY());
+ LayoutUnit logicalOffset = std::min(lineBox->lineTopWithLeading(), logicalVisualOverflow.y());
+ LayoutUnit logicalBottom = std::max(lineBox->lineBottomWithLeading(), logicalVisualOverflow.maxY());
LayoutUnit lineHeight = logicalBottom - logicalOffset;
updateMinimumPageHeight(logicalOffset, calculateMinimumPageHeight(style(), lineBox, logicalOffset, logicalBottom));
logicalOffset += delta;
@@ -4742,14 +4742,14 @@ void RenderBlock::adjustLinePositionForPagination(RootInlineBox* lineBox, Layout
}
if (lineHeight > pageLogicalHeight) {
// Split the top margin in order to avoid splitting the visible part of the line.
- remainingLogicalHeight -= min(lineHeight - pageLogicalHeight, max<LayoutUnit>(0, logicalVisualOverflow.y() - lineBox->lineTopWithLeading()));
+ remainingLogicalHeight -= std::min(lineHeight - pageLogicalHeight, std::max<LayoutUnit>(0, logicalVisualOverflow.y() - lineBox->lineTopWithLeading()));
}
- LayoutUnit totalLogicalHeight = lineHeight + max<LayoutUnit>(0, logicalOffset);
+ LayoutUnit totalLogicalHeight = lineHeight + std::max<LayoutUnit>(0, logicalOffset);
LayoutUnit pageLogicalHeightAtNewOffset = hasUniformPageLogicalHeight ? pageLogicalHeight : pageLogicalHeightForOffset(logicalOffset + remainingLogicalHeight);
setPageBreak(logicalOffset, lineHeight - remainingLogicalHeight);
if (((lineBox == firstRootBox() && totalLogicalHeight < pageLogicalHeightAtNewOffset) || (!style()->hasAutoOrphans() && style()->orphans() >= lineIndex))
&& !isOutOfFlowPositioned() && !isTableCell())
- setPaginationStrut(remainingLogicalHeight + max<LayoutUnit>(0, logicalOffset));
+ setPaginationStrut(remainingLogicalHeight + std::max<LayoutUnit>(0, logicalOffset));
else {
delta += remainingLogicalHeight;
lineBox->setPaginationStrut(remainingLogicalHeight);
« no previous file with comments | « Source/core/rendering/InlineTextBox.cpp ('k') | Source/core/rendering/RenderBlockFlow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698