| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 part of html; | 5 part of html; |
| 6 | 6 |
| 7 class _ModelTreeObserver { | 7 class _ModelTreeObserver { |
| 8 static bool _initialized = false; | 8 static bool _initialized = false; |
| 9 | 9 |
| 10 /** | 10 /** |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 // Catch and report them a global exceptions. | 79 // Catch and report them a global exceptions. |
| 80 try { | 80 try { |
| 81 if (node._hasLocalModel != true && node._model != model && | 81 if (node._hasLocalModel != true && node._model != model && |
| 82 node._modelChangedStreams != null && | 82 node._modelChangedStreams != null && |
| 83 !node._modelChangedStreams.isEmpty) { | 83 !node._modelChangedStreams.isEmpty) { |
| 84 node._model = model; | 84 node._model = model; |
| 85 node._modelChangedStreams.toList() | 85 node._modelChangedStreams.toList() |
| 86 .forEach((controller) => controller.add(node)); | 86 .forEach((controller) => controller.add(node)); |
| 87 } | 87 } |
| 88 } catch (e, s) { | 88 } catch (e, s) { |
| 89 new Future.immediateError(e, s); | 89 new Future.error(e, s); |
| 90 } | 90 } |
| 91 for (var child = node.$dom_firstChild; child != null; | 91 for (var child = node.$dom_firstChild; child != null; |
| 92 child = child.nextNode) { | 92 child = child.nextNode) { |
| 93 if (child._hasLocalModel != true) { | 93 if (child._hasLocalModel != true) { |
| 94 propagateModel(child, model, fullTree); | 94 propagateModel(child, model, fullTree); |
| 95 } else if (fullTree) { | 95 } else if (fullTree) { |
| 96 propagateModel(child, child._model, true); | 96 propagateModel(child, child._model, true); |
| 97 } | 97 } |
| 98 } | 98 } |
| 99 } | 99 } |
| 100 } | 100 } |
| OLD | NEW |