Index: third_party/WebKit/Source/core/layout/LayoutBox.cpp |
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp |
index 01889c3f2ea2f734be4965fe942feb12c5d237aa..a5497ff3e5790c8c31fa3d62d71362367e22fbed 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp |
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp |
@@ -759,9 +759,10 @@ LayoutUnit LayoutBox::constrainLogicalWidthByMinMax(LayoutUnit logicalWidth, |
std::min(logicalWidth, |
computeLogicalWidthUsing(MaxSize, styleToUse.logicalMaxWidth(), |
availableWidth, cb)); |
- return std::max(logicalWidth, computeLogicalWidthUsing( |
- MinSize, styleToUse.logicalMinWidth(), |
- availableWidth, cb)); |
+ return std::max( |
+ logicalWidth, |
+ computeLogicalWidthUsing(MinSize, styleToUse.logicalMinWidth(), |
+ availableWidth, cb)); |
} |
LayoutUnit LayoutBox::constrainLogicalHeightByMinMax( |
@@ -774,9 +775,10 @@ LayoutUnit LayoutBox::constrainLogicalHeightByMinMax( |
if (maxH != -1) |
logicalHeight = std::min(logicalHeight, maxH); |
} |
- return std::max(logicalHeight, computeLogicalHeightUsing( |
- MinSize, styleToUse.logicalMinHeight(), |
- intrinsicContentHeight)); |
+ return std::max( |
+ logicalHeight, |
+ computeLogicalHeightUsing(MinSize, styleToUse.logicalMinHeight(), |
+ intrinsicContentHeight)); |
} |
LayoutUnit LayoutBox::constrainContentBoxLogicalHeightByMinMax( |
@@ -791,9 +793,9 @@ LayoutUnit LayoutBox::constrainContentBoxLogicalHeightByMinMax( |
styleToUse.logicalHeight().type() == Percent) { |
LayoutUnit availableLogicalHeight( |
logicalHeight / styleToUse.logicalHeight().value() * 100); |
- logicalHeight = |
- std::min(logicalHeight, valueForLength(styleToUse.logicalMaxHeight(), |
- availableLogicalHeight)); |
+ logicalHeight = std::min(logicalHeight, |
+ valueForLength(styleToUse.logicalMaxHeight(), |
+ availableLogicalHeight)); |
} else { |
LayoutUnit maxHeight(computeContentLogicalHeight( |
MaxSize, styleToUse.logicalMaxHeight(), intrinsicContentHeight)); |
@@ -1797,8 +1799,9 @@ LayoutRect LayoutBox::overflowClipRect( |
LayoutRect clipRect = borderBoxRect(); |
clipRect.setLocation(location + clipRect.location() + |
LayoutSize(borderLeft(), borderTop())); |
- clipRect.setSize(clipRect.size() - LayoutSize(borderLeft() + borderRight(), |
- borderTop() + borderBottom())); |
+ clipRect.setSize( |
+ clipRect.size() - |
+ LayoutSize(borderLeft() + borderRight(), borderTop() + borderBottom())); |
if (hasOverflowClip()) |
excludeScrollbars(clipRect, overlayScrollbarClipBehavior); |
@@ -1848,9 +1851,10 @@ LayoutRect LayoutBox::clipRect(const LayoutPoint& location) const { |
} |
if (!style()->clipBottom().isAuto()) |
- clipRect.contract(LayoutUnit(), |
- size().height() - valueForLength(style()->clipBottom(), |
- size().height())); |
+ clipRect.contract( |
+ LayoutUnit(), |
+ size().height() - |
+ valueForLength(style()->clipBottom(), size().height())); |
return clipRect; |
} |
@@ -2686,9 +2690,10 @@ LayoutUnit LayoutBox::computeLogicalWidthUsing(SizeType widthType, |
if (shrinkToAvoidFloats() && cb->isLayoutBlockFlow() && |
toLayoutBlockFlow(cb)->containsFloats()) |
- logicalWidthResult = std::min( |
- logicalWidthResult, shrinkLogicalWidthToAvoidFloats( |
- marginStart, marginEnd, toLayoutBlockFlow(cb))); |
+ logicalWidthResult = |
+ std::min(logicalWidthResult, |
+ shrinkLogicalWidthToAvoidFloats(marginStart, marginEnd, |
+ toLayoutBlockFlow(cb))); |
if (widthType == MainOrPreferredSize && |
sizesLogicalWidthToFitContent(logicalWidth)) |
@@ -2861,9 +2866,9 @@ void LayoutBox::computeMarginsForDirection(MarginDirection flowDirection, |
// width of the containing block, then any 'auto' values for 'margin-left' or |
// 'margin-right' are, for the following rules, treated as zero. |
LayoutUnit marginBoxWidth = |
- childWidth + (!style()->width().isAuto() |
- ? marginStartWidth + marginEndWidth |
- : LayoutUnit()); |
+ childWidth + |
+ (!style()->width().isAuto() ? marginStartWidth + marginEndWidth |
+ : LayoutUnit()); |
if (marginBoxWidth < availableWidth) { |
// CSS 2.1: "If both 'margin-left' and 'margin-right' are 'auto', their used |
@@ -3262,9 +3267,10 @@ LayoutUnit LayoutBox::computePercentageLogicalHeight( |
// |availableHeight| (given by |overrideLogicalContentHeight|) to arrive |
// at the child's computed height. |
bool subtractBorderAndPadding = |
- isTable() || (cb->isTableCell() && !skippedAutoHeightContainingBlock && |
- cb->hasOverrideLogicalContentHeight() && |
- style()->boxSizing() == EBoxSizing::kContentBox); |
+ isTable() || |
+ (cb->isTableCell() && !skippedAutoHeightContainingBlock && |
+ cb->hasOverrideLogicalContentHeight() && |
+ style()->boxSizing() == EBoxSizing::kContentBox); |
if (subtractBorderAndPadding) { |
result -= borderAndPaddingLogicalHeight(); |
return std::max(LayoutUnit(), result); |
@@ -3336,8 +3342,10 @@ LayoutUnit LayoutBox::computeReplacedLogicalWidthUsing( |
return computeIntrinsicLogicalWidthUsing( |
logicalWidth, cw, borderAndPaddingLogicalWidth()) - |
borderAndPaddingLogicalWidth(); |
- if (cw > 0 || (!cw && (containerLogicalWidth.isFixed() || |
- containerLogicalWidth.isPercentOrCalc()))) |
+ if (cw > 0 || |
+ (!cw && |
+ (containerLogicalWidth.isFixed() || |
+ containerLogicalWidth.isPercentOrCalc()))) |
return adjustContentBoxLogicalWidthForBoxSizing( |
minimumValueForLength(logicalWidth, cw)); |
return LayoutUnit(); |
@@ -3549,9 +3557,10 @@ LayoutUnit LayoutBox::availableLogicalHeightUsing( |
computeContentAndScrollbarLogicalHeightUsing(MainOrPreferredSize, h, |
LayoutUnit(-1)); |
if (heightIncludingScrollbar != -1) |
- return std::max(LayoutUnit(), adjustContentBoxLogicalHeightForBoxSizing( |
- heightIncludingScrollbar) - |
- scrollbarLogicalHeight()); |
+ return std::max( |
+ LayoutUnit(), |
+ adjustContentBoxLogicalHeightForBoxSizing(heightIncludingScrollbar) - |
+ scrollbarLogicalHeight()); |
// FIXME: Check logicalTop/logicalBottom here to correctly handle vertical |
// writing-mode. |
@@ -4031,8 +4040,9 @@ void LayoutBox::computePositionedLogicalWidthUsing( |
computedValues.m_extent = logicalWidthValue; |
const LayoutUnit availableSpace = |
- containerLogicalWidth - (logicalLeftValue + computedValues.m_extent + |
- logicalRightValue + bordersPlusPadding); |
+ containerLogicalWidth - |
+ (logicalLeftValue + computedValues.m_extent + logicalRightValue + |
+ bordersPlusPadding); |
// Margins are now the only unknown |
if (marginLogicalLeft.isAuto() && marginLogicalRight.isAuto()) { |