| 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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 } | 224 } |
| 225 } | 225 } |
| 226 | 226 |
| 227 void RenderFlexibleBox::layoutBlock(bool relayoutChildren) | 227 void RenderFlexibleBox::layoutBlock(bool relayoutChildren) |
| 228 { | 228 { |
| 229 ASSERT(needsLayout()); | 229 ASSERT(needsLayout()); |
| 230 | 230 |
| 231 if (!relayoutChildren && simplifiedLayout()) | 231 if (!relayoutChildren && simplifiedLayout()) |
| 232 return; | 232 return; |
| 233 | 233 |
| 234 LayoutRepainter repainter(*this, checkForRepaintDuringLayout()); | 234 LayoutRepainter repainter(*this, checkForPaintInvalidationDuringLayout()); |
| 235 | 235 |
| 236 if (updateLogicalWidthAndColumnWidth()) | 236 if (updateLogicalWidthAndColumnWidth()) |
| 237 relayoutChildren = true; | 237 relayoutChildren = true; |
| 238 | 238 |
| 239 LayoutUnit previousHeight = logicalHeight(); | 239 LayoutUnit previousHeight = logicalHeight(); |
| 240 setLogicalHeight(borderAndPaddingLogicalHeight() + scrollbarLogicalHeight())
; | 240 setLogicalHeight(borderAndPaddingLogicalHeight() + scrollbarLogicalHeight())
; |
| 241 | 241 |
| 242 { | 242 { |
| 243 LayoutStateMaintainer statePusher(*this, locationOffset()); | 243 LayoutStateMaintainer statePusher(*this, locationOffset()); |
| 244 | 244 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 void RenderFlexibleBox::repaintChildrenDuringLayoutIfMoved(const ChildFrameRects
& oldChildRects) | 289 void RenderFlexibleBox::repaintChildrenDuringLayoutIfMoved(const ChildFrameRects
& oldChildRects) |
| 290 { | 290 { |
| 291 size_t childIndex = 0; | 291 size_t childIndex = 0; |
| 292 for (RenderBox* child = m_orderIterator.first(); child; child = m_orderItera
tor.next()) { | 292 for (RenderBox* child = m_orderIterator.first(); child; child = m_orderItera
tor.next()) { |
| 293 if (child->isOutOfFlowPositioned()) | 293 if (child->isOutOfFlowPositioned()) |
| 294 continue; | 294 continue; |
| 295 | 295 |
| 296 // If the child moved, we have to repaint it as well as any floating/pos
itioned | 296 // If the child moved, we have to repaint it as well as any floating/pos
itioned |
| 297 // descendants. An exception is if we need a layout. In this case, we kn
ow we're going to | 297 // descendants. An exception is if we need a layout. In this case, we kn
ow we're going to |
| 298 // repaint ourselves (and the child) anyway. | 298 // repaint ourselves (and the child) anyway. |
| 299 if (!selfNeedsLayout() && child->checkForRepaintDuringLayout()) | 299 if (!selfNeedsLayout() && child->checkForPaintInvalidationDuringLayout()
) |
| 300 child->repaintDuringLayoutIfMoved(oldChildRects[childIndex]); | 300 child->repaintDuringLayoutIfMoved(oldChildRects[childIndex]); |
| 301 ++childIndex; | 301 ++childIndex; |
| 302 } | 302 } |
| 303 ASSERT(childIndex == oldChildRects.size()); | 303 ASSERT(childIndex == oldChildRects.size()); |
| 304 } | 304 } |
| 305 | 305 |
| 306 void RenderFlexibleBox::paintChildren(PaintInfo& paintInfo, const LayoutPoint& p
aintOffset) | 306 void RenderFlexibleBox::paintChildren(PaintInfo& paintInfo, const LayoutPoint& p
aintOffset) |
| 307 { | 307 { |
| 308 for (RenderBox* child = m_orderIterator.first(); child; child = m_orderItera
tor.next()) | 308 for (RenderBox* child = m_orderIterator.first(); child; child = m_orderItera
tor.next()) |
| 309 paintChildAsInlineBlock(child, paintInfo, paintOffset); | 309 paintChildAsInlineBlock(child, paintInfo, paintOffset); |
| (...skipping 1104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1414 ASSERT(child); | 1414 ASSERT(child); |
| 1415 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE
xtent; | 1415 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE
xtent; |
| 1416 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset
- crossAxisStartEdge; | 1416 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset
- crossAxisStartEdge; |
| 1417 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi
sExtent; | 1417 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi
sExtent; |
| 1418 adjustAlignmentForChild(child, newOffset - originalOffset); | 1418 adjustAlignmentForChild(child, newOffset - originalOffset); |
| 1419 } | 1419 } |
| 1420 } | 1420 } |
| 1421 } | 1421 } |
| 1422 | 1422 |
| 1423 } | 1423 } |
| OLD | NEW |