OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 1354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1365 // FIXME: If the child has orthogonal flow, then it already has an overr
ide height set, so use it. | 1365 // FIXME: If the child has orthogonal flow, then it already has an overr
ide height set, so use it. |
1366 if (!hasOrthogonalFlow(child)) { | 1366 if (!hasOrthogonalFlow(child)) { |
1367 LayoutUnit heightBeforeStretching = needToStretchChildLogicalHeight(
child) ? constrainedChildIntrinsicContentLogicalHeight(child) : child->logicalHe
ight(); | 1367 LayoutUnit heightBeforeStretching = needToStretchChildLogicalHeight(
child) ? constrainedChildIntrinsicContentLogicalHeight(child) : child->logicalHe
ight(); |
1368 LayoutUnit stretchedLogicalHeight = heightBeforeStretching + availab
leAlignmentSpaceForChildBeforeStretching(lineCrossAxisExtent, child); | 1368 LayoutUnit stretchedLogicalHeight = heightBeforeStretching + availab
leAlignmentSpaceForChildBeforeStretching(lineCrossAxisExtent, child); |
1369 ASSERT(!child->needsLayout()); | 1369 ASSERT(!child->needsLayout()); |
1370 LayoutUnit desiredLogicalHeight = child->constrainLogicalHeightByMin
Max(stretchedLogicalHeight, heightBeforeStretching - child->borderAndPaddingLogi
calHeight()); | 1370 LayoutUnit desiredLogicalHeight = child->constrainLogicalHeightByMin
Max(stretchedLogicalHeight, heightBeforeStretching - child->borderAndPaddingLogi
calHeight()); |
1371 | 1371 |
1372 // FIXME: Can avoid laying out here in some cases. See https://webki
t.org/b/87905. | 1372 // FIXME: Can avoid laying out here in some cases. See https://webki
t.org/b/87905. |
1373 if (desiredLogicalHeight != child->logicalHeight()) { | 1373 if (desiredLogicalHeight != child->logicalHeight()) { |
1374 child->setOverrideLogicalContentHeight(desiredLogicalHeight - ch
ild->borderAndPaddingLogicalHeight()); | 1374 child->setOverrideLogicalContentHeight(desiredLogicalHeight - ch
ild->borderAndPaddingLogicalHeight()); |
| 1375 child->setOverrideContainingBlockContentLogicalHeight(desiredLog
icalHeight - child->borderAndPaddingLogicalHeight()); |
1375 child->setLogicalHeight(0); | 1376 child->setLogicalHeight(0); |
1376 child->forceChildLayout(); | 1377 child->forceChildLayout(); |
1377 } | 1378 } |
1378 } | 1379 } |
1379 } else if (isColumnFlow() && child->style()->logicalWidth().isAuto()) { | 1380 } else if (isColumnFlow() && child->style()->logicalWidth().isAuto()) { |
1380 // FIXME: If the child doesn't have orthogonal flow, then it already has
an override width set, so use it. | 1381 // FIXME: If the child doesn't have orthogonal flow, then it already has
an override width set, so use it. |
1381 if (hasOrthogonalFlow(child)) { | 1382 if (hasOrthogonalFlow(child)) { |
1382 LayoutUnit childWidth = std::max<LayoutUnit>(0, lineCrossAxisExtent
- crossAxisMarginExtentForChild(child)); | 1383 LayoutUnit childWidth = std::max<LayoutUnit>(0, lineCrossAxisExtent
- crossAxisMarginExtentForChild(child)); |
1383 childWidth = child->constrainLogicalWidthByMinMax(childWidth, childW
idth, this); | 1384 childWidth = child->constrainLogicalWidthByMinMax(childWidth, childW
idth, this); |
1384 | 1385 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1416 ASSERT(child); | 1417 ASSERT(child); |
1417 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE
xtent; | 1418 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE
xtent; |
1418 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset
- crossAxisStartEdge; | 1419 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset
- crossAxisStartEdge; |
1419 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi
sExtent; | 1420 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi
sExtent; |
1420 adjustAlignmentForChild(child, newOffset - originalOffset); | 1421 adjustAlignmentForChild(child, newOffset - originalOffset); |
1421 } | 1422 } |
1422 } | 1423 } |
1423 } | 1424 } |
1424 | 1425 |
1425 } | 1426 } |
OLD | NEW |