| 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 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 computeTrackSizesForDefiniteSize(ForColumns, sizingData, | 468 computeTrackSizesForDefiniteSize(ForColumns, sizingData, |
| 469 availableSpaceForColumns); | 469 availableSpaceForColumns); |
| 470 computeTrackSizesForDefiniteSize(ForRows, sizingData, | 470 computeTrackSizesForDefiniteSize(ForRows, sizingData, |
| 471 availableSpaceForRows); | 471 availableSpaceForRows); |
| 472 } | 472 } |
| 473 } | 473 } |
| 474 | 474 |
| 475 void LayoutGrid::layoutBlock(bool relayoutChildren) { | 475 void LayoutGrid::layoutBlock(bool relayoutChildren) { |
| 476 ASSERT(needsLayout()); | 476 ASSERT(needsLayout()); |
| 477 | 477 |
| 478 if (!relayoutChildren && simplifiedLayout()) | 478 // We cannot perform a simplifiedLayout() on a dirty grid that |
| 479 // has positioned items to be laid out. |
| 480 if (!relayoutChildren && (!m_gridIsDirty || !posChildNeedsLayout()) && |
| 481 simplifiedLayout()) |
| 479 return; | 482 return; |
| 480 | 483 |
| 481 SubtreeLayoutScope layoutScope(*this); | 484 SubtreeLayoutScope layoutScope(*this); |
| 482 | 485 |
| 483 { | 486 { |
| 484 // LayoutState needs this deliberate scope to pop before updating scroll | 487 // LayoutState needs this deliberate scope to pop before updating scroll |
| 485 // information (which may trigger relayout). | 488 // information (which may trigger relayout). |
| 486 LayoutState state(*this); | 489 LayoutState state(*this); |
| 487 | 490 |
| 488 LayoutSize previousSize = size(); | 491 LayoutSize previousSize = size(); |
| (...skipping 2947 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3436 if (!m_gridItemArea.isEmpty()) | 3439 if (!m_gridItemArea.isEmpty()) |
| 3437 GridPainter(*this).paintChildren(paintInfo, paintOffset); | 3440 GridPainter(*this).paintChildren(paintInfo, paintOffset); |
| 3438 } | 3441 } |
| 3439 | 3442 |
| 3440 bool LayoutGrid::cachedHasDefiniteLogicalHeight() const { | 3443 bool LayoutGrid::cachedHasDefiniteLogicalHeight() const { |
| 3441 SECURITY_DCHECK(m_hasDefiniteLogicalHeight); | 3444 SECURITY_DCHECK(m_hasDefiniteLogicalHeight); |
| 3442 return m_hasDefiniteLogicalHeight.value(); | 3445 return m_hasDefiniteLogicalHeight.value(); |
| 3443 } | 3446 } |
| 3444 | 3447 |
| 3445 } // namespace blink | 3448 } // namespace blink |
| OLD | NEW |