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

Unified Diff: lib/html/templates/html/impl/impl_Element.darttemplate

Issue 11262012: Migrate to getter for isEmpty. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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
Index: lib/html/templates/html/impl/impl_Element.darttemplate
diff --git a/lib/html/templates/html/impl/impl_Element.darttemplate b/lib/html/templates/html/impl/impl_Element.darttemplate
index 1fbdd5299b3e467d55ac38274094040e30ee9689..3437c9e3f301565809c23887bc71155230b90400 100644
--- a/lib/html/templates/html/impl/impl_Element.darttemplate
+++ b/lib/html/templates/html/impl/impl_Element.darttemplate
@@ -65,7 +65,7 @@ class _ChildrenElementList implements List {
return out;
}
- bool isEmpty() {
+ bool get isEmpty {
return _element.$dom_firstElementChild == null;
}
@@ -208,7 +208,7 @@ class _FrozenElementList implements List {
return false;
}
- bool isEmpty() => _nodeList.isEmpty();
+ bool get isEmpty => _nodeList.isEmpty;
int get length => _nodeList.length;
@@ -382,7 +382,7 @@ class _ElementAttributeMap implements AttributeMap {
/**
* Returns true if there is no {key, value} pair in the map.
*/
- bool isEmpty() {
+ bool get isEmpty {
return length == 0;
}
}
@@ -453,7 +453,7 @@ class _DataAttributeMap implements AttributeMap {
int get length => getKeys().length;
// TODO: Use lazy iterator when it is available on Map.
- bool isEmpty() => length == 0;
+ bool get isEmpty => length == 0;
// Helpers.
String _attr(String key) => 'data-$key';
@@ -486,7 +486,7 @@ class _CssClassSet implements CSSClassSet {
bool some(bool f(String element)) => _read().some(f);
- bool isEmpty() => _read().isEmpty();
+ bool get isEmpty => _read().isEmpty;
bool get frozen => false;
@@ -570,7 +570,7 @@ class _CssClassSet implements CSSClassSet {
Set<String> s = new Set<String>();
for (String name in _classname().split(' ')) {
String trimmed = name.trim();
- if (!trimmed.isEmpty()) {
+ if (!trimmed.isEmpty) {
s.add(trimmed);
}
}
« no previous file with comments | « lib/html/templates/html/impl/impl_DocumentFragment.darttemplate ('k') | lib/html/templates/html/impl/impl_Node.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698