Index: utils/apidoc/html_diff.dart |
=================================================================== |
--- utils/apidoc/html_diff.dart (revision 11656) |
+++ utils/apidoc/html_diff.dart (working copy) |
@@ -85,7 +85,10 @@ |
*/ |
static void initialize(Path libDir) { |
_compilation = new Compilation.library( |
- const <Path>[const Path(HTML_LIBRARY_NAME)], libDir); |
+ const <Path>[ |
+ const Path(DOM_LIBRARY_NAME), |
+ const Path(HTML_LIBRARY_NAME) |
+ ], libDir); |
_mirrors = _compilation.mirrors; |
// Find 'dart:dom_deprecated' by its library tag 'dom'. |
@@ -109,7 +112,7 @@ |
/** |
* Computes the `dart:dom_deprecated` to `dart:html` mapping, and |
* places it in [domToHtml], [htmlToDom], [domTypesToHtml], and |
- * [htmlTypesToDom]. Before this is run, dart2js should be initialized |
+ * [htmlTypesToDom]. Before this is run, Frog should be initialized |
* (via [parseOptions] and [initializeWorld]) and |
* [HtmlDiff.initialize] should be called. |
*/ |
@@ -123,15 +126,14 @@ |
final domTypes = htmlToDomTypes(htmlType); |
if (domTypes.isEmpty()) continue; |
- htmlTypesToDom.putIfAbsent(htmlType.qualifiedName,// map of html->[its dom types] |
+ htmlTypesToDom.putIfAbsent(htmlType.qualifiedName, |
() => new Set()).addAll(domTypes); |
- domTypes.forEach((t) => // map of dom type -> [the html name]. |
+ domTypes.forEach((t) => |
domTypesToHtml.putIfAbsent(t.qualifiedName, |
() => new Set()).add(htmlType)); |
htmlType.declaredMembers.forEach( |
- (_, m) => _addMemberDiff(m, domTypes)); // add those dom member types to each |
- // of the html member (name/type) we're looking at |
+ (_, m) => _addMemberDiff(m, domTypes)); |
} |
} |
@@ -153,9 +155,8 @@ |
if (htmlMember == null) return; |
if (!domMembers.isEmpty()) { |
htmlToDom[htmlMember.qualifiedName] = domMembers; |
- //htmlToDom[htmlmembername] -> list of corresponding dom members |
} |
- domMembers.forEach((m) => // add the html member name to the domToHtml |
+ domMembers.forEach((m) => |
domToHtml.putIfAbsent(m, () => new Set()).add(htmlMember)); |
} |
@@ -167,8 +168,7 @@ |
List<InterfaceMirror> htmlToDomTypes(InterfaceMirror htmlType) { |
if (htmlType.simpleName == null) return []; |
final tags = _getTags(comments.find(htmlType.location)); |
- if (tags.containsKey('domName')) { // TODO(efortuna): instead just tag with |
- // domTypes and domMembers instead of domName |
+ if (tags.containsKey('domName')) { |
var domNames = <String>[]; |
for (var s in tags['domName'].split(',')) { |
domNames.add(s.trim()); |