| 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 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 586 style: style, | 586 style: style, |
| 587 inlineStyle: inlineStyle | 587 inlineStyle: inlineStyle |
| 588 ); | 588 ); |
| 589 | 589 |
| 590 void _syncNode(UINode old) { | 590 void _syncNode(UINode old) { |
| 591 super._syncNode(old); | 591 super._syncNode(old); |
| 592 _root.direction = direction; | 592 _root.direction = direction; |
| 593 } | 593 } |
| 594 } | 594 } |
| 595 | 595 |
| 596 class FillStackContainer extends SkyElementWrapper { |
| 597 |
| 598 RenderCSSStack _root; |
| 599 RenderCSSStack _createNode() => new RenderCSSStack(this); |
| 600 |
| 601 static final FillStackContainer _emptyContainer = new FillStackContainer(); |
| 602 |
| 603 SkyNodeWrapper get _emptyNode => _emptyContainer; |
| 604 |
| 605 FillStackContainer({ |
| 606 Object key, |
| 607 List<UINode> children, |
| 608 Style style, |
| 609 String inlineStyle |
| 610 }) : super( |
| 611 key: key, |
| 612 children: _positionNodesToFill(children), |
| 613 style: style, |
| 614 inlineStyle: inlineStyle |
| 615 ); |
| 616 |
| 617 static StackParentData _fillParentData = new StackParentData() |
| 618 ..top = 0.0 |
| 619 ..left = 0.0 |
| 620 ..right = 0.0 |
| 621 ..bottom = 0.0; |
| 622 |
| 623 static List<UINode> _positionNodesToFill(List<UINode> input) { |
| 624 if (input == null) |
| 625 return null; |
| 626 return input.map((node) { |
| 627 return new ParentDataNode(node, _fillParentData); |
| 628 }).toList(); |
| 629 } |
| 630 } |
| 631 |
| 596 class TextFragment extends SkyElementWrapper { | 632 class TextFragment extends SkyElementWrapper { |
| 597 | 633 |
| 598 RenderCSSInline _root; | 634 RenderCSSInline _root; |
| 599 RenderCSSInline _createNode() => new RenderCSSInline(this, this.data); | 635 RenderCSSInline _createNode() => new RenderCSSInline(this, this.data); |
| 600 | 636 |
| 601 static final TextFragment _emptyText = new TextFragment(''); | 637 static final TextFragment _emptyText = new TextFragment(''); |
| 602 | 638 |
| 603 SkyNodeWrapper get _emptyNode => _emptyText; | 639 SkyNodeWrapper get _emptyNode => _emptyText; |
| 604 | 640 |
| 605 final String data; | 641 final String data; |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 879 _sync(null, _host, _root); | 915 _sync(null, _host, _root); |
| 880 } | 916 } |
| 881 } | 917 } |
| 882 | 918 |
| 883 class Text extends Component { | 919 class Text extends Component { |
| 884 Text(this.data) : super(key: '*text*'); | 920 Text(this.data) : super(key: '*text*'); |
| 885 final String data; | 921 final String data; |
| 886 bool get interchangeable => true; | 922 bool get interchangeable => true; |
| 887 UINode build() => new Paragraph(children: [new TextFragment(data)]); | 923 UINode build() => new Paragraph(children: [new TextFragment(data)]); |
| 888 } | 924 } |
| OLD | NEW |