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

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

Issue 14173003: Remove Collection, Collections and clean up List/Set/Queue implementations of retain/remove. (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 | « samples/swarm/Views.dart ('k') | samples/swarm/swarm_ui_lib/view/view.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 /** The interface that the layout algorithms use to talk to the view. */ 7 /** The interface that the layout algorithms use to talk to the view. */
8 abstract class Positionable { 8 abstract class Positionable {
9 ViewLayout get layout; 9 ViewLayout get layout;
10 10
11 /** Gets our custom CSS properties, as provided by the CSS preprocessor. */ 11 /** Gets our custom CSS properties, as provided by the CSS preprocessor. */
12 Map<String, String> get customStyle; 12 Map<String, String> get customStyle;
13 13
14 /** Gets the root DOM used for layout. */ 14 /** Gets the root DOM used for layout. */
15 Element get node; 15 Element get node;
16 16
17 /** Gets the collection of child views. */ 17 /** Gets the collection of child views. */
18 Collection<Positionable> get childViews; 18 Iterable<Positionable> get childViews;
19 19
20 /** Causes a view to layout its children. */ 20 /** Causes a view to layout its children. */
21 void doLayout(); 21 void doLayout();
22 } 22 }
23 23
24 24
25 /** 25 /**
26 * Caches the layout parameters that were specified in CSS during a layout 26 * Caches the layout parameters that were specified in CSS during a layout
27 * computation. These values are immutable during a layout. 27 * computation. These values are immutable during a layout.
28 */ 28 */
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 // For an unset max-content size, use the actual size 227 // For an unset max-content size, use the actual size
228 return size; 228 return size;
229 } 229 }
230 if (style.endsWith('%')) { 230 if (style.endsWith('%')) {
231 num percent = double.parse(style.substring(0, style.length - 1)); 231 num percent = double.parse(style.substring(0, style.length - 1));
232 return ((percent / 100) * parentSize).toInt(); 232 return ((percent / 100) * parentSize).toInt();
233 } 233 }
234 return _toPixels(style); 234 return _toPixels(style);
235 } 235 }
236 } 236 }
OLDNEW
« no previous file with comments | « samples/swarm/Views.dart ('k') | samples/swarm/swarm_ui_lib/view/view.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698