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

Unified Diff: lib/src/files.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: Reworked URI computation and added test for URI fixup. 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/files.dart
diff --git a/lib/src/files.dart b/lib/src/files.dart
index 6763c2fe43dad4afa2dba55566b2173a2cedd34b..ee722079ce4741efb46810de6c0025110f78e6fc 100644
--- a/lib/src/files.dart
+++ b/lib/src/files.dart
@@ -10,13 +10,23 @@ import 'info.dart';
/** An input file to process by the template compiler. */
class SourceFile {
+ static const int HTML = 1;
+ static const int DART = 2;
+ static const int STYLESHEET = 3;
+
final Path path;
+ final int type;
- final bool isDart;
Document document;
+
+ /** Dart code or contents of a linked style sheet. */
String code;
- SourceFile(this.path, {this.isDart: false});
+ SourceFile(this.path, {this.type: HTML});
+
+ bool get isDart => type == DART;
+ bool get isHtml => type == HTML;
+ bool get isStyleSheet => type == STYLESHEET;
String toString() => "<#SourceFile $path>";
}

Powered by Google App Engine
This is Rietveld 408576698