| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 | 339 |
| 340 LayoutUnit baseSizes, growthLimits; | 340 LayoutUnit baseSizes, growthLimits; |
| 341 computeUsedBreadthOfGridTracks(direction, sizingData, baseSizes, growthLimit
s, AvailableSpaceDefinite); | 341 computeUsedBreadthOfGridTracks(direction, sizingData, baseSizes, growthLimit
s, AvailableSpaceDefinite); |
| 342 ASSERT(tracksAreWiderThanMinTrackBreadth(direction, sizingData)); | 342 ASSERT(tracksAreWiderThanMinTrackBreadth(direction, sizingData)); |
| 343 } | 343 } |
| 344 | 344 |
| 345 void LayoutGrid::layoutBlock(bool relayoutChildren) | 345 void LayoutGrid::layoutBlock(bool relayoutChildren) |
| 346 { | 346 { |
| 347 ASSERT(needsLayout()); | 347 ASSERT(needsLayout()); |
| 348 | 348 |
| 349 if (!relayoutChildren && simplifiedLayout()) | 349 SubtreeLayoutScope layoutScope(*this); |
| 350 |
| 351 if (!relayoutChildren && simplifiedLayout(&layoutScope)) |
| 350 return; | 352 return; |
| 351 | 353 |
| 352 SubtreeLayoutScope layoutScope(*this); | |
| 353 | |
| 354 { | 354 { |
| 355 // LayoutState needs this deliberate scope to pop before updating scroll
information (which | 355 // LayoutState needs this deliberate scope to pop before updating scroll
information (which |
| 356 // may trigger relayout). | 356 // may trigger relayout). |
| 357 LayoutState state(*this, locationOffset()); | 357 LayoutState state(*this, locationOffset()); |
| 358 | 358 |
| 359 LayoutSize previousSize = size(); | 359 LayoutSize previousSize = size(); |
| 360 | 360 |
| 361 updateLogicalWidth(); | 361 updateLogicalWidth(); |
| 362 bool logicalHeightWasIndefinite = computeContentLogicalHeight(MainOrPref
erredSize, style()->logicalHeight(), LayoutUnit(-1)) == LayoutUnit(-1); | 362 bool logicalHeightWasIndefinite = computeContentLogicalHeight(MainOrPref
erredSize, style()->logicalHeight(), LayoutUnit(-1)) == LayoutUnit(-1); |
| 363 | 363 |
| (...skipping 1782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2146 | 2146 |
| 2147 return LayoutPoint(rowAxisOffset, columnAxisOffsetForChild(child, sizingData
)); | 2147 return LayoutPoint(rowAxisOffset, columnAxisOffsetForChild(child, sizingData
)); |
| 2148 } | 2148 } |
| 2149 | 2149 |
| 2150 void LayoutGrid::paintChildren(const PaintInfo& paintInfo, const LayoutPoint& pa
intOffset) const | 2150 void LayoutGrid::paintChildren(const PaintInfo& paintInfo, const LayoutPoint& pa
intOffset) const |
| 2151 { | 2151 { |
| 2152 GridPainter(*this).paintChildren(paintInfo, paintOffset); | 2152 GridPainter(*this).paintChildren(paintInfo, paintOffset); |
| 2153 } | 2153 } |
| 2154 | 2154 |
| 2155 } // namespace blink | 2155 } // namespace blink |
| OLD | NEW |