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

Unified Diff: lib/src/info.dart

Issue 12474002: Support for parsing all CSS and producing one CSS file (Closed) Base URL: https://github.com/dart-lang/web-ui.git@master
Patch Set: merged Created 7 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
Index: lib/src/info.dart
diff --git a/lib/src/info.dart b/lib/src/info.dart
index edee04f7b6b6ae9063f39f396cdc7f3826ec9116..383ea6ec68f5caf8cddd738b105bb25800282216 100644
--- a/lib/src/info.dart
+++ b/lib/src/info.dart
@@ -147,14 +147,17 @@ class PathInfo {
* directory back to the input directory. An exception will be thrown if
* [target] is not under [_baseDir].
*/
- String transformUrl(Path src, String target) {
- if (new Uri.fromString(target).isAbsolute) return target;
+ Path transformUrlToPath(Path src, String target) {
Siggi Cherem (dart-lang) 2013/03/07 22:14:20 seems that you no longer need this part of the cha
terry 2013/03/08 20:11:24 Done.
+ if (new Uri.fromString(target).isAbsolute) return new Path(target);
var path = new Path(target);
- if (path.isAbsolute) return target;
+ if (path.isAbsolute) return path;
var pathToTarget = src.directoryPath.join(path);
var outputLibraryDir = outputDirPath(src);
- return pathToTarget.relativeTo(outputLibraryDir).canonicalize().toString();
+ return pathToTarget.relativeTo(outputLibraryDir).canonicalize();
}
+
+ String transformUrl(Path src, String target) =>
+ transformUrlToPath(src, target).toString();
}
/**
@@ -198,11 +201,8 @@ abstract class LibraryInfo extends Hashable {
/** File where the top-level code was defined. */
Path get inputPath;
- /** Stylesheet with <style>...</style> */
- StringBuffer cssSource = new StringBuffer();
-
/** Parsed cssSource. */
- StyleSheet styleSheet;
+ List<StyleSheet> styleSheets = [];
/**
* Name of the file that will hold any generated Dart code for this library
@@ -276,6 +276,9 @@ class FileInfo extends LibraryInfo {
/** Files imported with `<link rel="component">` */
final List<Path> componentLinks = <Path>[];
+ /** Files imported with `<link rel="stylesheet">` */
+ final List<Path> styleSheetHref = <Path>[];
+
/** Root is associated with the body info. */
ElementInfo bodyInfo;

Powered by Google App Engine
This is Rietveld 408576698