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 import 'dart:sky' as sky; | 5 import 'dart:sky' as sky; |
| 6 | 6 |
| 7 import 'package:vector_math/vector_math.dart'; | 7 import 'package:vector_math/vector_math.dart'; |
| 8 | 8 |
| 9 import '../painting/text_style.dart'; | 9 import '../painting/text_style.dart'; |
| 10 import '../rendering/block.dart'; | 10 import '../rendering/block.dart'; |
| (...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 432 TextStyle defaultStyle = DefaultTextStyle.of(this); | 432 TextStyle defaultStyle = DefaultTextStyle.of(this); |
| 433 TextStyle combinedStyle; | 433 TextStyle combinedStyle; |
| 434 if (defaultStyle != null) { | 434 if (defaultStyle != null) { |
| 435 if (style != null) | 435 if (style != null) |
| 436 combinedStyle = defaultStyle.merge(style); | 436 combinedStyle = defaultStyle.merge(style); |
| 437 else | 437 else |
| 438 combinedStyle = defaultStyle; | 438 combinedStyle = defaultStyle; |
| 439 } else { | 439 } else { |
| 440 combinedStyle = style; | 440 combinedStyle = style; |
| 441 } | 441 } |
| 442 if (combinedStyle != null) | 442 if (combinedStyle == null) |
| 443 text = new InlineStyle(combinedStyle, [text]); | 443 combinedStyle = const TextStyle(color: const Color(0xFFFFFFFF)); |
|
abarth-chromium
2015/06/27 00:31:51
Maybe we should use a TextStyle from typography.da
| |
| 444 text = new InlineStyle(combinedStyle, [text]); | |
| 444 return new Inline(text: text); | 445 return new Inline(text: text); |
|
abarth-chromium
2015/06/27 00:31:51
IMHO, we should merge lines 444 and 445 so we don'
| |
| 445 } | 446 } |
| 446 } | 447 } |
| 447 | 448 |
| 448 class Image extends LeafRenderObjectWrapper { | 449 class Image extends LeafRenderObjectWrapper { |
| 449 | 450 |
| 450 Image({ | 451 Image({ |
| 451 src, | 452 src, |
| 452 this.size | 453 this.size |
| 453 }) : src = src, | 454 }) : src = src, |
| 454 super(key: src) { | 455 super(key: src) { |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 489 } | 490 } |
| 490 | 491 |
| 491 void remove() { | 492 void remove() { |
| 492 RenderObjectWrapper ancestor = findAncestor(RenderObjectWrapper); | 493 RenderObjectWrapper ancestor = findAncestor(RenderObjectWrapper); |
| 493 assert(ancestor is RenderObjectWrapper); | 494 assert(ancestor is RenderObjectWrapper); |
| 494 ancestor.detachChildRoot(this); | 495 ancestor.detachChildRoot(this); |
| 495 super.remove(); | 496 super.remove(); |
| 496 } | 497 } |
| 497 | 498 |
| 498 } | 499 } |
| OLD | NEW |