| 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 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 : styleRef().gridAutoRepeatRowsInsertionPoint(); | 565 : styleRef().gridAutoRepeatRowsInsertionPoint(); |
| 566 size_t firstAutoRepeatTrack = | 566 size_t firstAutoRepeatTrack = |
| 567 insertionPoint + std::abs(grid.smallestTrackStart(direction)); | 567 insertionPoint + std::abs(grid.smallestTrackStart(direction)); |
| 568 size_t lastAutoRepeatTrack = | 568 size_t lastAutoRepeatTrack = |
| 569 firstAutoRepeatTrack + grid.autoRepeatTracks(direction); | 569 firstAutoRepeatTrack + grid.autoRepeatTracks(direction); |
| 570 | 570 |
| 571 if (!grid.hasGridItems()) { | 571 if (!grid.hasGridItems()) { |
| 572 emptyTrackIndexes = WTF::wrapUnique(new OrderedTrackIndexSet); | 572 emptyTrackIndexes = WTF::wrapUnique(new OrderedTrackIndexSet); |
| 573 for (size_t trackIndex = firstAutoRepeatTrack; | 573 for (size_t trackIndex = firstAutoRepeatTrack; |
| 574 trackIndex < lastAutoRepeatTrack; ++trackIndex) | 574 trackIndex < lastAutoRepeatTrack; ++trackIndex) |
| 575 emptyTrackIndexes->add(trackIndex); | 575 emptyTrackIndexes->insert(trackIndex); |
| 576 } else { | 576 } else { |
| 577 for (size_t trackIndex = firstAutoRepeatTrack; | 577 for (size_t trackIndex = firstAutoRepeatTrack; |
| 578 trackIndex < lastAutoRepeatTrack; ++trackIndex) { | 578 trackIndex < lastAutoRepeatTrack; ++trackIndex) { |
| 579 GridIterator iterator(grid, direction, trackIndex); | 579 GridIterator iterator(grid, direction, trackIndex); |
| 580 if (!iterator.nextGridItem()) { | 580 if (!iterator.nextGridItem()) { |
| 581 if (!emptyTrackIndexes) | 581 if (!emptyTrackIndexes) |
| 582 emptyTrackIndexes = WTF::wrapUnique(new OrderedTrackIndexSet); | 582 emptyTrackIndexes = WTF::wrapUnique(new OrderedTrackIndexSet); |
| 583 emptyTrackIndexes->add(trackIndex); | 583 emptyTrackIndexes->insert(trackIndex); |
| 584 } | 584 } |
| 585 } | 585 } |
| 586 } | 586 } |
| 587 return emptyTrackIndexes; | 587 return emptyTrackIndexes; |
| 588 } | 588 } |
| 589 | 589 |
| 590 size_t LayoutGrid::clampAutoRepeatTracks(GridTrackSizingDirection direction, | 590 size_t LayoutGrid::clampAutoRepeatTracks(GridTrackSizingDirection direction, |
| 591 size_t autoRepeatTracks) const { | 591 size_t autoRepeatTracks) const { |
| 592 if (!autoRepeatTracks) | 592 if (!autoRepeatTracks) |
| 593 return 0; | 593 return 0; |
| (...skipping 1501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2095 if (direction == ForRows) | 2095 if (direction == ForRows) |
| 2096 return grid.numTracks(ForRows); | 2096 return grid.numTracks(ForRows); |
| 2097 | 2097 |
| 2098 return grid.numTracks(ForRows) | 2098 return grid.numTracks(ForRows) |
| 2099 ? grid.numTracks(ForColumns) | 2099 ? grid.numTracks(ForColumns) |
| 2100 : GridPositionsResolver::explicitGridColumnCount( | 2100 : GridPositionsResolver::explicitGridColumnCount( |
| 2101 styleRef(), grid.autoRepeatTracks(ForColumns)); | 2101 styleRef(), grid.autoRepeatTracks(ForColumns)); |
| 2102 } | 2102 } |
| 2103 | 2103 |
| 2104 } // namespace blink | 2104 } // namespace blink |
| OLD | NEW |