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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBlockFlow.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/LayoutBlockFlow.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
index c474f8b1a15e3941693854a6f31054498ee16e9b..c89422ae9e3ee16ef5ae92691aa6891e86e51730 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
@@ -370,9 +370,10 @@ bool LayoutBlockFlow::checkIfIsSelfCollapsingBlock() const {
// If the height is 0 or auto, then whether or not we are a self-collapsing
// block depends on whether we have content that is all self-collapsing.
// TODO(alancutter): Make this work correctly for calc lengths.
- if (hasAutoHeight || ((logicalHeightLength.isFixed() ||
- logicalHeightLength.isPercentOrCalc()) &&
- logicalHeightLength.isZero())) {
+ if (hasAutoHeight ||
+ ((logicalHeightLength.isFixed() ||
+ logicalHeightLength.isPercentOrCalc()) &&
+ logicalHeightLength.isZero())) {
// If the block has inline children, see if we generated any line boxes.
// If we have any line boxes, then we can't be self-collapsing, since we
// have content.
@@ -641,10 +642,11 @@ void LayoutBlockFlow::determineLogicalLeftPositionForChild(LayoutBox& child) {
newPosition = std::max(newPosition, positionToAvoidFloats);
}
- setLogicalLeftForChild(child, style()->isLeftToRightDirection()
- ? newPosition
- : totalAvailableLogicalWidth - newPosition -
- logicalWidthForChild(child));
+ setLogicalLeftForChild(child,
+ style()->isLeftToRightDirection()
+ ? newPosition
+ : totalAvailableLogicalWidth - newPosition -
+ logicalWidthForChild(child));
}
void LayoutBlockFlow::setLogicalLeftForChild(LayoutBox& child,
@@ -1303,9 +1305,10 @@ void LayoutBlockFlow::rebuildFloatsFromIntruding() {
LayoutBlockFlow* parentBlockFlow = toLayoutBlockFlow(parent());
bool siblingFloatMayIntrude = false;
LayoutObject* prev = previousSibling();
- while (prev && (!prev->isBox() || !prev->isLayoutBlock() ||
- toLayoutBlock(prev)->avoidsFloats() ||
- toLayoutBlock(prev)->createsNewFormattingContext())) {
+ while (prev &&
+ (!prev->isBox() || !prev->isLayoutBlock() ||
+ toLayoutBlock(prev)->avoidsFloats() ||
+ toLayoutBlock(prev)->createsNewFormattingContext())) {
if (prev->isFloating())
siblingFloatMayIntrude = true;
prev = prev->previousSibling();
@@ -2676,8 +2679,9 @@ void LayoutBlockFlow::markSiblingsWithFloatsForLayout(
for (LayoutObject* next = nextSibling(); next; next = next->nextSibling()) {
if (!next->isLayoutBlockFlow() ||
- (!floatToRemove && (next->isFloatingOrOutOfFlowPositioned() ||
- toLayoutBlockFlow(next)->avoidsFloats())))
+ (!floatToRemove &&
+ (next->isFloatingOrOutOfFlowPositioned() ||
+ toLayoutBlockFlow(next)->avoidsFloats())))
continue;
LayoutBlockFlow* nextBlock = toLayoutBlockFlow(next);
@@ -3766,8 +3770,9 @@ LayoutUnit LayoutBlockFlow::positionAndLayoutFloat(
floatLogicalLocation.x() + childLogicalLeftMargin);
setLogicalLeftForFloat(floatingObject, floatLogicalLocation.x());
setLogicalTopForFloat(floatingObject, logicalTopMarginEdge);
- setLogicalHeightForFloat(floatingObject, logicalHeightForChild(child) +
- marginBefore + marginAfter);
+ setLogicalHeightForFloat(
+ floatingObject,
+ logicalHeightForChild(child) + marginBefore + marginAfter);
if (ShapeOutsideInfo* shapeOutside = child.shapeOutsideInfo())
shapeOutside->setReferenceBoxLogicalSize(logicalSizeForChild(child));
@@ -3825,14 +3830,14 @@ void LayoutBlockFlow::addIntrudingFloats(LayoutBlockFlow* prev,
// parent, since otherwise the left margin will get applied twice.
LayoutSize offset =
isHorizontalWritingMode()
- ? LayoutSize(
- logicalLeftOffset - (prev != parent() ? prev->marginLeft()
- : LayoutUnit()),
- logicalTopOffset)
- : LayoutSize(
- logicalTopOffset,
- logicalLeftOffset - (prev != parent() ? prev->marginTop()
- : LayoutUnit()));
+ ? LayoutSize(logicalLeftOffset -
+ (prev != parent() ? prev->marginLeft()
+ : LayoutUnit()),
+ logicalTopOffset)
+ : LayoutSize(logicalTopOffset,
+ logicalLeftOffset -
+ (prev != parent() ? prev->marginTop()
+ : LayoutUnit()));
m_floatingObjects->add(floatingObject.copyToNewContainer(offset));
}
@@ -3974,8 +3979,9 @@ bool LayoutBlockFlow::hitTestChildren(
locationInContainer, scrolledOffset,
hitTestAction)) {
updateHitTestResult(
- result, flipForWritingMode(toLayoutPoint(locationInContainer.point() -
- accumulatedOffset)));
+ result,
+ flipForWritingMode(
+ toLayoutPoint(locationInContainer.point() - accumulatedOffset)));
return true;
}
} else if (LayoutBlock::hitTestChildren(result, locationInContainer,
@@ -4591,9 +4597,10 @@ void LayoutBlockFlow::addOutlineRects(
if (inlineElementContinuation)
inlineElementContinuation->addOutlineRects(
- rects, additionalOffset +
- (inlineElementContinuation->containingBlock()->location() -
- location()),
+ rects,
+ additionalOffset +
+ (inlineElementContinuation->containingBlock()->location() -
+ location()),
includeBlockOverflows);
}
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlockFlow.h ('k') | third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698