| 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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 // Flex items that were previously stretching need to be relayed out so
we can compute new available cross axis space. | 258 // Flex items that were previously stretching need to be relayed out so
we can compute new available cross axis space. |
| 259 // This is only necessary for stretching since other alignment values do
n't change the size of the box. | 259 // This is only necessary for stretching since other alignment values do
n't change the size of the box. |
| 260 for (RenderBox* child = firstChildBox(); child; child = child->nextSibli
ngBox()) { | 260 for (RenderBox* child = firstChildBox(); child; child = child->nextSibli
ngBox()) { |
| 261 EAlignItems previousAlignment = resolveAlignment(oldStyle, child->st
yle()); | 261 EAlignItems previousAlignment = resolveAlignment(oldStyle, child->st
yle()); |
| 262 if (previousAlignment == AlignStretch && previousAlignment != resolv
eAlignment(style(), child->style())) | 262 if (previousAlignment == AlignStretch && previousAlignment != resolv
eAlignment(style(), child->style())) |
| 263 child->setChildNeedsLayout(true, MarkOnlyThis); | 263 child->setChildNeedsLayout(true, MarkOnlyThis); |
| 264 } | 264 } |
| 265 } | 265 } |
| 266 } | 266 } |
| 267 | 267 |
| 268 void RenderFlexibleBox::removeChild(RenderObject* child) | |
| 269 { | |
| 270 m_orderIterator.invalidate(); | |
| 271 | |
| 272 RenderBlock::removeChild(child); | |
| 273 } | |
| 274 | |
| 275 void RenderFlexibleBox::layoutBlock(bool relayoutChildren, LayoutUnit) | 268 void RenderFlexibleBox::layoutBlock(bool relayoutChildren, LayoutUnit) |
| 276 { | 269 { |
| 277 ASSERT(needsLayout()); | 270 ASSERT(needsLayout()); |
| 278 | 271 |
| 279 if (!relayoutChildren && simplifiedLayout()) | 272 if (!relayoutChildren && simplifiedLayout()) |
| 280 return; | 273 return; |
| 281 | 274 |
| 282 LayoutRepainter repainter(*this, checkForRepaintDuringLayout()); | 275 LayoutRepainter repainter(*this, checkForRepaintDuringLayout()); |
| 283 | 276 |
| 284 if (updateLogicalWidthAndColumnWidth()) | 277 if (updateLogicalWidthAndColumnWidth()) |
| (...skipping 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1422 ASSERT(child); | 1415 ASSERT(child); |
| 1423 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE
xtent; | 1416 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE
xtent; |
| 1424 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset
- crossAxisStartEdge; | 1417 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset
- crossAxisStartEdge; |
| 1425 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi
sExtent; | 1418 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi
sExtent; |
| 1426 adjustAlignmentForChild(child, newOffset - originalOffset); | 1419 adjustAlignmentForChild(child, newOffset - originalOffset); |
| 1427 } | 1420 } |
| 1428 } | 1421 } |
| 1429 } | 1422 } |
| 1430 | 1423 |
| 1431 } | 1424 } |
| OLD | NEW |