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 1093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1104 updateAutoMarginsInMainAxis(child, autoMarginOffset); | 1104 updateAutoMarginsInMainAxis(child, autoMarginOffset); |
1105 | 1105 |
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 + child->scro llbarLogicalHeight(); |
cbiesinger
2014/08/06 02:52:49
Doesn't this have to be scrollbarLogicalWidth for
harpreet.sk
2014/08/06 13:20:23
@Chris: Thanks for the comment. Yes it has to be s
| |
1115 } else { | 1115 } else { |
1116 childCrossAxisMarginBoxExtent = crossAxisIntrinsicExtentForChild(chi ld) + crossAxisMarginExtentForChild(child); | 1116 childCrossAxisMarginBoxExtent = crossAxisIntrinsicExtentForChild(chi ld) + crossAxisMarginExtentForChild(child) + child->scrollbarLogicalHeight(); |
1117 } | 1117 } |
1118 if (!isColumnFlow()) | 1118 if (!isColumnFlow()) |
1119 setLogicalHeight(std::max(logicalHeight(), crossAxisOffset + flowAwa reBorderAfter() + flowAwarePaddingAfter() + childCrossAxisMarginBoxExtent + cros sAxisScrollbarExtent())); | 1119 setLogicalHeight(std::max(logicalHeight(), crossAxisOffset + flowAwa reBorderAfter() + flowAwarePaddingAfter() + childCrossAxisMarginBoxExtent + cros sAxisScrollbarExtent())); |
1120 maxChildCrossAxisExtent = std::max(maxChildCrossAxisExtent, childCrossAx isMarginBoxExtent); | 1120 maxChildCrossAxisExtent = std::max(maxChildCrossAxisExtent, childCrossAx isMarginBoxExtent); |
1121 | 1121 |
1122 mainAxisOffset += flowAwareMarginStartForChild(child); | 1122 mainAxisOffset += flowAwareMarginStartForChild(child); |
1123 | 1123 |
1124 LayoutUnit childMainExtent = mainAxisExtentForChild(child); | 1124 LayoutUnit childMainExtent = mainAxisExtentForChild(child); |
1125 // In an RTL column situation, this will apply the margin-right/margin-e nd on the left. | 1125 // 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. | 1126 // This will be fixed later in flipForRightToLeftColumn. |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1397 ASSERT(child); | 1397 ASSERT(child); |
1398 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE xtent; | 1398 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE xtent; |
1399 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge; | 1399 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge; |
1400 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi sExtent; | 1400 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi sExtent; |
1401 adjustAlignmentForChild(child, newOffset - originalOffset); | 1401 adjustAlignmentForChild(child, newOffset - originalOffset); |
1402 } | 1402 } |
1403 } | 1403 } |
1404 } | 1404 } |
1405 | 1405 |
1406 } | 1406 } |
OLD | NEW |