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

Side by Side Diff: client/html/src/SVGElementWrappingImplementation.dart

Issue 9113004: Use .dynamic to suppress dartc warning. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 11 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
« no previous file with comments | « client/html/release/htmlimpl.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 SVGElementWrappingImplementation extends ElementWrappingImplementation imp lements SVGElement { 5 class SVGElementWrappingImplementation extends ElementWrappingImplementation imp lements SVGElement {
6 SVGElementWrappingImplementation._wrap(ptr) : super._wrap(ptr) {} 6 SVGElementWrappingImplementation._wrap(ptr) : super._wrap(ptr) {}
7 7
8 factory SVGElementWrappingImplementation.tag(String tag) => 8 factory SVGElementWrappingImplementation.tag(String tag) =>
9 LevelDom.wrapSVGElement(dom.document.createElementNS( 9 LevelDom.wrapSVGElement(dom.document.createElementNS(
10 "http://www.w3.org/2000/svg", tag)); 10 "http://www.w3.org/2000/svg", tag));
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 } 52 }
53 53
54 String get outerHTML() { 54 String get outerHTML() {
55 final container = new Element.tag("div"); 55 final container = new Element.tag("div");
56 container.elements.add(this.clone(true)); 56 container.elements.add(this.clone(true));
57 return container.innerHTML; 57 return container.innerHTML;
58 } 58 }
59 59
60 String get innerHTML() { 60 String get innerHTML() {
61 final container = new Element.tag("div"); 61 final container = new Element.tag("div");
62 container.elements.addAll(this.clone(true).elements); 62 container.elements.addAll(this.clone(true).dynamic.elements);
63 return container.innerHTML; 63 return container.innerHTML;
64 } 64 }
65 65
66 void set innerHTML(String svg) { 66 void set innerHTML(String svg) {
67 var container = new Element.tag("div"); 67 var container = new Element.tag("div");
68 // Wrap the SVG string in <svg> so that SVGElements are created, rather than 68 // Wrap the SVG string in <svg> so that SVGElements are created, rather than
69 // HTMLElements. 69 // HTMLElements.
70 container.innerHTML = '<svg version="1.1">$svg</svg>'; 70 container.innerHTML = '<svg version="1.1">$svg</svg>';
71 this.elements = container.elements.first.elements; 71 this.elements = container.elements.first.elements;
72 } 72 }
73 } 73 }
OLDNEW
« no previous file with comments | « client/html/release/htmlimpl.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698