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

Side by Side Diff: tools/dom/src/dartium_CustomElementSupport.dart

Issue 288873002: "Reverting 36191" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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 | « tools/dom/src/dart2js_WrappedEvent.dart ('k') | tools/dom/src/dartium_WrappedEvent.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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 dart.dom.html; 5 part of dart.dom.html;
6 6
7 /// Dartium ElementUpgrader implementation. 7 /// Dartium ElementUpgrader implementation.
8 class _VMElementUpgrader implements ElementUpgrader { 8 class _VMElementUpgrader implements ElementUpgrader {
9 final Type _type; 9 final Type _type;
10 final Type _nativeType; 10 final Type _nativeType;
(...skipping 12 matching lines...) Expand all
23 throw new UnsupportedError( 23 throw new UnsupportedError(
24 'extendsTag does not match base native class'); 24 'extendsTag does not match base native class');
25 } 25 }
26 } 26 }
27 } 27 }
28 28
29 Element upgrade(Element element) { 29 Element upgrade(Element element) {
30 if (element.runtimeType != _nativeType) { 30 if (element.runtimeType != _nativeType) {
31 throw new UnsupportedError('Element is incorrect type'); 31 throw new UnsupportedError('Element is incorrect type');
32 } 32 }
33 _Utils.changeElementWrapper(element, _type); 33 return _Utils.changeElementWrapper(element, _type);
34 return null;
35 } 34 }
36 } 35 }
37 36
38 /// Validates that the custom type is properly formed- 37 /// Validates that the custom type is properly formed-
39 /// 38 ///
40 /// * Is a user-defined class. 39 /// * Is a user-defined class.
41 /// * Has a created constructor with zero args. 40 /// * Has a created constructor with zero args.
42 /// * Derives from an Element subclass. 41 /// * Derives from an Element subclass.
43 /// 42 ///
44 /// Then returns the native base class. 43 /// Then returns the native base class.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 return nativeClass; 79 return nativeClass;
81 } 80 }
82 81
83 82
84 bool _isBuiltinType(ClassMirror cls) { 83 bool _isBuiltinType(ClassMirror cls) {
85 // TODO(vsm): Find a less hackish way to do this. 84 // TODO(vsm): Find a less hackish way to do this.
86 LibraryMirror lib = cls.owner; 85 LibraryMirror lib = cls.owner;
87 String libName = lib.uri.toString(); 86 String libName = lib.uri.toString();
88 return libName.startsWith('dart:'); 87 return libName.startsWith('dart:');
89 } 88 }
OLDNEW
« no previous file with comments | « tools/dom/src/dart2js_WrappedEvent.dart ('k') | tools/dom/src/dartium_WrappedEvent.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698