Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Unified Diff: sky/sdk/lib/rendering/block.dart

Issue 1211573003: Fill out some more documentation about building RenderBox subclasses. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sky/sdk/lib/rendering/block.dart
diff --git a/sky/sdk/lib/rendering/block.dart b/sky/sdk/lib/rendering/block.dart
index 4d163db4a29001d57e482ec699dc52da7ed81dc0..cc6859e77268b454323e9aef93175132e9c8f172 100644
--- a/sky/sdk/lib/rendering/block.dart
+++ b/sky/sdk/lib/rendering/block.dart
@@ -19,7 +19,8 @@ class RenderBlock extends RenderBox with ContainerRenderObjectMixin<RenderBox, B
List<RenderBox> children
}) {
if (children != null)
- children.forEach((child) { add(child); });
+ for (RenderBox child in children)
hansmuller 2015/06/24 20:30:14 Maybe just define addAll(children) in ContainerRen
Hixie 2015/06/25 19:15:31 Good idea. Done.
+ add(child);
hansmuller 2015/06/24 19:53:31 https://www.dartlang.org/articles/style-guide/#do-
Hixie 2015/06/25 19:15:31 I updated our style guide to disagree with this. A
}
void setParentData(RenderBox child) {
hansmuller 2015/06/24 20:32:49 Could setParentData() be defined in RenderBoxConta
Hixie 2015/06/25 19:15:32 Sadly not. You can't call "new" on a generic type

Powered by Google App Engine
This is Rietveld 408576698