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

Unified Diff: client/dom/templates/html/impl/impl_SVGElement.darttemplate

Issue 9845043: Rename client/{dom,html} to lib/{dom,html} . (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 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: client/dom/templates/html/impl/impl_SVGElement.darttemplate
===================================================================
--- client/dom/templates/html/impl/impl_SVGElement.darttemplate (revision 5796)
+++ client/dom/templates/html/impl/impl_SVGElement.darttemplate (working copy)
@@ -1,54 +0,0 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-class _AttributeClassSet extends _CssClassSet {
- _AttributeClassSet(element) : super(element);
-
- String _className() => _element.attributes['class'];
-
- void _write(Set s) {
- _element.attributes['class'] = _formatSet(s);
- }
-}
-
-class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
- Set<String> get classes() {
- if (_cssClassSet === null) {
- _cssClassSet = new _AttributeClassSet(_ptr);
- }
- return _cssClassSet;
- }
-
- ElementList get elements() => new FilteredElementList(this);
-
- void set elements(Collection<Element> value) {
- final elements = this.elements;
- elements.clear();
- elements.addAll(value);
- }
-
- String get outerHTML() {
- final container = new Element.tag("div");
- final SVGElement clone = this.clone(true);
- container.elements.add(clone);
- return container.innerHTML;
- }
-
- String get innerHTML() {
- final container = new Element.tag("div");
- final SVGElement clone = this.clone(true);
- container.elements.addAll(clone.elements);
- return container.innerHTML;
- }
-
- void set innerHTML(String svg) {
- final container = new Element.tag("div");
- // Wrap the SVG string in <svg> so that SVGElements are created, rather than
- // HTMLElements.
- container.innerHTML = '<svg version="1.1">$svg</svg>';
- this.elements = container.elements.first.elements;
- }
-
-$!MEMBERS
-}

Powered by Google App Engine
This is Rietveld 408576698