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

Unified Diff: lib/src/emitters.dart

Issue 11412285: New pub release - changes to comply with new SDK. (Closed) Base URL: git@github.com:dart-lang/dart-web-components.git@master
Patch Set: Created 8 years, 1 month 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 | « lib/src/codegen.dart ('k') | lib/src/html5_setters.g.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/emitters.dart
diff --git a/lib/src/emitters.dart b/lib/src/emitters.dart
index 11f4cdad82f1e92aec8c1a6a345c2956ba8cdf65..ec03524c3e5dc7b7dfc3ece09881b3bec9f65b6b 100644
--- a/lib/src/emitters.dart
+++ b/lib/src/emitters.dart
@@ -132,7 +132,7 @@ class ElementFieldEmitter extends Emitter<ElementInfo> {
void emitDeclarations(Context context) {
if (!info.isRoot) {
var type = typeForHtmlTag(info.node.tagName);
- context.declarations.add('autogenerated.$type ${info.identifier};');
+ context.declarations.add('autogenerated_$type ${info.identifier};');
}
}
@@ -182,7 +182,7 @@ class ContentFieldEmitter extends Emitter<TextInfo> {
void emitCreated(Context context) {
context.createdMethod.add(
- "${info.identifier} = new autogenerated.Text('');");
+ "${info.identifier} = new autogenerated_html.Text('');");
}
void emitRemoved(Context context) {
@@ -206,7 +206,7 @@ class EventListenerEmitter extends Emitter<ElementInfo> {
var listenerName = '__listener${info.identifier}_${name}_';
event.listenerField = newName(context, listenerName);
context.declarations.add(
- 'autogenerated.EventListener ${event.listenerField};');
+ 'autogenerated_html.EventListener ${event.listenerField};');
}
});
}
@@ -481,7 +481,7 @@ class ConditionalEmitter extends DataBindingEmitter<TemplateInfo> {
var id = info.identifier;
var printer = context.declarations;
if (info.isTemplateElement) {
- printer.add('autogenerated.Node _endPosition$id;');
+ printer.add('autogenerated_html.Node _endPosition$id;');
}
printer.add('bool _isVisible$id = false;');
}
@@ -579,7 +579,7 @@ class ListEmitter extends DataBindingEmitter<TemplateInfo> {
var printer = context.declarations;
printer.add('List<Function> _removeChild$id = [];');
if (info.isTemplateElement) {
- printer.add('autogenerated.Node _endPosition$id;');
+ printer.add('autogenerated_html.Node _endPosition$id;');
}
}
@@ -764,7 +764,7 @@ class WebComponentEmitter extends RecursiveEmitter {
}
if (info.element.attributes['apply-author-styles'] != null) {
- _context.createdMethod.add('if (_root is autogenerated.ShadowRoot) '
+ _context.createdMethod.add('if (_root is autogenerated_html.ShadowRoot) '
'_root.applyAuthorStyles = true;');
// TODO(jmesserly): warn at runtime if apply-author-styles was not set,
// and we don't have Shadow DOM support? In that case, styles won't have
@@ -773,7 +773,7 @@ class WebComponentEmitter extends RecursiveEmitter {
if (info.template != null && !elemInfo.childrenCreatedInCode) {
// TODO(jmesserly): we need to emit code to run the <content> distribution
// algorithm for browsers without ShadowRoot support.
- _context.createdMethod.add("_root.innerHTML = '''")
+ _context.createdMethod.add("_root.innerHtml = '''")
.addRaw(escapeDartString(elemInfo.node.innerHTML, triple: true))
.addRaw("''';\n");
}
@@ -893,7 +893,7 @@ String _createChildExpression(NodeInfo info) {
*/
String _emitCreateHtml(Node node) {
if (node is Text) {
- return "new autogenerated.Text('${escapeDartString(node.value)}')";
+ return "new autogenerated_html.Text('${escapeDartString(node.value)}')";
}
// Namespace constants from:
@@ -908,15 +908,15 @@ String _emitCreateHtml(Node node) {
if (isEmpty && elemName != null && isHtml) {
constructor = '$elemName()';
} else if (isEmpty && isHtml) {
- constructor = "Element.tag('${node.tagName}')";
+ constructor = "html.Element.tag('${node.tagName}')";
} else if (isEmpty && isSvg) {
- constructor = "SVGElement.tag('${node.tagName}')";
+ constructor = "svg.Element.tag('${node.tagName}')";
} else {
// TODO(sigmund): does this work for the mathml namespace?
- var target = isSvg ? 'SVGElement.svg' : 'Element.html';
+ var target = isSvg ? 'svg.Element.svg' : 'html.Element.html';
constructor = "$target('${escapeDartString(node.outerHTML)}')";
}
- return 'new autogenerated.$constructor';
+ return 'new autogenerated_$constructor';
}
/**
« no previous file with comments | « lib/src/codegen.dart ('k') | lib/src/html5_setters.g.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698