| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |