Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Side by Side Diff: Source/core/rendering/RenderGrid.cpp

Issue 22949002: [CSS Grid Layout] Avoid preferred logical widths' recomputations (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « PerformanceTests/Layout/fixed-grid-lots-of-data.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « PerformanceTests/Layout/fixed-grid-lots-of-data.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698