Index: lib/html/dart2js/html_dart2js.dart |
diff --git a/lib/html/dart2js/html_dart2js.dart b/lib/html/dart2js/html_dart2js.dart |
index 99a07d82897a830c222663703259e75806506dc4..177d864d373dd20e6c9adf0ce4fd2703f3a6c73f 100644 |
--- a/lib/html/dart2js/html_dart2js.dart |
+++ b/lib/html/dart2js/html_dart2js.dart |
@@ -11734,7 +11734,7 @@ class _ElementAttributeMap implements AttributeMap { |
} |
} |
- Collection<String> getKeys() { |
+ Collection<String> get keys { |
// TODO(jacobr): generate a lazy collection instead. |
final attributes = _element.$dom_attributes; |
final keys = new List<String>(attributes.length); |
@@ -11744,7 +11744,7 @@ class _ElementAttributeMap implements AttributeMap { |
return keys; |
} |
- Collection<String> getValues() { |
+ Collection<String> get values { |
// TODO(jacobr): generate a lazy collection instead. |
final attributes = _element.$dom_attributes; |
final values = new List<String>(attributes.length); |
@@ -11782,7 +11782,7 @@ class _DataAttributeMap implements AttributeMap { |
// interface Map |
// TODO: Use lazy iterator when it is available on Map. |
- bool containsValue(String value) => getValues().some((v) => v == value); |
+ bool containsValue(String value) => values.some((v) => v == value); |
bool containsKey(String key) => $dom_attributes.containsKey(_attr(key)); |
@@ -11799,7 +11799,7 @@ class _DataAttributeMap implements AttributeMap { |
void clear() { |
// Needs to operate on a snapshot since we are mutating the collection. |
- for (String key in getKeys()) { |
+ for (String key in keys()) { |
remove(key); |
} |
} |
@@ -11812,7 +11812,7 @@ class _DataAttributeMap implements AttributeMap { |
}); |
} |
- Collection<String> getKeys() { |
+ Collection<String> get keys { |
final keys = new List<String>(); |
$dom_attributes.forEach((String key, String value) { |
if (_matches(key)) { |
@@ -11822,7 +11822,7 @@ class _DataAttributeMap implements AttributeMap { |
return keys; |
} |
- Collection<String> getValues() { |
+ Collection<String> get values { |
final values = new List<String>(); |
$dom_attributes.forEach((String key, String value) { |
if (_matches(key)) { |
@@ -11832,7 +11832,7 @@ class _DataAttributeMap implements AttributeMap { |
return values; |
} |
- int get length => getKeys().length; |
+ int get length => keys.length; |
// TODO: Use lazy iterator when it is available on Map. |
bool get isEmpty => length == 0; |
@@ -12054,7 +12054,7 @@ class _ElementImpl extends _NodeImpl implements Element native "*Element" { |
void set attributes(Map<String, String> value) { |
Map<String, String> attributes = this.attributes; |
attributes.clear(); |
- for (String key in value.getKeys()) { |
+ for (String key in value.keys) { |
attributes[key] = value[key]; |
} |
} |
@@ -12086,7 +12086,7 @@ class _ElementImpl extends _NodeImpl implements Element native "*Element" { |
void set dataAttributes(Map<String, String> value) { |
final dataAttributes = this.dataAttributes; |
dataAttributes.clear(); |
- for (String key in value.getKeys()) { |
+ for (String key in value.keys) { |
dataAttributes[key] = value[key]; |
} |
} |
@@ -32634,7 +32634,7 @@ class _StorageEventImpl extends _EventImpl implements StorageEvent native "*Stor |
class _StorageImpl implements Storage native "*Storage" { |
// TODO(nweiz): update this when maps support lazy iteration |
- bool containsValue(String value) => getValues().some((e) => e == value); |
+ bool containsValue(String value) => values.some((e) => e == value); |
bool containsKey(String key) => $dom_getItem(key) != null; |
@@ -32664,13 +32664,13 @@ class _StorageImpl implements Storage native "*Storage" { |
} |
} |
- Collection<String> getKeys() { |
+ Collection<String> get keys { |
final keys = []; |
forEach((k, v) => keys.add(k)); |
return keys; |
} |
- Collection<String> getValues() { |
+ Collection<String> get values { |
final values = []; |
forEach((k, v) => values.add(v)); |
return values; |
@@ -39668,8 +39668,8 @@ class _Serializer extends _MessageTraverser { |
int id = _nextFreeRefId++; |
_visited[map] = id; |
- var keys = _serializeList(map.getKeys()); |
- var values = _serializeList(map.getValues()); |
+ var keys = _serializeList(map.keys); |
+ var values = _serializeList(map.values); |
// TODO(floitsch): we are losing the generic type. |
return ['map', id, keys, values]; |
} |