OLD | NEW |
1 part of layout_tests; | |
2 | |
3 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
4 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
5 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
6 | 4 |
7 /** | 5 /** |
8 * An app for testing the grid layout system. | 6 * An app for testing the grid layout system. |
9 */ | 7 */ |
10 | 8 |
11 /** Creates a grid view structure given the CSS styles. */ | 9 /** Creates a grid view structure given the CSS styles. */ |
12 View createGrid(Map<String, Map<String, String>> styles) { | 10 View createGrid(Map<String, Map<String, String>> styles) { |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 } | 123 } |
126 | 124 |
127 void _appendMetrics(StringBuffer sb, Element node, ElementRect rect, | 125 void _appendMetrics(StringBuffer sb, Element node, ElementRect rect, |
128 [String indent = '']) { | 126 [String indent = '']) { |
129 String id = node.id; | 127 String id = node.id; |
130 final offset = rect.offset; | 128 final offset = rect.offset; |
131 num left = offset.left, top = offset.top; | 129 num left = offset.left, top = offset.top; |
132 num width = offset.width, height = offset.height; | 130 num width = offset.width, height = offset.height; |
133 sb.add("${indent}'$id': [$left, $top, $width, $height],\n"); | 131 sb.add("${indent}'$id': [$left, $top, $width, $height],\n"); |
134 } | 132 } |
OLD | NEW |