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 2594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2605 childLayer->setStaticBlockPosition(borderAndPaddingBefore()); | 2605 childLayer->setStaticBlockPosition(borderAndPaddingBefore()); |
2606 } | 2606 } |
2607 | 2607 |
2608 void LayoutGrid::layoutPositionedObjects(bool relayoutChildren, | 2608 void LayoutGrid::layoutPositionedObjects(bool relayoutChildren, |
2609 PositionedLayoutBehavior info) { | 2609 PositionedLayoutBehavior info) { |
2610 TrackedLayoutBoxListHashSet* positionedDescendants = positionedObjects(); | 2610 TrackedLayoutBoxListHashSet* positionedDescendants = positionedObjects(); |
2611 if (!positionedDescendants) | 2611 if (!positionedDescendants) |
2612 return; | 2612 return; |
2613 | 2613 |
2614 for (auto* child : *positionedDescendants) { | 2614 for (auto* child : *positionedDescendants) { |
2615 if (!child->needsLayout()) | |
2616 continue; | |
2617 | |
2618 if (isOrthogonalChild(*child)) { | 2615 if (isOrthogonalChild(*child)) { |
2619 // FIXME: Properly support orthogonal writing mode. | 2616 // FIXME: Properly support orthogonal writing mode. |
2620 continue; | 2617 continue; |
2621 } | 2618 } |
2622 | 2619 |
2623 LayoutUnit columnOffset = LayoutUnit(); | 2620 LayoutUnit columnOffset = LayoutUnit(); |
2624 LayoutUnit columnBreadth = LayoutUnit(); | 2621 LayoutUnit columnBreadth = LayoutUnit(); |
2625 offsetAndBreadthForPositionedChild(*child, ForColumns, columnOffset, | 2622 offsetAndBreadthForPositionedChild(*child, ForColumns, columnOffset, |
2626 columnBreadth); | 2623 columnBreadth); |
2627 LayoutUnit rowOffset = LayoutUnit(); | 2624 LayoutUnit rowOffset = LayoutUnit(); |
(...skipping 1002 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3630 if (direction == ForRows) | 3627 if (direction == ForRows) |
3631 return grid.numTracks(ForRows); | 3628 return grid.numTracks(ForRows); |
3632 | 3629 |
3633 return grid.numTracks(ForRows) | 3630 return grid.numTracks(ForRows) |
3634 ? grid.numTracks(ForColumns) | 3631 ? grid.numTracks(ForColumns) |
3635 : GridPositionsResolver::explicitGridColumnCount( | 3632 : GridPositionsResolver::explicitGridColumnCount( |
3636 styleRef(), grid.autoRepeatTracks(ForColumns)); | 3633 styleRef(), grid.autoRepeatTracks(ForColumns)); |
3637 } | 3634 } |
3638 | 3635 |
3639 } // namespace blink | 3636 } // namespace blink |
OLD | NEW |