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

Side by Side Diff: lib/dom/templates/html/impl/impl_SVGElement.darttemplate

Issue 9963029: Fix some warnings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reupload (due to error messages during upload) Created 8 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 class _AttributeClassSet extends _CssClassSet { 5 class _AttributeClassSet extends _CssClassSet {
6 _AttributeClassSet(element) : super(element); 6 _AttributeClassSet(element) : super(element);
7 7
8 String $dom_className() => _element.attributes['class']; 8 String $dom_className() => _element.attributes['class'];
9 9
10 void _write(Set s) { 10 void _write(Set s) {
(...skipping 12 matching lines...) Expand all
23 ElementList get elements() => new FilteredElementList(this); 23 ElementList get elements() => new FilteredElementList(this);
24 24
25 void set elements(Collection<Element> value) { 25 void set elements(Collection<Element> value) {
26 final elements = this.elements; 26 final elements = this.elements;
27 elements.clear(); 27 elements.clear();
28 elements.addAll(value); 28 elements.addAll(value);
29 } 29 }
30 30
31 String get outerHTML() { 31 String get outerHTML() {
32 final container = new Element.tag("div"); 32 final container = new Element.tag("div");
33 final SVGElement clone = this.clone(true); 33 final SVGElement cloned = this.clone(true);
34 container.elements.add(clone); 34 container.elements.add(cloned);
35 return container.innerHTML; 35 return container.innerHTML;
36 } 36 }
37 37
38 String get innerHTML() { 38 String get innerHTML() {
39 final container = new Element.tag("div"); 39 final container = new Element.tag("div");
40 final SVGElement clone = this.clone(true); 40 final SVGElement cloned = this.clone(true);
41 container.elements.addAll(clone.elements); 41 container.elements.addAll(cloned.elements);
42 return container.innerHTML; 42 return container.innerHTML;
43 } 43 }
44 44
45 void set innerHTML(String svg) { 45 void set innerHTML(String svg) {
46 final container = new Element.tag("div"); 46 final container = new Element.tag("div");
47 // Wrap the SVG string in <svg> so that SVGElements are created, rather than 47 // Wrap the SVG string in <svg> so that SVGElements are created, rather than
48 // HTMLElements. 48 // HTMLElements.
49 container.innerHTML = '<svg version="1.1">$svg</svg>'; 49 container.innerHTML = '<svg version="1.1">$svg</svg>';
50 this.elements = container.elements.first.elements; 50 this.elements = container.elements.first.elements;
51 } 51 }
52 52
53 $!MEMBERS 53 $!MEMBERS
54 } 54 }
OLDNEW
« no previous file with comments | « lib/dom/templates/html/impl/impl_NodeList.darttemplate ('k') | lib/dom/templates/immutable_list_mixin.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698