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

Unified Diff: lib/dom/templates/html/impl/impl_DocumentFragment.darttemplate

Issue 10928060: Partially migrate from old getter syntax to new one. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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/dom/templates/html/impl/impl_DocumentFragment.darttemplate
diff --git a/lib/dom/templates/html/impl/impl_DocumentFragment.darttemplate b/lib/dom/templates/html/impl/impl_DocumentFragment.darttemplate
index 90e690c573b55476ec5f41a5c3af01e3240d4723..2aaad92a4c3b36338617ff71eab770fb03405bda 100644
--- a/lib/dom/templates/html/impl/impl_DocumentFragment.darttemplate
+++ b/lib/dom/templates/html/impl/impl_DocumentFragment.darttemplate
@@ -12,11 +12,11 @@ class FilteredElementList implements ElementList {
// with externally to this class.
//
// TODO(nweiz): Do we really need to copy the list to make the types work out?
- List<Element> get _filtered() =>
+ List<Element> get _filtered =>
new List.from(_childNodes.filter((n) => n is Element));
// Don't use _filtered.first so we can short-circuit once we find an element.
- Element get first() {
+ Element get first {
for (final node in _childNodes) {
if (node is Element) {
return node;
@@ -91,7 +91,7 @@ class FilteredElementList implements ElementList {
bool every(bool f(Element element)) => _filtered.every(f);
bool some(bool f(Element element)) => _filtered.some(f);
bool isEmpty() => _filtered.isEmpty();
- int get length() => _filtered.length;
+ int get length => _filtered.length;
Element operator [](int index) => _filtered[index];
Iterator<Element> iterator() => _filtered.iterator();
List<Element> getRange(int start, int rangeLength) =>
@@ -131,13 +131,13 @@ class _FrozenCSSClassSet extends _CssClassSet {
}
Set<String> _read() => new Set<String>();
- bool get isFrozen() => true;
+ bool get isFrozen => true;
}
class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
ElementList _elements;
- ElementList get elements() {
+ ElementList get elements {
if (_elements == null) {
_elements = new FilteredElementList(this);
}
@@ -158,13 +158,13 @@ class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
List<Element> queryAll(String selectors) =>
new _FrozenElementList._wrap($dom_querySelectorAll(selectors));
- String get innerHTML() {
+ String get innerHTML {
final e = new Element.tag("div");
e.nodes.add(this.clone(true));
return e.innerHTML;
}
- String get outerHTML() => innerHTML;
+ String get outerHTML => innerHTML;
// TODO(nweiz): Do we want to support some variant of innerHTML for XML and/or
// SVG strings?
@@ -213,7 +213,7 @@ class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
this.insertAdjacentHTML('beforeend', text);
}
- Future<ElementRect> get rect() {
+ Future<ElementRect> get rect {
return _createMeasurementFuture(() => const EmptyElementRect(),
new Completer<ElementRect>());
}
@@ -221,29 +221,29 @@ class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
// If we can come up with a semi-reasonable default value for an Element
// getter, we'll use it. In general, these return the same values as an
// element that has no parent.
- String get contentEditable() => "false";
- bool get isContentEditable() => false;
- bool get draggable() => false;
- bool get hidden() => false;
- bool get spellcheck() => false;
- bool get translate() => false;
- int get tabIndex() => -1;
- String get id() => "";
- String get title() => "";
- String get tagName() => "";
- String get webkitdropzone() => "";
- String get webkitRegionOverflow() => "";
+ String get contentEditable => "false";
+ bool get isContentEditable => false;
+ bool get draggable => false;
+ bool get hidden => false;
+ bool get spellcheck => false;
+ bool get translate => false;
+ int get tabIndex => -1;
+ String get id => "";
+ String get title => "";
+ String get tagName => "";
+ String get webkitdropzone => "";
+ String get webkitRegionOverflow => "";
Element get $dom_firstElementChild() => elements.first();
Element get $dom_lastElementChild() => elements.last();
- Element get nextElementSibling() => null;
- Element get previousElementSibling() => null;
- Element get offsetParent() => null;
- Element get parent() => null;
- Map<String, String> get attributes() => const {};
- CSSClassSet get classes() => new _FrozenCSSClassSet();
- Map<String, String> get dataAttributes() => const {};
- CSSStyleDeclaration get style() => new Element.tag('div').style;
- Future<CSSStyleDeclaration> get computedStyle() =>
+ Element get nextElementSibling => null;
+ Element get previousElementSibling => null;
+ Element get offsetParent => null;
+ Element get parent => null;
+ Map<String, String> get attributes => const {};
+ CSSClassSet get classes => new _FrozenCSSClassSet();
+ Map<String, String> get dataAttributes => const {};
+ CSSStyleDeclaration get style => new Element.tag('div').style;
+ Future<CSSStyleDeclaration> get computedStyle =>
_emptyStyleFuture();
Future<CSSStyleDeclaration> getComputedStyle(String pseudoElement) =>
_emptyStyleFuture();
@@ -282,7 +282,7 @@ class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
"Content editable can't be set for document fragments.");
}
- String get dir() {
+ String get dir {
throw new UnsupportedOperationException(
"Document fragments don't support text direction.");
}
@@ -307,7 +307,7 @@ class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
"ID can't be set for document fragments.");
}
- String get lang() {
+ String get lang {
throw new UnsupportedOperationException(
"Document fragments don't support language.");
}
« no previous file with comments | « lib/dom/templates/html/impl/impl_CanvasElement.darttemplate ('k') | lib/dom/templates/html/impl/impl_Element.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698