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

Side by Side Diff: lib/src/polyfill.dart

Issue 1138823002: pkg/csslib: Remove a number of unused members, prepare for release (Closed) Base URL: https://github.com/dart-lang/csslib@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « lib/parser.dart ('k') | lib/src/tokenizer_base.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 part of csslib.parser; 5 part of csslib.parser;
6 6
7 /** 7 /**
8 * CSS polyfill emits CSS to be understood by older parsers that which do not 8 * CSS polyfill emits CSS to be understood by older parsers that which do not
9 * understand (var, calc, etc.). 9 * understand (var, calc, etc.).
10 */ 10 */
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 } 45 }
46 } 46 }
47 47
48 void processVars(StyleSheet styleSheet) { 48 void processVars(StyleSheet styleSheet) {
49 // Build list of all var definitions. 49 // Build list of all var definitions.
50 var mainStyleSheetVarDefs = (new _VarDefAndUsage( 50 var mainStyleSheetVarDefs = (new _VarDefAndUsage(
51 this._messages, _allVarDefinitions)..visitTree(styleSheet)).varDefs; 51 this._messages, _allVarDefinitions)..visitTree(styleSheet)).varDefs;
52 52
53 // Resolve all definitions to a non-VarUsage (terminal expression). 53 // Resolve all definitions to a non-VarUsage (terminal expression).
54 mainStyleSheetVarDefs.forEach((key, value) { 54 mainStyleSheetVarDefs.forEach((key, value) {
55 for (Expression expr in (value.expression as Expressions).expressions) { 55 for (var _ in (value.expression as Expressions).expressions) {
56 mainStyleSheetVarDefs[key] = 56 mainStyleSheetVarDefs[key] =
57 _findTerminalVarDefinition(_allVarDefinitions, value); 57 _findTerminalVarDefinition(_allVarDefinitions, value);
58 } 58 }
59 }); 59 });
60 } 60 }
61 } 61 }
62 62
63 /** Build list of all var definitions in all includes. */ 63 /** Build list of all var definitions in all includes. */
64 class _VarDefinitionsIncludes extends Visitor { 64 class _VarDefinitionsIncludes extends Visitor {
65 final Map<String, VarDefinition> varDefs; 65 final Map<String, VarDefinition> varDefs;
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 } 247 }
248 } else { 248 } else {
249 // Return real CSS property. 249 // Return real CSS property.
250 return varDef; 250 return varDef;
251 } 251 }
252 } 252 }
253 253
254 // Didn't point to a var definition that existed. 254 // Didn't point to a var definition that existed.
255 return varDef; 255 return varDef;
256 } 256 }
OLDNEW
« no previous file with comments | « lib/parser.dart ('k') | lib/src/tokenizer_base.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698