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 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
588 Vector<GridTrack*> tracks; | 588 Vector<GridTrack*> tracks; |
589 for (size_t trackIndex = initialTrackIndex; trackIndex <= finalTrackIndex; +
+trackIndex) { | 589 for (size_t trackIndex = initialTrackIndex; trackIndex <= finalTrackIndex; +
+trackIndex) { |
590 const GridTrackSize& trackSize = gridTrackSize(direction, trackIndex); | 590 const GridTrackSize& trackSize = gridTrackSize(direction, trackIndex); |
591 if (!(trackSize.*filterFunction)()) | 591 if (!(trackSize.*filterFunction)()) |
592 continue; | 592 continue; |
593 | 593 |
594 GridTrack& track = (direction == ForColumns) ? columnTracks[trackIndex]
: rowTracks[trackIndex]; | 594 GridTrack& track = (direction == ForColumns) ? columnTracks[trackIndex]
: rowTracks[trackIndex]; |
595 tracks.append(&track); | 595 tracks.append(&track); |
596 } | 596 } |
597 | 597 |
| 598 if (tracks.isEmpty()) |
| 599 return; |
| 600 |
598 LayoutUnit additionalBreadthSpace = (this->*sizingFunction)(gridItem, direct
ion, columnTracks); | 601 LayoutUnit additionalBreadthSpace = (this->*sizingFunction)(gridItem, direct
ion, columnTracks); |
599 for (size_t trackIndexForSpace = initialTrackIndex; trackIndexForSpace <= fi
nalTrackIndex; ++trackIndexForSpace) { | 602 for (size_t trackIndexForSpace = initialTrackIndex; trackIndexForSpace <= fi
nalTrackIndex; ++trackIndexForSpace) { |
600 GridTrack& track = (direction == ForColumns) ? columnTracks[trackIndexFo
rSpace] : rowTracks[trackIndexForSpace]; | 603 GridTrack& track = (direction == ForColumns) ? columnTracks[trackIndexFo
rSpace] : rowTracks[trackIndexForSpace]; |
601 additionalBreadthSpace -= (track.*trackGetter)(); | 604 additionalBreadthSpace -= (track.*trackGetter)(); |
602 } | 605 } |
603 | 606 |
604 // FIXME: We should pass different values for |tracksForGrowthAboveMaxBreadt
h|. | 607 // FIXME: We should pass different values for |tracksForGrowthAboveMaxBreadt
h|. |
605 distributeSpaceToTracks(tracks, &tracks, trackGetter, trackGrowthFunction, a
dditionalBreadthSpace); | 608 distributeSpaceToTracks(tracks, &tracks, trackGetter, trackGrowthFunction, a
dditionalBreadthSpace); |
606 } | 609 } |
607 | 610 |
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1136 if (isOutOfFlowPositioned()) | 1139 if (isOutOfFlowPositioned()) |
1137 return "RenderGrid (positioned)"; | 1140 return "RenderGrid (positioned)"; |
1138 if (isAnonymous()) | 1141 if (isAnonymous()) |
1139 return "RenderGrid (generated)"; | 1142 return "RenderGrid (generated)"; |
1140 if (isRelPositioned()) | 1143 if (isRelPositioned()) |
1141 return "RenderGrid (relative positioned)"; | 1144 return "RenderGrid (relative positioned)"; |
1142 return "RenderGrid"; | 1145 return "RenderGrid"; |
1143 } | 1146 } |
1144 | 1147 |
1145 } // namespace WebCore | 1148 } // namespace WebCore |
OLD | NEW |