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

Unified Diff: utils/css/generate.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/cssworld.dart ('k') | utils/css/parser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/css/generate.dart
diff --git a/utils/css/generate.dart b/utils/css/generate.dart
index 18c19909a7ba841cd8e68d19b532408d488453dc..db55c388f3668c91853f0af6f696c520779b38a9 100644
--- a/utils/css/generate.dart
+++ b/utils/css/generate.dart
@@ -6,9 +6,9 @@ class Generate {
// Build up list of all known class selectors in all CSS files.
static List<String> computeClassSelectors(RuleSet ruleset, classes) {
- for (var selector in ruleset.selectorGroup.selectors) {
+ for (final selector in ruleset.selectorGroup.selectors) {
var selSeqs = selector.simpleSelectorSequences;
- for (selSeq in selSeqs) {
+ for (final selSeq in selSeqs) {
var simpleSelector = selSeq.simpleSelector;
if (simpleSelector is ClassSelector) {
String className = simpleSelector.name;
@@ -33,7 +33,7 @@ class Generate {
'// Do not edit.\n\n');
// Emit class for any @stylet directive.
- for (var production in stylesheet._topLevels) {
+ for (final production in stylesheet._topLevels) {
if (production is Directive) {
if (production is StyletDirective) {
// TODO(terry): Need safer mechanism for stylets in different files
@@ -42,15 +42,15 @@ class Generate {
buff.add(' // selector, properties<propertyName, value>\n');
buff.add(' static final selectors = const {\n');
- for (var ruleset in production.rulesets) {
- for (var selector in ruleset.selectorGroup.selectors) {
+ for (final ruleset in production.rulesets) {
+ for (final selector in ruleset.selectorGroup.selectors) {
var selSeq = selector.simpleSelectorSquences;
if (selSeq.length == 1) {
buff.add(' \'${selSeq.toString()}\' : const {\n');
}
}
- for (var decl in ruleset.declarationGroup.declarations) {
+ for (final decl in ruleset.declarationGroup.declarations) {
buff.add(' \'${decl.property}\' : ' +
'\'${decl.expression.toString()}\',\n');
}
@@ -59,7 +59,7 @@ class Generate {
buff.add(' };\n'); // End of static selectors constant.
buff.add('}\n\n'); // End of stylet class
} else if (production is IncludeDirective) {
- for (var topLevel in production.styleSheet._topLevels) {
+ for (final topLevel in production.styleSheet._topLevels) {
if (topLevel is RuleSet) {
knownClasses = computeClassSelectors(topLevel, knownClasses);
}
@@ -74,7 +74,7 @@ class Generate {
StringBuffer classSelectors = new StringBuffer(
'class CSS {\n' +
' // CSS class selectors:\n');
- for (var className in knownClasses) {
+ for (final className in knownClasses) {
String classAsDart = className.replaceAll('-', '_').toUpperCase();
classSelectors.add(' static final String ${classAsDart} = ' +
'\'${className}\';\n');
« no previous file with comments | « utils/css/cssworld.dart ('k') | utils/css/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698