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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.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/LayoutDeprecatedFlexibleBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp b/third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp
index 5ed48fa13ef3125b5e3b8fd5cc80f076a992f823..de334bf0e53efc38de58ed19cf9d359220779895 100644
--- a/third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp
@@ -476,9 +476,10 @@ void LayoutDeprecatedFlexibleBox::layoutHorizontalBox(bool relayoutChildren) {
// TODO(jchaffraix): It seems incorrect to check isAtomicInlineLevel in
// this file.
// We probably want to check if the element is replaced.
- if (relayoutChildren || (child->isAtomicInlineLevel() &&
- (child->style()->width().isPercentOrCalc() ||
- child->style()->height().isPercentOrCalc())))
+ if (relayoutChildren ||
+ (child->isAtomicInlineLevel() &&
+ (child->style()->width().isPercentOrCalc() ||
+ child->style()->height().isPercentOrCalc())))
layoutScope.setChildNeedsLayout(child);
// Compute the child's vertical margins.
@@ -508,8 +509,9 @@ void LayoutDeprecatedFlexibleBox::layoutHorizontalBox(bool relayoutChildren) {
// Now update our height.
setHeight(std::max(yPos + maxAscent + maxDescent, size().height()));
} else {
- setHeight(std::max(size().height(), yPos + child->size().height() +
- child->marginHeight()));
+ setHeight(
+ std::max(size().height(),
+ yPos + child->size().height() + child->marginHeight()));
}
if (paginated)
@@ -517,11 +519,11 @@ void LayoutDeprecatedFlexibleBox::layoutHorizontalBox(bool relayoutChildren) {
}
if (!iterator.first() && hasLineIfEmpty())
- setHeight(size().height() + lineHeight(true,
- style()->isHorizontalWritingMode()
- ? HorizontalLine
- : VerticalLine,
- PositionOfInteriorLineBoxes));
+ setHeight(size().height() +
+ lineHeight(true,
+ style()->isHorizontalWritingMode() ? HorizontalLine
+ : VerticalLine,
+ PositionOfInteriorLineBoxes));
setHeight(size().height() + toAdd);
@@ -583,7 +585,8 @@ void LayoutDeprecatedFlexibleBox::layoutHorizontalBox(bool relayoutChildren) {
childY += child->marginTop() +
((contentHeight() -
(child->size().height() + child->marginHeight())) /
- 2).clampNegativeToZero();
+ 2)
+ .clampNegativeToZero();
break;
case BBASELINE: {
LayoutUnit ascent(child->firstLineBoxBaseline());
@@ -718,10 +721,11 @@ void LayoutDeprecatedFlexibleBox::layoutHorizontalBox(bool relayoutChildren) {
}
} while (haveFlex);
- if (remainingSpace > 0 && ((style()->isLeftToRightDirection() &&
- style()->boxPack() != BoxPackStart) ||
- (!style()->isLeftToRightDirection() &&
- style()->boxPack() != BoxPackEnd))) {
+ if (remainingSpace > 0 &&
+ ((style()->isLeftToRightDirection() &&
+ style()->boxPack() != BoxPackStart) ||
+ (!style()->isLeftToRightDirection() &&
+ style()->boxPack() != BoxPackEnd))) {
// Children must be repositioned.
LayoutUnit offset;
if (style()->boxPack() == BoxPackJustify) {
@@ -829,9 +833,10 @@ void LayoutDeprecatedFlexibleBox::layoutVerticalBox(bool relayoutChildren) {
SubtreeLayoutScope layoutScope(*child);
if (!haveLineClamp &&
- (relayoutChildren || (child->isAtomicInlineLevel() &&
- (child->style()->width().isPercentOrCalc() ||
- child->style()->height().isPercentOrCalc()))))
+ (relayoutChildren ||
+ (child->isAtomicInlineLevel() &&
+ (child->style()->width().isPercentOrCalc() ||
+ child->style()->height().isPercentOrCalc()))))
layoutScope.setChildNeedsLayout(child);
if (child->style()->visibility() == EVisibility::kCollapse) {
@@ -861,7 +866,8 @@ void LayoutDeprecatedFlexibleBox::layoutVerticalBox(bool relayoutChildren) {
childX += child->marginLeft() +
((contentWidth() -
(child->size().width() + child->marginWidth())) /
- 2).clampNegativeToZero();
+ 2)
+ .clampNegativeToZero();
break;
case BEND:
if (!style()->isLeftToRightDirection())
@@ -891,11 +897,11 @@ void LayoutDeprecatedFlexibleBox::layoutVerticalBox(bool relayoutChildren) {
yPos = size().height();
if (!iterator.first() && hasLineIfEmpty())
- setHeight(size().height() + lineHeight(true,
- style()->isHorizontalWritingMode()
- ? HorizontalLine
- : VerticalLine,
- PositionOfInteriorLineBoxes));
+ setHeight(size().height() +
+ lineHeight(true,
+ style()->isHorizontalWritingMode() ? HorizontalLine
+ : VerticalLine,
+ PositionOfInteriorLineBoxes));
setHeight(size().height() + toAdd);
@@ -1087,9 +1093,10 @@ void LayoutDeprecatedFlexibleBox::applyLineClamp(FlexBoxIterator& iterator,
continue;
child->clearOverrideSize();
- if (relayoutChildren || (child->isAtomicInlineLevel() &&
- (child->style()->width().isPercentOrCalc() ||
- child->style()->height().isPercentOrCalc())) ||
+ if (relayoutChildren ||
+ (child->isAtomicInlineLevel() &&
+ (child->style()->width().isPercentOrCalc() ||
+ child->style()->height().isPercentOrCalc())) ||
(child->style()->height().isAuto() && child->isLayoutBlock())) {
child->setChildNeedsLayout(MarkOnlyThis);
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutCounter.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutFieldset.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698