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

Unified Diff: pkg/polymer/lib/src/css_analyzer.dart

Issue 23658002: Remove processing of dart code, summary.dart, simplified info.dart (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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 | « pkg/polymer/lib/src/compiler.dart ('k') | pkg/polymer/lib/src/css_emitters.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/polymer/lib/src/css_analyzer.dart
diff --git a/pkg/polymer/lib/src/css_analyzer.dart b/pkg/polymer/lib/src/css_analyzer.dart
index 270af5d5ba0c6a4485298097a3e67c948cd70c94..0b96825800b81bca76234c33b26ca8fc80380d83 100644
--- a/pkg/polymer/lib/src/css_analyzer.dart
+++ b/pkg/polymer/lib/src/css_analyzer.dart
@@ -48,7 +48,7 @@ class _AnalyzerCss {
void process(SourceFile file) {
var fileInfo = info[file.path];
if (file.isStyleSheet || fileInfo.styleSheets.length > 0) {
- var styleSheets = processVars(fileInfo);
+ var styleSheets = processVars(fileInfo.inputUrl, fileInfo);
// Add to list of all style sheets analyzed.
allStyleSheets.addAll(styleSheets);
@@ -56,7 +56,7 @@ class _AnalyzerCss {
// Process any components.
for (var component in fileInfo.declaredComponents) {
- var all = processVars(component);
+ var all = processVars(fileInfo.inputUrl, component);
// Add to list of all style sheets analyzed.
allStyleSheets.addAll(all);
@@ -70,9 +70,9 @@ class _AnalyzerCss {
for (var tree in allStyleSheets) new _RemoveVarDefinitions().visitTree(tree);
}
- List<StyleSheet> processVars(var libraryInfo) {
+ List<StyleSheet> processVars(inputUrl, libraryInfo) {
// Get list of all stylesheet(s) dependencies referenced from this file.
- var styleSheets = _dependencies(libraryInfo).toList();
+ var styleSheets = _dependencies(inputUrl, libraryInfo).toList();
var errors = [];
css.analyze(styleSheets, errors: errors, options:
@@ -118,14 +118,9 @@ class _AnalyzerCss {
* return a list of all referenced stylesheet dependencies (@imports or <link
* rel="stylesheet" ..>).
*/
- Set<StyleSheet> _dependencies(var libraryInfo, {Set<StyleSheet> seen}) {
+ Set<StyleSheet> _dependencies(inputUrl, libraryInfo, {Set<StyleSheet> seen}) {
if (seen == null) seen = new Set();
- // Used to resolve all pathing information.
- var inputUrl = libraryInfo is FileInfo
- ? libraryInfo.inputUrl
- : (libraryInfo as ComponentInfo).declaringFile.inputUrl;
-
for (var styleSheet in libraryInfo.styleSheets) {
if (!seen.contains(styleSheet)) {
// TODO(terry): VM uses expandos to implement hashes. Currently, it's a
@@ -152,7 +147,8 @@ class _AnalyzerCss {
var urls = findImportsInStyleSheet(ss, packageRoot, inputUrl,
_messages);
for (var url in urls) {
- _dependencies(info[url.resolvedPath], seen: seen);
+ var fileInfo = info[url.resolvedPath];
+ _dependencies(fileInfo.inputUrl, fileInfo, seen: seen);
}
}
}
« no previous file with comments | « pkg/polymer/lib/src/compiler.dart ('k') | pkg/polymer/lib/src/css_emitters.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698