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

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

Issue 9732019: dart:html perf optimization based on runing Dromaeo benchmarks (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixes 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 _className() => _element.attributes['class']; 8 String $dom_className() => _element.attributes['class'];
9 9
10 void _write(Set s) { 10 void _write(Set s) {
11 _element.attributes['class'] = _formatSet(s); 11 _element.attributes['class'] = _formatSet(s);
12 } 12 }
13 } 13 }
14 14
15 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { 15 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
16 Set<String> get classes() { 16 Set<String> get classes() {
17 if (_cssClassSet === null) { 17 if (_cssClassSet === null) {
18 _cssClassSet = new _AttributeClassSet(_ptr); 18 _cssClassSet = new _AttributeClassSet(_ptr);
(...skipping 26 matching lines...) Expand all
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

Powered by Google App Engine
This is Rietveld 408576698