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

Unified Diff: tools/dom/src/native_DOMImplementation.dart

Issue 27222003: Dart changes for https://codereview.chromium.org/26571005/ (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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
« no previous file with comments | « tests/html/custom/document_register_type_extensions_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/src/native_DOMImplementation.dart
diff --git a/tools/dom/src/native_DOMImplementation.dart b/tools/dom/src/native_DOMImplementation.dart
index 38956acce395564bff0f575e0138a21a1a5544e5..2b760a209a8c4ad6216292c059628ad0f63078b3 100644
--- a/tools/dom/src/native_DOMImplementation.dart
+++ b/tools/dom/src/native_DOMImplementation.dart
@@ -104,6 +104,11 @@ class _Utils {
return false;
}
+ static bool isTypeSubclassOfTag(Type type, String tagName) {
+ var element = new Element.tag(tagName);
+ return isTypeSubclassOf(type, element.runtimeType);
+ }
+
static window() native "Utils_window";
static forwardingPrint(String message) native "Utils_forwardingPrint";
static int _getNewIsolateId() native "Utils_getNewIsolateId";
@@ -242,7 +247,7 @@ class _Utils {
}
// Inject all the already defined console variables.
_consoleTempVariables._data.forEach(addArg);
-
+
// TODO(jacobr): remove the parentheses around the expresson once
// dartbug.com/13723 is fixed. Currently we wrap expression in parentheses
// to ensure only valid Dart expressions are allowed. Otherwise the DartVM
@@ -264,7 +269,7 @@ class _Utils {
* Returns a list of completions to use if the receiver is o.
*/
static List<String> getCompletions(o) {
- MirrorSystem system = currentMirrorSystem();
+ MirrorSystem system = currentMirrorSystem();
var completions = new Set<String>();
addAll(Map<Symbol, dynamic> map, bool isStatic) {
map.forEach((symbol, mirror) {
@@ -287,7 +292,7 @@ class _Utils {
addForClass(interface, isStatic);
}
}
-
+
if (o is Type) {
addForClass(reflectClass(o), true);
} else {
« no previous file with comments | « tests/html/custom/document_register_type_extensions_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698