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

Unified Diff: utils/css/validate.dart

Issue 9695048: Template parser (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Siggi's comments Created 8 years, 9 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/uitest.dart ('k') | utils/css/world.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/css/validate.dart
diff --git a/utils/css/validate.dart b/utils/css/validate.dart
index 83b724008a7531a35761a7e0b0e58602fd43337c..9babe3d3c0911ab077ba6e69e438a30785ed6159 100644
--- a/utils/css/validate.dart
+++ b/utils/css/validate.dart
@@ -38,7 +38,7 @@ class Validate {
// Validate the @{css expression} only .class and #elementId are valid inside
// of @{...}.
- static template(List<lang.Node> selectors, CssWorld cssWorld) {
+ static template(List<ASTNode> selectors, CssWorld cssWorld) {
var errorSelector; // signal which selector didn't match.
bool found = false; // signal if a selector is matched.
int matches = 0; // < 0 IdSelectors, > 0 ClassSelector
@@ -56,7 +56,6 @@ class Validate {
if (!simpleSelector.name.startsWith('_')) {
// TODO(terry): For now iterate through all classes look for faster
// mechanism hash map, etc.
- var className;
for (final className in cssWorld.classes) {
if (selector.simpleSelector.name == className) {
matches = _classNameCheck(selector, matches);
@@ -106,8 +105,9 @@ class Validate {
}
// Every selector must match.
+ var selector = selectors[0];
assert((matches >= 0 ? matches : -matches) ==
- selectors[0].simpleSelectorSequences.length);
+ selector.simpleSelectorSequences.length);
}
}
« no previous file with comments | « utils/css/uitest.dart ('k') | utils/css/world.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698