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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 // Flex items that were previously stretching need to be relayed out so
we can compute new available cross axis space. | 212 // Flex items that were previously stretching need to be relayed out so
we can compute new available cross axis space. |
213 // This is only necessary for stretching since other alignment values do
n't change the size of the box. | 213 // This is only necessary for stretching since other alignment values do
n't change the size of the box. |
214 for (RenderBox* child = firstChildBox(); child; child = child->nextSibli
ngBox()) { | 214 for (RenderBox* child = firstChildBox(); child; child = child->nextSibli
ngBox()) { |
215 EAlignItems previousAlignment = resolveAlignment(oldStyle, child->st
yle()); | 215 EAlignItems previousAlignment = resolveAlignment(oldStyle, child->st
yle()); |
216 if (previousAlignment == AlignStretch && previousAlignment != resolv
eAlignment(style(), child->style())) | 216 if (previousAlignment == AlignStretch && previousAlignment != resolv
eAlignment(style(), child->style())) |
217 child->setChildNeedsLayout(MarkOnlyThis); | 217 child->setChildNeedsLayout(MarkOnlyThis); |
218 } | 218 } |
219 } | 219 } |
220 } | 220 } |
221 | 221 |
222 void RenderFlexibleBox::layoutBlock(bool relayoutChildren, LayoutUnit) | 222 void RenderFlexibleBox::layoutBlock(bool relayoutChildren) |
223 { | 223 { |
224 ASSERT(needsLayout()); | 224 ASSERT(needsLayout()); |
225 | 225 |
226 if (!relayoutChildren && simplifiedLayout()) | 226 if (!relayoutChildren && simplifiedLayout()) |
227 return; | 227 return; |
228 | 228 |
229 LayoutRepainter repainter(*this, checkForRepaintDuringLayout()); | 229 LayoutRepainter repainter(*this, checkForRepaintDuringLayout()); |
230 | 230 |
231 if (updateLogicalWidthAndColumnWidth()) | 231 if (updateLogicalWidthAndColumnWidth()) |
232 relayoutChildren = true; | 232 relayoutChildren = true; |
(...skipping 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1356 ASSERT(child); | 1356 ASSERT(child); |
1357 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE
xtent; | 1357 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE
xtent; |
1358 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset
- crossAxisStartEdge; | 1358 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset
- crossAxisStartEdge; |
1359 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi
sExtent; | 1359 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi
sExtent; |
1360 adjustAlignmentForChild(child, newOffset - originalOffset); | 1360 adjustAlignmentForChild(child, newOffset - originalOffset); |
1361 } | 1361 } |
1362 } | 1362 } |
1363 } | 1363 } |
1364 | 1364 |
1365 } | 1365 } |
OLD | NEW |