| 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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 if (previousAlignment == ItemPositionStretch && previousAlignment !=
ComputedStyle::resolveAlignment(styleRef(), child->styleRef(), ItemPositionStre
tch)) | 259 if (previousAlignment == ItemPositionStretch && previousAlignment !=
ComputedStyle::resolveAlignment(styleRef(), child->styleRef(), ItemPositionStre
tch)) |
| 260 child->setChildNeedsLayout(MarkOnlyThis); | 260 child->setChildNeedsLayout(MarkOnlyThis); |
| 261 } | 261 } |
| 262 } | 262 } |
| 263 } | 263 } |
| 264 | 264 |
| 265 void LayoutFlexibleBox::layoutBlock(bool relayoutChildren) | 265 void LayoutFlexibleBox::layoutBlock(bool relayoutChildren) |
| 266 { | 266 { |
| 267 ASSERT(needsLayout()); | 267 ASSERT(needsLayout()); |
| 268 | 268 |
| 269 if (!relayoutChildren && simplifiedLayout()) | 269 SubtreeLayoutScope layoutScope(*this); |
| 270 |
| 271 if (!relayoutChildren && simplifiedLayout(&layoutScope)) |
| 270 return; | 272 return; |
| 271 | 273 |
| 272 if (updateLogicalWidthAndColumnWidth()) | 274 if (updateLogicalWidthAndColumnWidth()) |
| 273 relayoutChildren = true; | 275 relayoutChildren = true; |
| 274 | 276 |
| 275 SubtreeLayoutScope layoutScope(*this); | |
| 276 LayoutUnit previousHeight = logicalHeight(); | 277 LayoutUnit previousHeight = logicalHeight(); |
| 277 setLogicalHeight(borderAndPaddingLogicalHeight() + scrollbarLogicalHeight())
; | 278 setLogicalHeight(borderAndPaddingLogicalHeight() + scrollbarLogicalHeight())
; |
| 278 | 279 |
| 279 { | 280 { |
| 280 TextAutosizer::LayoutScope textAutosizerLayoutScope(this, &layoutScope); | 281 TextAutosizer::LayoutScope textAutosizerLayoutScope(this, &layoutScope); |
| 281 LayoutState state(*this, locationOffset()); | 282 LayoutState state(*this, locationOffset()); |
| 282 | 283 |
| 283 m_numberOfInFlowChildrenOnFirstLine = -1; | 284 m_numberOfInFlowChildrenOnFirstLine = -1; |
| 284 | 285 |
| 285 LayoutBlock::startDelayUpdateScrollInfo(); | 286 LayoutBlock::startDelayUpdateScrollInfo(); |
| (...skipping 1502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1788 ASSERT(child); | 1789 ASSERT(child); |
| 1789 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE
xtent; | 1790 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE
xtent; |
| 1790 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset
- crossAxisStartEdge; | 1791 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset
- crossAxisStartEdge; |
| 1791 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi
sExtent; | 1792 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi
sExtent; |
| 1792 adjustAlignmentForChild(*child, newOffset - originalOffset); | 1793 adjustAlignmentForChild(*child, newOffset - originalOffset); |
| 1793 } | 1794 } |
| 1794 } | 1795 } |
| 1795 } | 1796 } |
| 1796 | 1797 |
| 1797 } // namespace blink | 1798 } // namespace blink |
| OLD | NEW |