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

Side by Side Diff: client/layout/SizingFunctions.dart

Issue 8680038: Revert initializing formals change in client code (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 9 years 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 | client/observable/observable.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 // This file has classes representing the grid sizing functions 5 // This file has classes representing the grid sizing functions
6 6
7 /** 7 /**
8 * Represents the sizing function used for the min or max of a row or column. 8 * Represents the sizing function used for the min or max of a row or column.
9 */ 9 */
10 // TODO(jmesserly): rename to GridSizing, or make internal 10 // TODO(jmesserly): rename to GridSizing, or make internal
(...skipping 21 matching lines...) Expand all
32 * auto-sized. 32 * auto-sized.
33 */ 33 */
34 class FixedSizing extends SizingFunction { 34 class FixedSizing extends SizingFunction {
35 final String units; 35 final String units;
36 final num length; 36 final num length;
37 37
38 // TODO(jmesserly): kind of ugly to have this mutable property here, but 38 // TODO(jmesserly): kind of ugly to have this mutable property here, but
39 // we need to correctly track whether we're content sized during a layout 39 // we need to correctly track whether we're content sized during a layout
40 bool _contentSized; 40 bool _contentSized;
41 41
42 FixedSizing(this.length, [units = 'px']) 42 FixedSizing(this.length, [this.units = 'px'])
43 : super(), this.units = units, 43 : super(),
44 _contentSized = false { 44 _contentSized = false {
45 if (units != 'px' && units != '%') { 45 if (units != 'px' && units != '%') {
46 // TODO(jmesserly): support other unit types 46 // TODO(jmesserly): support other unit types
47 throw new UnsupportedOperationException('Units other than px and %'); 47 throw new UnsupportedOperationException('Units other than px and %');
48 } 48 }
49 } 49 }
50 50
51 // TODO(jmesserly): this is only needed because of our mutable property 51 // TODO(jmesserly): this is only needed because of our mutable property
52 FixedSizing clone() => new FixedSizing(length, units); 52 FixedSizing clone() => new FixedSizing(length, units);
53 53
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 140
141 class _MaxBreadthAccumulator implements _BreadthAccumulator { 141 class _MaxBreadthAccumulator implements _BreadthAccumulator {
142 const _MaxBreadthAccumulator(); 142 const _MaxBreadthAccumulator();
143 143
144 void setSize(GridTrack t, num value) { t.maxBreadth = value; } 144 void setSize(GridTrack t, num value) { t.maxBreadth = value; }
145 num getSize(GridTrack t) => t.maxBreadth; 145 num getSize(GridTrack t) => t.maxBreadth;
146 146
147 SizingFunction getSizingFunction(GridTrack t) => t.maxSizing; 147 SizingFunction getSizingFunction(GridTrack t) => t.maxSizing;
148 } 148 }
149 149
OLDNEW
« no previous file with comments | « no previous file | client/observable/observable.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698