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

Unified Diff: lib/html/templates/html/interface/interface_Element.darttemplate

Issue 10915245: Removing interfaces from dart:html (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Incorporating review feedback. 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/html/templates/html/interface/interface_Element.darttemplate
diff --git a/lib/html/templates/html/interface/interface_Element.darttemplate b/lib/html/templates/html/interface/interface_Element.darttemplate
index 5ce55476d3d7a55c449d9188e157b7f13052c965..449737b7be99df15b1c37ff826b14b8033b50365 100644
--- a/lib/html/templates/html/interface/interface_Element.darttemplate
+++ b/lib/html/templates/html/interface/interface_Element.darttemplate
@@ -9,7 +9,7 @@
// Note, ElementList implements List (instead of List<Element>) so
// that its implementing classes may be cast to Lists of more specific
// type such as List<CanvasElement>.
-interface ElementList extends List {
+abstract class ElementList implements List {
// TODO(jacobr): add element batch manipulation methods.
ElementList filter(bool f(Element element));
@@ -24,14 +24,14 @@ interface ElementList extends List {
* Extends the regular Map interface by automatically coercing non-string
* values to strings.
*/
-interface AttributeMap extends Map<String, String> {
+abstract class AttributeMap implements Map<String, String> {
void operator []=(String key, value);
}
/**
* All your element measurement needs in one place
*/
-interface ElementRect {
+abstract class ElementRect {
// Relative to offsetParent
ClientRect get client;
ClientRect get offset;
@@ -42,12 +42,12 @@ interface ElementRect {
List<ClientRect> get clientRects;
}
-interface NodeSelector {
+abstract class NodeSelector {
Element query(String selectors);
List<Element> queryAll(String selectors);
}
-interface CSSClassSet extends Set<String> {
+abstract class CSSClassSet implements Set<String> {
/**
* Adds the class [token] to the element if it is not on it, removes it if it
* is.
@@ -62,9 +62,11 @@ interface CSSClassSet extends Set<String> {
}
$!COMMENT
-interface Element extends Node, NodeSelector default _$(ID)FactoryProvider {
- Element.html(String html);
- Element.tag(String tag);
+abstract class Element implements Node, NodeSelector {
+ factory Element.html(String html) =>
+ _$(ID)FactoryProvider.createElement_html(html);
+ factory Element.tag(String tag) =>
+ _$(ID)FactoryProvider.createElement_tag(tag);
AttributeMap get attributes;
void set attributes(Map<String, String> value);

Powered by Google App Engine
This is Rietveld 408576698