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

Side by Side Diff: samples/swarm/swarm_ui_lib/layout/GridLayout.dart

Issue 14109003: Remove Collection references. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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 | « no previous file | tests/html/svgelement_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of layout; 5 part of layout;
6 6
7 /** 7 /**
8 * Implements a grid-based layout system based on: 8 * Implements a grid-based layout system based on:
9 * [http://dev.w3.org/csswg/css3-grid-align/] 9 * [http://dev.w3.org/csswg/css3-grid-align/]
10 * 10 *
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 } 373 }
374 tracks = []; 374 tracks = [];
375 } 375 }
376 } 376 }
377 } 377 }
378 378
379 /** 379 /**
380 * Returns true if we have an appropriate content sized dimension, and don't 380 * Returns true if we have an appropriate content sized dimension, and don't
381 * cross a fractional track. 381 * cross a fractional track.
382 */ 382 */
383 static bool _hasContentSizedTracks(Collection<GridTrack> tracks, 383 static bool _hasContentSizedTracks(Iterable<GridTrack> tracks,
384 ContentSizeMode sizeMode, _BreadthAccumulator breadth) { 384 ContentSizeMode sizeMode, _BreadthAccumulator breadth) {
385 385
386 for (final t in tracks) { 386 for (final t in tracks) {
387 final fn = breadth.getSizingFunction(t); 387 final fn = breadth.getSizingFunction(t);
388 if (sizeMode == ContentSizeMode.MAX && fn.isMaxContentSized || 388 if (sizeMode == ContentSizeMode.MAX && fn.isMaxContentSized ||
389 sizeMode == ContentSizeMode.MIN && fn.isContentSized) { 389 sizeMode == ContentSizeMode.MIN && fn.isContentSized) {
390 390
391 // Make sure we don't cross a fractional track 391 // Make sure we don't cross a fractional track
392 return tracks.length == 1 || !tracks.any((t_) => t_.isFractional); 392 return tracks.length == 1 || !tracks.any((t_) => t_.isFractional);
393 } 393 }
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 } 512 }
513 return result; 513 return result;
514 } 514 }
515 515
516 int _getSpanCount(ViewLayout item) { 516 int _getSpanCount(ViewLayout item) {
517 GridLayoutParams childLayout = item.layoutParams; 517 GridLayoutParams childLayout = item.layoutParams;
518 return (_dimension == Dimension.WIDTH ? 518 return (_dimension == Dimension.WIDTH ?
519 childLayout.columnSpan : childLayout.rowSpan); 519 childLayout.columnSpan : childLayout.rowSpan);
520 } 520 }
521 } 521 }
OLDNEW
« no previous file with comments | « no previous file | tests/html/svgelement_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698