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

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

Issue 9600035: Enable new dart:html wrapperless frog bindings and wrapper dartium bindings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Handle all code review comments 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « client/html/htmlimpl.dart ('k') | client/testing/unittest/dom_for_unittest.dart » ('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 class _TextFactoryProvider { 5 class _TextFactoryProvider {
6 6
7 factory Text(data) => document._createTextNode(data); 7 factory Text(String data) => document._createTextNode(data);
8 } 8 }
9 9
10 class _EventFactoryProvider { 10 class _EventFactoryProvider {
11 factory Event(String type, [bool canBubble = true, 11 factory Event(String type, [bool canBubble = true,
12 bool cancelable = true]) { 12 bool cancelable = true]) {
13 _EventImpl e = document._createEvent("Event"); 13 _EventImpl e = document._createEvent("Event");
14 e._initEvent(type, canBubble, cancelable); 14 e._initEvent(type, canBubble, cancelable);
15 return e; 15 return e;
16 } 16 }
17 } 17 }
(...skipping 24 matching lines...) Expand all
42 } 42 }
43 } 43 }
44 44
45 final _START_TAG_REGEXP = const RegExp('<(\\w+)'); 45 final _START_TAG_REGEXP = const RegExp('<(\\w+)');
46 class _ElementFactoryProvider { 46 class _ElementFactoryProvider {
47 static final _CUSTOM_PARENT_TAG_MAP = const { 47 static final _CUSTOM_PARENT_TAG_MAP = const {
48 'body' : 'html', 48 'body' : 'html',
49 'head' : 'html', 49 'head' : 'html',
50 'caption' : 'table', 50 'caption' : 'table',
51 'td': 'tr', 51 'td': 'tr',
52 'tbody': 'table',
53 'colgroup': 'table', 52 'colgroup': 'table',
54 'col' : 'colgroup', 53 'col' : 'colgroup',
55 'tr' : 'tbody', 54 'tr' : 'tbody',
56 'tbody' : 'table', 55 'tbody' : 'table',
57 'tfoot' : 'table', 56 'tfoot' : 'table',
58 'thead' : 'table', 57 'thead' : 'table',
59 'track' : 'audio', 58 'track' : 'audio',
60 }; 59 };
61 60
62 /** @domName Document.createElement */ 61 /** @domName Document.createElement */
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 } 93 }
95 element.remove(); 94 element.remove();
96 return element; 95 return element;
97 } 96 }
98 97
99 /** @domName Document.createElement */ 98 /** @domName Document.createElement */
100 factory Element.tag(String tag) { 99 factory Element.tag(String tag) {
101 return document._createElement(tag); 100 return document._createElement(tag);
102 } 101 }
103 } 102 }
OLDNEW
« no previous file with comments | « client/html/htmlimpl.dart ('k') | client/testing/unittest/dom_for_unittest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698