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

Unified Diff: test/fixtures/x_list.dart

Issue 1418513006: update elements and fix some bugs (Closed) Base URL: git@github.com:dart-lang/polymer_elements.git@master
Patch Set: code review updates Created 5 years, 2 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 | « test/fixtures/tooltip_button.html ('k') | test/fixtures/x_list.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/fixtures/x_list.dart
diff --git a/test/fixtures/x_list.dart b/test/fixtures/x_list.dart
index fd3866ff4eec736c2022119868dd17f222fbe76f..68716fc8b53862891fc9ae4c0989212e99603c19 100644
--- a/test/fixtures/x_list.dart
+++ b/test/fixtures/x_list.dart
@@ -22,11 +22,22 @@ class XList extends PolymerElement {
@property
int listHeight = 300;
+
+ @property
+ bool pre = false;
get list => $['list'];
@reflectable
- String computedItemHeight() => 'height: ${itemHeight}px';
+ String computedItemHeight(item) {
+ var css = pre ? 'white-space:pre;' : '';
+ if (item['height'] != null && item['height'] != 0) {
+ css += itemHeight == 0 ? '' : 'height: ${item['height']}px;';
+ } else if (itemHeight != 0) {
+ css += 'height: ${itemHeight}px;';
+ }
+ return css;
+ }
@reflectable
String computedListHeight(listHeight) => 'height: ${listHeight}px';
« no previous file with comments | « test/fixtures/tooltip_button.html ('k') | test/fixtures/x_list.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698