| 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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 void RenderFlexibleBox::removeChild(RenderObject* child) | 206 void RenderFlexibleBox::removeChild(RenderObject* child) |
| 207 { | 207 { |
| 208 RenderBlock::removeChild(child); | 208 RenderBlock::removeChild(child); |
| 209 m_intrinsicSizeAlongMainAxis.remove(child); | 209 m_intrinsicSizeAlongMainAxis.remove(child); |
| 210 } | 210 } |
| 211 | 211 |
| 212 void RenderFlexibleBox::styleDidChange(StyleDifference diff, const RenderStyle*
oldStyle) | 212 void RenderFlexibleBox::styleDidChange(StyleDifference diff, const RenderStyle*
oldStyle) |
| 213 { | 213 { |
| 214 RenderBlock::styleDidChange(diff, oldStyle); | 214 RenderBlock::styleDidChange(diff, oldStyle); |
| 215 | 215 |
| 216 if (oldStyle && oldStyle->alignItems() == ItemPositionStretch && diff == Sty
leDifferenceLayout) { | 216 if (oldStyle && oldStyle->alignItems() == ItemPositionStretch && diff.needsF
ullLayout()) { |
| 217 // Flex items that were previously stretching need to be relayed out so
we can compute new available cross axis space. | 217 // Flex items that were previously stretching need to be relayed out so
we can compute new available cross axis space. |
| 218 // This is only necessary for stretching since other alignment values do
n't change the size of the box. | 218 // This is only necessary for stretching since other alignment values do
n't change the size of the box. |
| 219 for (RenderBox* child = firstChildBox(); child; child = child->nextSibli
ngBox()) { | 219 for (RenderBox* child = firstChildBox(); child; child = child->nextSibli
ngBox()) { |
| 220 ItemPosition previousAlignment = resolveAlignment(oldStyle, child->s
tyle()); | 220 ItemPosition previousAlignment = resolveAlignment(oldStyle, child->s
tyle()); |
| 221 if (previousAlignment == ItemPositionStretch && previousAlignment !=
resolveAlignment(style(), child->style())) | 221 if (previousAlignment == ItemPositionStretch && previousAlignment !=
resolveAlignment(style(), child->style())) |
| 222 child->setChildNeedsLayout(MarkOnlyThis); | 222 child->setChildNeedsLayout(MarkOnlyThis); |
| 223 } | 223 } |
| 224 } | 224 } |
| 225 } | 225 } |
| 226 | 226 |
| (...skipping 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1395 ASSERT(child); | 1395 ASSERT(child); |
| 1396 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE
xtent; | 1396 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE
xtent; |
| 1397 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset
- crossAxisStartEdge; | 1397 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset
- crossAxisStartEdge; |
| 1398 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi
sExtent; | 1398 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi
sExtent; |
| 1399 adjustAlignmentForChild(child, newOffset - originalOffset); | 1399 adjustAlignmentForChild(child, newOffset - originalOffset); |
| 1400 } | 1400 } |
| 1401 } | 1401 } |
| 1402 } | 1402 } |
| 1403 | 1403 |
| 1404 } | 1404 } |
| OLD | NEW |