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

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

Issue 18089011: Added named constructors to Element to construct common elements. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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) 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 part of $LIBRARYNAME; 5 part of $LIBRARYNAME;
6 6
7 class _ChildrenElementList extends ListBase<Element> { 7 class _ChildrenElementList extends ListBase<Element> {
8 // Raw Element. 8 // Raw Element.
9 final Element _element; 9 final Element _element;
10 final HtmlCollection _childElements; 10 final HtmlCollection _childElements;
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after
772 @Experimental 772 @Experimental
773 bool get isTemplate => tagName == 'TEMPLATE' || _isAttributeTemplate; 773 bool get isTemplate => tagName == 'TEMPLATE' || _isAttributeTemplate;
774 774
775 void _ensureTemplate() { 775 void _ensureTemplate() {
776 if (!isTemplate) { 776 if (!isTemplate) {
777 throw new UnsupportedError('$this is not a template.'); 777 throw new UnsupportedError('$this is not a template.');
778 } 778 }
779 TemplateElement.decorate(this); 779 TemplateElement.decorate(this);
780 } 780 }
781 781
782 $ADDITIONAL_METHODS
783
782 $!MEMBERS 784 $!MEMBERS
783 } 785 }
784 786
785 787
786 final _START_TAG_REGEXP = new RegExp('<(\\w+)'); 788 final _START_TAG_REGEXP = new RegExp('<(\\w+)');
787 class _ElementFactoryProvider { 789 class _ElementFactoryProvider {
788 static const _CUSTOM_PARENT_TAG_MAP = const { 790 static const _CUSTOM_PARENT_TAG_MAP = const {
789 'body' : 'html', 791 'body' : 'html',
790 'head' : 'html', 792 'head' : 'html',
791 'caption' : 'table', 793 'caption' : 'table',
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
919 const ScrollAlignment._internal(this._value); 921 const ScrollAlignment._internal(this._value);
920 toString() => 'ScrollAlignment.$_value'; 922 toString() => 'ScrollAlignment.$_value';
921 923
922 /// Attempt to align the element to the top of the scrollable area. 924 /// Attempt to align the element to the top of the scrollable area.
923 static const TOP = const ScrollAlignment._internal('TOP'); 925 static const TOP = const ScrollAlignment._internal('TOP');
924 /// Attempt to center the element in the scrollable area. 926 /// Attempt to center the element in the scrollable area.
925 static const CENTER = const ScrollAlignment._internal('CENTER'); 927 static const CENTER = const ScrollAlignment._internal('CENTER');
926 /// Attempt to align the element to the bottom of the scrollable area. 928 /// Attempt to align the element to the bottom of the scrollable area.
927 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); 929 static const BOTTOM = const ScrollAlignment._internal('BOTTOM');
928 } 930 }
OLDNEW
« tools/dom/scripts/systemhtml.py ('K') | « tools/dom/scripts/systemhtml.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698