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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutReplaced.cpp

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 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
Index: third_party/WebKit/Source/core/layout/LayoutReplaced.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutReplaced.cpp b/third_party/WebKit/Source/core/layout/LayoutReplaced.cpp
index a07ad8e8f1540276b2ac7b3aff04b07faa0ed7af..862c9f7d36ae9c5bd68c018b4707075159dedcac 100644
--- a/third_party/WebKit/Source/core/layout/LayoutReplaced.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutReplaced.cpp
@@ -509,8 +509,9 @@ void LayoutReplaced::computePositionedLogicalHeight(
logicalBottomValue = valueForLength(logicalBottom, containerLogicalHeight);
// Solve for 'top'
- logicalTopValue = availableSpace - (logicalBottomValue + marginBeforeAlias +
- marginAfterAlias);
+ logicalTopValue =
+ availableSpace -
+ (logicalBottomValue + marginBeforeAlias + marginAfterAlias);
} else if (logicalBottom.isAuto()) {
marginBeforeAlias =
valueForLength(marginBefore, containerRelativeLogicalWidth);
@@ -528,8 +529,9 @@ void LayoutReplaced::computePositionedLogicalHeight(
logicalBottomValue = valueForLength(logicalBottom, containerLogicalHeight);
// Solve for 'margin-top'
- marginBeforeAlias = availableSpace - (logicalTopValue + logicalBottomValue +
- marginAfterAlias);
+ marginBeforeAlias =
+ availableSpace -
+ (logicalTopValue + logicalBottomValue + marginAfterAlias);
} else if (marginAfter.isAuto()) {
marginBeforeAlias =
valueForLength(marginBefore, containerRelativeLogicalWidth);
@@ -537,8 +539,9 @@ void LayoutReplaced::computePositionedLogicalHeight(
logicalBottomValue = valueForLength(logicalBottom, containerLogicalHeight);
// Solve for 'margin-bottom'
- marginAfterAlias = availableSpace - (logicalTopValue + logicalBottomValue +
- marginBeforeAlias);
+ marginAfterAlias =
+ availableSpace -
+ (logicalTopValue + logicalBottomValue + marginBeforeAlias);
} else {
// Nothing is 'auto', just calculate the values.
marginBeforeAlias =
@@ -592,8 +595,9 @@ LayoutRect LayoutReplaced::computeObjectFit(
case ObjectFitScaleDown:
case ObjectFitCover:
finalRect.setSize(finalRect.size().fitToAspectRatio(
- intrinsicSize, objectFit == ObjectFitCover ? AspectRatioFitGrow
- : AspectRatioFitShrink));
+ intrinsicSize,
+ objectFit == ObjectFitCover ? AspectRatioFitGrow
+ : AspectRatioFitShrink));
if (objectFit != ObjectFitScaleDown ||
finalRect.width() <= intrinsicSize.width())
break;
@@ -837,21 +841,25 @@ void LayoutReplaced::computePreferredLogicalWidths() {
if (styleToUse.logicalMinWidth().isFixed() &&
styleToUse.logicalMinWidth().value() > 0) {
- m_maxPreferredLogicalWidth = std::max(
- m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(
- styleToUse.logicalMinWidth().value()));
- m_minPreferredLogicalWidth = std::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 = std::min(
- m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(
- styleToUse.logicalMaxWidth().value()));
- m_minPreferredLogicalWidth = std::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()));
}
LayoutUnit borderAndPadding = borderAndPaddingLogicalWidth();
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutScrollbar.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698