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

Side by Side 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: bumped version 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** 5 /**
6 * Datatypes holding information extracted by the analyzer and used by later 6 * Datatypes holding information extracted by the analyzer and used by later
7 * phases of the compiler. 7 * phases of the compiler.
8 */ 8 */
9 library info; 9 library info;
10 10
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 191
192 /** 192 /**
193 * The inverse of [externalCode]. If this .dart file was imported via a script 193 * The inverse of [externalCode]. If this .dart file was imported via a script
194 * tag, this refers to the HTML file that imported it. 194 * tag, this refers to the HTML file that imported it.
195 */ 195 */
196 LibraryInfo htmlFile; 196 LibraryInfo htmlFile;
197 197
198 /** File where the top-level code was defined. */ 198 /** File where the top-level code was defined. */
199 Path get inputPath; 199 Path get inputPath;
200 200
201 /** Stylesheet with <style>...</style> */
202 StringBuffer cssSource = new StringBuffer();
203
204 /** Parsed cssSource. */ 201 /** Parsed cssSource. */
205 StyleSheet styleSheet; 202 List<StyleSheet> styleSheets = [];
206 203
207 /** 204 /**
208 * Name of the file that will hold any generated Dart code for this library 205 * Name of the file that will hold any generated Dart code for this library
209 * unit. 206 * unit.
210 */ 207 */
211 String _getOutputFilename(NameMangler mangle); 208 String _getOutputFilename(NameMangler mangle);
212 209
213 /** This is used in transforming Dart code to track modified files. */ 210 /** This is used in transforming Dart code to track modified files. */
214 bool modified = false; 211 bool modified = false;
215 212
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 * All custom element definitions defined in this file or imported via 266 * All custom element definitions defined in this file or imported via
270 *`<link rel='components'>` tag. Maps from the tag name to the component 267 *`<link rel='components'>` tag. Maps from the tag name to the component
271 * information. This map is sorted by the tag name. 268 * information. This map is sorted by the tag name.
272 */ 269 */
273 final Map<String, ComponentInfo> components = 270 final Map<String, ComponentInfo> components =
274 new SplayTreeMap<String, ComponentInfo>(); 271 new SplayTreeMap<String, ComponentInfo>();
275 272
276 /** Files imported with `<link rel="component">` */ 273 /** Files imported with `<link rel="component">` */
277 final List<Path> componentLinks = <Path>[]; 274 final List<Path> componentLinks = <Path>[];
278 275
276 /** Files imported with `<link rel="stylesheet">` */
277 final List<Path> styleSheetHref = <Path>[];
278
279 /** Root is associated with the body info. */ 279 /** Root is associated with the body info. */
280 ElementInfo bodyInfo; 280 ElementInfo bodyInfo;
281 281
282 FileInfo(this.path, [this.isEntryPoint = false]); 282 FileInfo(this.path, [this.isEntryPoint = false]);
283 283
284 /** 284 /**
285 * Query for an ElementInfo matching the provided [tag], starting from the 285 * Query for an ElementInfo matching the provided [tag], starting from the
286 * [bodyInfo]. 286 * [bodyInfo].
287 */ 287 */
288 ElementInfo query(String tag) => new _QueryInfo(tag).visit(bodyInfo); 288 ElementInfo query(String tag) => new _QueryInfo(tag).visit(bodyInfo);
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
763 } 763 }
764 764
765 visitChildren(ElementInfo info) { 765 visitChildren(ElementInfo info) {
766 for (var child in info.children) { 766 for (var child in info.children) {
767 var result = visit(child); 767 var result = visit(child);
768 if (result != null) return result; 768 if (result != null) return result;
769 } 769 }
770 return null; 770 return null;
771 } 771 }
772 } 772 }
OLDNEW
« no previous file with comments | « lib/src/html_css_fixup.dart ('k') | lib/src/options.dart » ('j') | pubspec.yaml » ('J')

Powered by Google App Engine
This is Rietveld 408576698