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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 { | 217 { |
218 ASSERT(needsLayout()); | 218 ASSERT(needsLayout()); |
219 | 219 |
220 if (simplifiedLayout()) | 220 if (simplifiedLayout()) |
221 return; | 221 return; |
222 | 222 |
223 bool relayoutChildren = updateLogicalWidthAndColumnWidth(); | 223 bool relayoutChildren = updateLogicalWidthAndColumnWidth(); |
224 LayoutUnit previousHeight = logicalHeight(); | 224 LayoutUnit previousHeight = logicalHeight(); |
225 setLogicalHeight(borderAndPaddingLogicalHeight()); | 225 setLogicalHeight(borderAndPaddingLogicalHeight()); |
226 | 226 |
227 { | 227 m_numberOfInFlowChildrenOnFirstLine = -1; |
228 LayoutState state(*this, locationOffset()); | |
229 | 228 |
230 m_numberOfInFlowChildrenOnFirstLine = -1; | 229 prepareOrderIteratorAndMargins(); |
231 | 230 |
232 prepareOrderIteratorAndMargins(); | 231 ChildFrameRects oldChildRects; |
| 232 appendChildFrameRects(oldChildRects); |
233 | 233 |
234 ChildFrameRects oldChildRects; | 234 layoutFlexItems(relayoutChildren); |
235 appendChildFrameRects(oldChildRects); | |
236 | 235 |
237 layoutFlexItems(relayoutChildren); | 236 if (logicalHeight() != previousHeight) |
| 237 relayoutChildren = true; |
238 | 238 |
239 if (logicalHeight() != previousHeight) | 239 layoutPositionedObjects(relayoutChildren); |
240 relayoutChildren = true; | |
241 | 240 |
242 layoutPositionedObjects(relayoutChildren); | 241 // FIXME: css3/flexbox/repaint-rtl-column.html seems to issue paint invalida
tions for more overflow than it needs to. |
243 | 242 computeOverflow(clientLogicalBottomAfterRepositioning()); |
244 // FIXME: css3/flexbox/repaint-rtl-column.html seems to issue paint inva
lidations for more overflow than it needs to. | |
245 computeOverflow(clientLogicalBottomAfterRepositioning()); | |
246 } | |
247 | 243 |
248 updateLayerTransformAfterLayout(); | 244 updateLayerTransformAfterLayout(); |
249 | 245 |
250 clearNeedsLayout(); | 246 clearNeedsLayout(); |
251 } | 247 } |
252 | 248 |
253 void RenderFlexibleBox::appendChildFrameRects(ChildFrameRects& childFrameRects) | 249 void RenderFlexibleBox::appendChildFrameRects(ChildFrameRects& childFrameRects) |
254 { | 250 { |
255 for (RenderBox* child = m_orderIterator.first(); child; child = m_orderItera
tor.next()) { | 251 for (RenderBox* child = m_orderIterator.first(); child; child = m_orderItera
tor.next()) { |
256 if (!child->isOutOfFlowPositioned()) | 252 if (!child->isOutOfFlowPositioned()) |
(...skipping 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1288 ASSERT(child); | 1284 ASSERT(child); |
1289 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE
xtent; | 1285 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE
xtent; |
1290 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset
- crossAxisStartEdge; | 1286 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset
- crossAxisStartEdge; |
1291 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi
sExtent; | 1287 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi
sExtent; |
1292 adjustAlignmentForChild(child, newOffset - originalOffset); | 1288 adjustAlignmentForChild(child, newOffset - originalOffset); |
1293 } | 1289 } |
1294 } | 1290 } |
1295 } | 1291 } |
1296 | 1292 |
1297 } | 1293 } |
OLD | NEW |