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

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

Issue 1038583003: [Effen] Add a basic layout test (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 9 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 | sky/tests/framework/basic.dart » ('j') | sky/tests/framework/basic.sky » ('J')
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 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
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) {
453 Element oldElement = old as Element; 453 Element oldElement = old as Element;
454 sky.Element root = _root as sky.Element; 454 sky.Element root = _root as sky.Element;
455 455
456 _ensureClass(); 456 _ensureClass();
457 if (_class != oldElement._class) 457 if (_class != oldElement._class && _class != '')
458 root.setAttribute('class', _class); 458 root.setAttribute('class', _class);
459 459
460 if (inlineStyle != oldElement.inlineStyle) 460 if (inlineStyle != oldElement.inlineStyle)
461 root.setAttribute('style', inlineStyle); 461 root.setAttribute('style', inlineStyle);
462 462
463 _syncChildren(oldElement); 463 _syncChildren(oldElement);
464 } 464 }
465 465
466 void _syncChildren(Element oldElement) { 466 void _syncChildren(Element oldElement) {
467 sky.Element root = _root as sky.Element; 467 sky.Element root = _root as sky.Element;
(...skipping 431 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 | sky/tests/framework/basic.dart » ('j') | sky/tests/framework/basic.sky » ('J')

Powered by Google App Engine
This is Rietveld 408576698