Chromium Code Reviews| 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:mirrors'; | 9 import 'dart:mirrors'; |
| 10 import 'dart:sky' as sky; | 10 import 'dart:sky' as sky; |
| (...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 606 root.direction = direction; | 606 root.direction = direction; |
| 607 } | 607 } |
| 608 } | 608 } |
| 609 | 609 |
| 610 class FlexExpandingChild extends ParentDataNode { | 610 class FlexExpandingChild extends ParentDataNode { |
| 611 FlexExpandingChild(UINode content, [int flex = 1]) | 611 FlexExpandingChild(UINode content, [int flex = 1]) |
| 612 : super(content, new FlexBoxParentData()..flex = flex); | 612 : super(content, new FlexBoxParentData()..flex = flex); |
| 613 } | 613 } |
| 614 | 614 |
| 615 class Image extends RenderNodeWrapper { | 615 class Image extends RenderNodeWrapper { |
| 616 RenderCSSImage root; | 616 RenderImage root; |
| 617 RenderCSSImage createNode() => new RenderCSSImage(this, this.src, this.width, this.height); | 617 RenderImage createNode() => new RenderImage(this.src, this.size); |
| 618 | |
| 619 RenderNodeWrapper get emptyNode => _emptyImage; | |
|
abarth-chromium
2015/06/03 17:53:21
We don't need emptyNode anymore.
jackson
2015/06/03 22:06:26
Done.
| |
| 618 | 620 |
| 619 final String src; | 621 final String src; |
| 620 final int width; | 622 final sky.Size size; |
| 621 final int height; | |
| 622 | 623 |
| 623 Image({ | 624 Image({ |
| 624 Object key, | 625 Object key, |
| 625 this.width, | 626 this.src, |
| 626 this.height, | 627 this.size |
| 627 this.src | |
| 628 }) : super(key: key); | 628 }) : super(key: key); |
| 629 | 629 |
| 630 void syncRenderNode(UINode old) { | 630 void syncRenderNode(UINode old) { |
| 631 super.syncRenderNode(old); | 631 super.syncRenderNode(old); |
| 632 root.configure(this.src, this.width, this.height); | 632 root.configure(this.src, this.width, this.height); |
| 633 } | 633 } |
| 634 } | 634 } |
| 635 | 635 |
| 636 | 636 |
| 637 Set<Component> _mountedComponents = new HashSet<Component>(); | 637 Set<Component> _mountedComponents = new HashSet<Component>(); |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 919 assert(root.parent is RenderView); | 919 assert(root.parent is RenderView); |
| 920 } | 920 } |
| 921 } | 921 } |
| 922 | 922 |
| 923 class Text extends Component { | 923 class Text extends Component { |
| 924 Text(this.data) : super(key: '*text*'); | 924 Text(this.data) : super(key: '*text*'); |
| 925 final String data; | 925 final String data; |
| 926 bool get interchangeable => true; | 926 bool get interchangeable => true; |
| 927 UINode build() => new Paragraph(text: data); | 927 UINode build() => new Paragraph(text: data); |
| 928 } | 928 } |
| OLD | NEW |