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

Side by Side Diff: sky/framework/fn.dart

Issue 1041863003: Effen error if a component ancestor doesn't specify a style (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 library fn; 5 library fn;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 import 'dart:sky' as sky; 9 import 'dart:sky' as sky;
10 import 'reflect.dart' as reflect; 10 import 'reflect.dart' as reflect;
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 432
433 void _ensureClass() { 433 void _ensureClass() {
434 if (_class == null) { 434 if (_class == null) {
435 List<Style> styles = new List<Style>(); 435 List<Style> styles = new List<Style>();
436 if (style != null) { 436 if (style != null) {
437 styles.add(style); 437 styles.add(style);
438 } 438 }
439 439
440 Node parent = _parent; 440 Node parent = _parent;
441 while (parent != null && parent is! RenderNode) { 441 while (parent != null && parent is! RenderNode) {
442 if (parent is StyleNode) 442 if (parent is StyleNode && (parent as StyleNode).style != null)
ojan 2015/03/30 20:44:11 You have two spaces after StyleNode.
443 styles.add((parent as StyleNode).style); 443 styles.add((parent as StyleNode).style);
444 444
445 parent = parent._parent; 445 parent = parent._parent;
446 } 446 }
447 447
448 _class = styles.map((s) => s._className).join(' '); 448 _class = styles.map((s) => s._className).join(' ');
449 } 449 }
450 } 450 }
451 451
452 void _syncNode(RenderNode old) { 452 void _syncNode(RenderNode old) {
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 899
900 abstract class App extends Component { 900 abstract class App extends Component {
901 sky.Node _host; 901 sky.Node _host;
902 902
903 App() : super(stateful: true) { 903 App() : super(stateful: true) {
904 _host = sky.document.createElement('div'); 904 _host = sky.document.createElement('div');
905 sky.document.appendChild(_host); 905 sky.document.appendChild(_host);
906 _scheduleComponentForRender(this); 906 _scheduleComponentForRender(this);
907 } 907 }
908 } 908 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698