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

Unified Diff: sky/sdk/lib/framework/rendering/object.dart

Issue 1160233004: Improve the RenderObject.toString() logic so that there's not blank lines everywhere and to general… (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: fix matrix output, comment out debug line 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
« no previous file with comments | « sky/sdk/lib/framework/rendering/box.dart ('k') | sky/sdk/lib/framework/rendering/paragraph.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/framework/rendering/object.dart
diff --git a/sky/sdk/lib/framework/rendering/object.dart b/sky/sdk/lib/framework/rendering/object.dart
index 1743f2fdad78e4509a2938dd88e8a7b854b8a377..86eec6e2b1fc6786a93b7534cc1f9a5007ca7186 100644
--- a/sky/sdk/lib/framework/rendering/object.dart
+++ b/sky/sdk/lib/framework/rendering/object.dart
@@ -224,12 +224,9 @@ abstract class RenderObject extends AbstractNode {
String toString([String prefix = '']) {
String header = '${runtimeType}\n';
prefix += ' ';
- String settings = '${debugDescribeSettings(prefix)}';
- if (settings != '')
- settings += '\n';
- return '${header}${settings}${debugDescribeChildren(prefix)}';
+ return '${header}${debugDescribeSettings(prefix)}${debugDescribeChildren(prefix)}';
}
- String debugDescribeSettings(String prefix) => '${prefix}parentData: ${parentData}';
+ String debugDescribeSettings(String prefix) => '${prefix}parentData: ${parentData}\n';
String debugDescribeChildren(String prefix) => '';
}
@@ -425,8 +422,6 @@ abstract class ContainerRenderObjectMixin<ChildType extends RenderObject, Parent
int count = 1;
ChildType child = _firstChild;
while (child != null) {
- if (result != '')
- result += '\n';
result += '${prefix}child ${count}: ${child.toString(prefix)}';
count += 1;
child = child.parentData.nextSibling;
« no previous file with comments | « sky/sdk/lib/framework/rendering/box.dart ('k') | sky/sdk/lib/framework/rendering/paragraph.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698