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

Side by Side Diff: sky/sdk/lib/framework/layout.dart

Issue 1158813004: Style guide says enum values should be lowerCamelCase. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « sky/sdk/lib/framework/fn2.dart ('k') | sky/sdk/lib/framework/rendering/flex.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 library layout; 1 library layout;
2 2
3 // This version of layout.dart is a shim version of layout2.dart that is backed using CSS and <div>s. 3 // This version of layout.dart is a shim version of layout2.dart that is backed using CSS and <div>s.
4 4
5 import 'node.dart'; 5 import 'node.dart';
6 import 'dart:sky' as sky; 6 import 'dart:sky' as sky;
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 // UTILS 9 // UTILS
10 10
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 child.parentData = new FlexBoxParentData(); 370 child.parentData = new FlexBoxParentData();
371 } 371 }
372 372
373 static final Style _displayFlex = new Style._addToCache('display:flex'); 373 static final Style _displayFlex = new Style._addToCache('display:flex');
374 static final Style _displayFlexRow = new Style._addToCache('flex-direction:row '); 374 static final Style _displayFlexRow = new Style._addToCache('flex-direction:row ');
375 static final Style _displayFlexColumn = new Style._addToCache('flex-direction: column'); 375 static final Style _displayFlexColumn = new Style._addToCache('flex-direction: column');
376 376
377 String stylesToClasses(List<Style> styles) { 377 String stylesToClasses(List<Style> styles) {
378 var settings = _displayFlex._className; 378 var settings = _displayFlex._className;
379 switch (_direction) { 379 switch (_direction) {
380 case FlexDirection.Row: settings += ' ' + _displayFlexRow._className; brea k; 380 case FlexDirection.horizontal: settings += ' ' + _displayFlexRow._classNam e; break;
381 case FlexDirection.Column: settings += ' ' + _displayFlexColumn._className ; break; 381 case FlexDirection.vertical: settings += ' ' + _displayFlexColumn._classNa me; break;
382 } 382 }
383 return super.stylesToClasses(styles) + ' ' + settings; 383 return super.stylesToClasses(styles) + ' ' + settings;
384 } 384 }
385 385
386 void markNeedsLayout() { 386 void markNeedsLayout() {
387 super.markNeedsLayout(); 387 super.markNeedsLayout();
388 388
389 // pretend we did the layout: 389 // pretend we did the layout:
390 RenderCSS child = _firstChild; 390 RenderCSS child = _firstChild;
391 while (child != null) { 391 while (child != null) {
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 print(prefix + node.toString() + _attributes(node)); 553 print(prefix + node.toString() + _attributes(node));
554 var children = node.getChildNodes(); 554 var children = node.getChildNodes();
555 prefix = prefix + ' '; 555 prefix = prefix + ' ';
556 for (var child in children) 556 for (var child in children)
557 _serialiseDOM(child, prefix); 557 _serialiseDOM(child, prefix);
558 } 558 }
559 559
560 void dumpState() { 560 void dumpState() {
561 _serialiseDOM(sky.document); 561 _serialiseDOM(sky.document);
562 } 562 }
OLDNEW
« no previous file with comments | « sky/sdk/lib/framework/fn2.dart ('k') | sky/sdk/lib/framework/rendering/flex.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698