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

Unified Diff: utils/apidoc/html_diff.dart

Issue 9110027: Some cleanups to Frog to avoid looking up its builtin types too much (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: removed dead files Created 8 years, 11 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
« frog/member.dart ('K') | « frog/world.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/apidoc/html_diff.dart
diff --git a/utils/apidoc/html_diff.dart b/utils/apidoc/html_diff.dart
index 802bd1765baa61bd135c11266b00d02242007cce..a562e07cc0fd6fb02db3efb474a86155646a5b00 100644
--- a/utils/apidoc/html_diff.dart
+++ b/utils/apidoc/html_diff.dart
@@ -36,7 +36,7 @@ void main() {
}
});
- for (var type in world.dom.types.getValues()) {
+ for (var type in diff.dom.types.getValues()) {
if (type.name == null) continue;
if (type.definition is FunctionTypeDefinition) continue;
for (var member in type.members.getValues()) {
@@ -85,6 +85,8 @@ class HtmlDiff {
final CommentMap comments;
+ final Library dom;
+
/**
* Perform static initialization of [world]. This should be run before
* calling [HtmlDiff.run].
@@ -92,6 +94,7 @@ class HtmlDiff {
static void initialize() {
world.processDartScript('dart:htmlimpl');
world.resolveAll();
+ dom = world.libraries['dart:dom'];
}
HtmlDiff() :
@@ -227,18 +230,18 @@ class HtmlDiff {
return map(domNames, (domName) {
// DOMWindow is Chrome-specific, so we don't use it in our annotations.
if (domName == 'Window') domName = 'DOMWindow';
- final domType = world.dom.types[domName];
+ final domType = dom.types[domName];
if (domType == null) print('Warning: no dart:dom type named $domName');
return domType;
});
} else {
if (!htmlType.name.endsWith('WrappingImplementation')) return [];
final domName = htmlType.name.replaceFirst('WrappingImplementation', '');
- var domType = world.dom.types[domName];
+ var domType = dom.types[domName];
if (domType == null && domName.endsWith('Element')) {
- domType = world.dom.types['HTML$domName'];
+ domType = dom.types['HTML$domName'];
}
- if (domType == null) domType = world.dom.types['WebKit$domName'];
+ if (domType == null) domType = dom.types['WebKit$domName'];
if (domType == null) {
print('Warning: no dart:dom type matches dart:htmlimpl ' +
htmlType.name);
@@ -320,7 +323,7 @@ class HtmlDiff {
}
var typeName = splitName[0];
if (typeName == 'Window') typeName = 'DOMWindow';
- final type = world.dom.types[typeName];
+ final type = dom.types[typeName];
if (type == null) return new Set();
final member = type.members[splitName[1]];
if (member == null) return new Set();
« frog/member.dart ('K') | « frog/world.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698