| 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 972 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 983 size_t seenInFlowPositionedChildren = 0; | 983 size_t seenInFlowPositionedChildren = 0; |
| 984 bool shouldFlipMainAxis = !isColumnFlow() && !isLeftToRightFlow(); | 984 bool shouldFlipMainAxis = !isColumnFlow() && !isLeftToRightFlow(); |
| 985 for (size_t i = 0; i < children.size(); ++i) { | 985 for (size_t i = 0; i < children.size(); ++i) { |
| 986 RenderBox* child = children[i]; | 986 RenderBox* child = children[i]; |
| 987 | 987 |
| 988 if (child->isOutOfFlowPositioned()) { | 988 if (child->isOutOfFlowPositioned()) { |
| 989 prepareChildForPositionedLayout(child, mainAxisOffset, crossAxisOffs
et, FlipForRowReverse); | 989 prepareChildForPositionedLayout(child, mainAxisOffset, crossAxisOffs
et, FlipForRowReverse); |
| 990 continue; | 990 continue; |
| 991 } | 991 } |
| 992 | 992 |
| 993 // FIXME Investigate if this can be removed based on other flags. crbug.
com/370010 | |
| 994 child->setMayNeedPaintInvalidation(true); | |
| 995 | |
| 996 LayoutUnit childPreferredSize = childSizes[i] + mainAxisBorderAndPadding
ExtentForChild(child); | 993 LayoutUnit childPreferredSize = childSizes[i] + mainAxisBorderAndPadding
ExtentForChild(child); |
| 997 setLogicalOverrideSize(child, childPreferredSize); | 994 setLogicalOverrideSize(child, childPreferredSize); |
| 998 if (childPreferredSize != mainAxisExtentForChild(child)) { | 995 if (childPreferredSize != mainAxisExtentForChild(child)) { |
| 999 child->setChildNeedsLayout(MarkOnlyThis); | 996 child->setChildNeedsLayout(MarkOnlyThis); |
| 1000 } else { | 997 } else { |
| 1001 // To avoid double applying margin changes in updateAutoMarginsInCro
ssAxis, we reset the margins here. | 998 // To avoid double applying margin changes in updateAutoMarginsInCro
ssAxis, we reset the margins here. |
| 1002 resetAutoMarginsAndLogicalTopInCrossAxis(child); | 999 resetAutoMarginsAndLogicalTopInCrossAxis(child); |
| 1003 } | 1000 } |
| 1004 // We may have already forced relayout for orthogonal flowing children i
n preferredMainAxisContentExtentForChild. | 1001 // We may have already forced relayout for orthogonal flowing children i
n preferredMainAxisContentExtentForChild. |
| 1005 bool forceChildRelayout = relayoutChildren && !childPreferredMainAxisCon
tentExtentRequiresLayout(child, hasInfiniteLineLength); | 1002 bool forceChildRelayout = relayoutChildren && !childPreferredMainAxisCon
tentExtentRequiresLayout(child, hasInfiniteLineLength); |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1301 ASSERT(child); | 1298 ASSERT(child); |
| 1302 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE
xtent; | 1299 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE
xtent; |
| 1303 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset
- crossAxisStartEdge; | 1300 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset
- crossAxisStartEdge; |
| 1304 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi
sExtent; | 1301 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi
sExtent; |
| 1305 adjustAlignmentForChild(child, newOffset - originalOffset); | 1302 adjustAlignmentForChild(child, newOffset - originalOffset); |
| 1306 } | 1303 } |
| 1307 } | 1304 } |
| 1308 } | 1305 } |
| 1309 | 1306 |
| 1310 } | 1307 } |
| OLD | NEW |