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

Unified Diff: utils/css/tree.dart

Issue 9168008: Enabled CSS tests, added CSS tests to buildbot, fixed tooling with nodejs, and added more tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: More coding convention changes (consistency). 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
« no previous file with comments | « utils/css/tool.dart ('k') | utils/css/uitest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/css/tree.dart
diff --git a/utils/css/tree.dart b/utils/css/tree.dart
index cca0ed7f74b16e0d71f74ede03dcc752860044a7..b4351fcadea643a5cf9d707b291516fd265d5694 100644
--- a/utils/css/tree.dart
+++ b/utils/css/tree.dart
@@ -58,7 +58,7 @@ class SelectorGroup extends lang.Node {
String toString() {
StringBuffer buff = new StringBuffer();
int idx = 0;
- for (var selector in _selectors) {
+ for (final selector in _selectors) {
if (idx++ > 0) {
buff.add(', ');
}
@@ -179,7 +179,7 @@ class NamespaceSelector extends SimpleSelector {
visit(TreeVisitor visitor) => visitor.visitNamespaceSelector(this);
- String toString() => "$namespace|$nameAsSimpleSelector";
+ String toString() => "$namespace|${nameAsSimpleSelector.name}";
}
// [attr op value]
@@ -289,7 +289,7 @@ class Stylesheet extends lang.Node {
List<lang.Node> _topLevels;
Stylesheet(this._topLevels, lang.SourceSpan span) : super(span) {
- for (var node in _topLevels) {
+ for (final node in _topLevels) {
assert(node is TopLevelProduction || node is Directive);
}
}
@@ -300,7 +300,7 @@ class Stylesheet extends lang.Node {
String toString() {
StringBuffer buff = new StringBuffer();
- for (var topLevel in _topLevels) {
+ for (final topLevel in _topLevels) {
buff.add(topLevel.toString());
}
return buff.toString();
@@ -366,7 +366,7 @@ class ImportDirective extends Directive {
buff.add('@import url(${_import})');
int idx = 0;
- for (var medium in _media) {
+ for (final medium in _media) {
buff.add(idx++ == 0 ? ' $medium' : ',$medium');
}
buff.add('\n');
@@ -443,7 +443,7 @@ class KeyFrameDirective extends Directive {
String toString() {
StringBuffer buff = new StringBuffer();
buff.add('@-webkit-keyframes ${_name} {\n');
- for (var block in _blocks) {
+ for (final block in _blocks) {
buff.add(block.toString());
}
buff.add('}\n');
@@ -557,7 +557,7 @@ class DeclarationGroup extends lang.Node {
String toString() {
StringBuffer buff = new StringBuffer();
int idx = 0;
- for (var declaration in _declarations) {
+ for (final declaration in _declarations) {
buff.add(" ${declaration.toString()};\n");
}
return buff.toString();
@@ -748,7 +748,7 @@ class GroupTerm extends lang.Expression {
StringBuffer buff = new StringBuffer();
buff.add('(');
int idx = 0;
- for (var term in _terms) {
+ for (final term in _terms) {
if (idx++ > 0) {
buff.add(' ');
}
@@ -783,7 +783,7 @@ class Expressions extends lang.Expression {
String toString() {
StringBuffer buff = new StringBuffer();
int idx = 0;
- for (var expression in _expressions) {
+ for (final expression in _expressions) {
// Add space seperator between terms without an operator.
// TODO(terry): Should have a BinaryExpression to solve this problem.
if (idx > 0 &&
@@ -1077,7 +1077,7 @@ class TreePrinter implements TreeVisitor {
output.writeln("NULL");
}
- visitSimpleSelector(node);
+ visitSimpleSelector(node.nameAsSimpleSelector);
output.depth--;
}
« no previous file with comments | « utils/css/tool.dart ('k') | utils/css/uitest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698