Chromium Code Reviews| 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 1095 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1106 LayoutUnit childCrossAxisMarginBoxExtent; | 1106 LayoutUnit childCrossAxisMarginBoxExtent; |
| 1107 if (alignmentForChild(child) == ItemPositionBaseline && !hasAutoMarginsI nCrossAxis(child)) { | 1107 if (alignmentForChild(child) == ItemPositionBaseline && !hasAutoMarginsI nCrossAxis(child)) { |
| 1108 LayoutUnit ascent = marginBoxAscentForChild(child); | 1108 LayoutUnit ascent = marginBoxAscentForChild(child); |
| 1109 LayoutUnit descent = (crossAxisMarginExtentForChild(child) + crossAx isExtentForChild(child)) - ascent; | 1109 LayoutUnit descent = (crossAxisMarginExtentForChild(child) + crossAx isExtentForChild(child)) - ascent; |
| 1110 | 1110 |
| 1111 maxAscent = std::max(maxAscent, ascent); | 1111 maxAscent = std::max(maxAscent, ascent); |
| 1112 maxDescent = std::max(maxDescent, descent); | 1112 maxDescent = std::max(maxDescent, descent); |
| 1113 | 1113 |
| 1114 childCrossAxisMarginBoxExtent = maxAscent + maxDescent; | 1114 childCrossAxisMarginBoxExtent = maxAscent + maxDescent; |
| 1115 } else { | 1115 } else { |
| 1116 childCrossAxisMarginBoxExtent = crossAxisIntrinsicExtentForChild(chi ld) + crossAxisMarginExtentForChild(child); | 1116 LayoutUnit crossAxisScrollbarExtentForChild = isHorizontalFlow() ? c hild->horizontalScrollbarHeight() : child->verticalScrollbarWidth(); |
|
tony
2014/08/07 16:42:30
Nit: I would pull this out into a function to be c
harpreet.sk
2014/08/08 05:35:04
Done.
| |
| 1117 childCrossAxisMarginBoxExtent = crossAxisIntrinsicExtentForChild(chi ld) + crossAxisMarginExtentForChild(child) + crossAxisScrollbarExtentForChild; | |
| 1117 } | 1118 } |
| 1118 if (!isColumnFlow()) | 1119 if (!isColumnFlow()) |
| 1119 setLogicalHeight(std::max(logicalHeight(), crossAxisOffset + flowAwa reBorderAfter() + flowAwarePaddingAfter() + childCrossAxisMarginBoxExtent + cros sAxisScrollbarExtent())); | 1120 setLogicalHeight(std::max(logicalHeight(), crossAxisOffset + flowAwa reBorderAfter() + flowAwarePaddingAfter() + childCrossAxisMarginBoxExtent + cros sAxisScrollbarExtent())); |
| 1120 maxChildCrossAxisExtent = std::max(maxChildCrossAxisExtent, childCrossAx isMarginBoxExtent); | 1121 maxChildCrossAxisExtent = std::max(maxChildCrossAxisExtent, childCrossAx isMarginBoxExtent); |
| 1121 | 1122 |
| 1122 mainAxisOffset += flowAwareMarginStartForChild(child); | 1123 mainAxisOffset += flowAwareMarginStartForChild(child); |
| 1123 | 1124 |
| 1124 LayoutUnit childMainExtent = mainAxisExtentForChild(child); | 1125 LayoutUnit childMainExtent = mainAxisExtentForChild(child); |
| 1125 // In an RTL column situation, this will apply the margin-right/margin-e nd on the left. | 1126 // In an RTL column situation, this will apply the margin-right/margin-e nd on the left. |
| 1126 // This will be fixed later in flipForRightToLeftColumn. | 1127 // This will be fixed later in flipForRightToLeftColumn. |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1397 ASSERT(child); | 1398 ASSERT(child); |
| 1398 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE xtent; | 1399 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE xtent; |
| 1399 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge; | 1400 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge; |
| 1400 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi sExtent; | 1401 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi sExtent; |
| 1401 adjustAlignmentForChild(child, newOffset - originalOffset); | 1402 adjustAlignmentForChild(child, newOffset - originalOffset); |
| 1402 } | 1403 } |
| 1403 } | 1404 } |
| 1404 } | 1405 } |
| 1405 | 1406 |
| 1406 } | 1407 } |
| OLD | NEW |