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

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

Issue 10532200: Fix another string concatenation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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 | « no previous file | tests/html/html.status » ('j') | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 // TODO(jacobr): use _Lists.dart to remove some of the duplicated 5 // TODO(jacobr): use _Lists.dart to remove some of the duplicated
6 // functionality. 6 // functionality.
7 class _ChildrenElementList implements ElementList { 7 class _ChildrenElementList implements ElementList {
8 // Raw Element. 8 // Raw Element.
9 final _ElementImpl _element; 9 final _ElementImpl _element;
10 final _HTMLCollectionImpl _childElements; 10 final _HTMLCollectionImpl _childElements;
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 760
761 Element element; 761 Element element;
762 if (temp.elements.length == 1) { 762 if (temp.elements.length == 1) {
763 element = temp.elements.first; 763 element = temp.elements.first;
764 } else if (parentTag == 'html' && temp.elements.length == 2) { 764 } else if (parentTag == 'html' && temp.elements.length == 2) {
765 // Work around for edge case in WebKit and possibly other browsers where 765 // Work around for edge case in WebKit and possibly other browsers where
766 // both body and head elements are created even though the inner html 766 // both body and head elements are created even though the inner html
767 // only contains a head or body element. 767 // only contains a head or body element.
768 element = temp.elements[tag == 'head' ? 0 : 1]; 768 element = temp.elements[tag == 'head' ? 0 : 1];
769 } else { 769 } else {
770 throw new IllegalArgumentException('HTML had ${temp.elements.length} ' + 770 throw new IllegalArgumentException('HTML had ${temp.elements.length} '
771 'top level elements but 1 expected'); 771 'top level elements but 1 expected');
772 } 772 }
773 element.remove(); 773 element.remove();
774 return element; 774 return element;
775 } 775 }
776 776
777 /** @domName Document.createElement */ 777 /** @domName Document.createElement */
778 $if FROG 778 $if FROG
779 // Optimization to improve performance until the frog compiler inlines this 779 // Optimization to improve performance until the frog compiler inlines this
780 // method. 780 // method.
781 factory Element.tag(String tag) native "return document.createElement(tag)"; 781 factory Element.tag(String tag) native "return document.createElement(tag)";
782 $else 782 $else
783 factory Element.tag(String tag) => _document.$dom_createElement(tag); 783 factory Element.tag(String tag) => _document.$dom_createElement(tag);
784 $endif 784 $endif
785 } 785 }
OLDNEW
« no previous file with comments | « no previous file | tests/html/html.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698